· 4 years ago · Jul 12, 2021, 12:48 PM
1using Newtonsoft.Json.Linq;
2using OpenQA.Selenium;
3using OpenQA.Selenium.Chrome;
4using OpenQA.Selenium.Firefox;
5using System;
6using System.Collections.Generic;
7using System.ComponentModel;
8using System.Data;
9using System.Drawing;
10using System.Linq;
11using System.Net;
12using System.Text;
13using System.Threading.Tasks;
14using System.Windows.Forms;
15
16namespace RS_Phishing_link_buster
17{
18 public partial class Form1 : Form
19 {
20 Random randomizer = new Random();
21
22 string[] words = null;
23 string[] emailExtensions = new string[]
24 {
25 "@hotmail.com", "@yahoo.com", "@gmail.com", "@outlook.com"
26 };
27
28 public Form1()
29 {
30 InitializeComponent();
31
32 words = System.IO.File.ReadAllLines("./words.txt");
33 }
34
35 public string GetProxy()
36 {
37 string outp = String.Empty;
38
39
40 try
41 {
42 string jString = String.Empty;
43 using (WebClient driver = new WebClient())
44 jString = driver.DownloadString("http://pubproxy.com/api/proxy");
45
46 JObject jObj = JObject.Parse(jString);
47 outp = jObj["data"][0]["ipPort"].ToString();
48 } catch
49 {
50 Console.WriteLine("Failed to parse proxy endpoint");
51 }
52
53 return outp;
54 }
55
56 private void button1_Click(object sender, EventArgs e)
57 {
58 if(!System.IO.File.Exists(execInput.Text))
59 {
60 MessageBox.Show("Invalid exectuable path");
61 return;
62 }
63
64 if (int.TryParse(instanceAmountInput.Text, out int instanceAmouth))
65 {
66 if (instanceAmouth > 1)
67 for (int i = 0; i < instanceAmouth; i++)
68 Task.Run(async () => StartLoopThread());
69 else StartLoopThread();
70 } else MessageBox.Show("Instance amouth must be numeric");
71 }
72
73 private void StartLoopThread()
74 {
75 IWebDriver webDriver = GetDriver();
76
77 while (true)
78 {
79 // Init
80
81 // Start inject
82 webDriver.Url = uriInput.Text;
83 EnterLogin(webDriver);
84 while (webDriver.Url == uriInput.Text)
85 System.Threading.Thread.Sleep(100);
86
87 EnterFakePin(webDriver);
88 EnterAuthenticator(webDriver);
89 }
90
91 }
92
93 private IWebDriver GetDriver()
94 {
95 IWebDriver webDriver = null;
96
97 Proxy proxy = new Proxy();
98 proxy.Kind = ProxyKind.Manual;
99 proxy.IsAutoDetect = false;
100 proxy.HttpProxy = proxy.SslProxy = GetProxy();
101
102 switch (execInput.Text.Split("\\").Last().ToLower())
103 {
104 case "firefox.exe":
105 FirefoxOptions options = new FirefoxOptions();
106 options.BrowserExecutableLocation = execInput.Text;
107
108 options.Proxy = proxy;
109
110 if (headlessCheckBox.Checked) options.AddArgument("-headless");
111
112 webDriver = new FirefoxDriver(options);
113
114 break;
115
116 case "chrome.exe":
117 ChromeOptions chromeOptions = new ChromeOptions();
118
119 // Set capabilities and arguments
120 chromeOptions.AddAdditionalCapability("useAutomationExtension", false);
121 chromeOptions.AddArgument("--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36");
122 chromeOptions.AddArgument("--incognito");
123 chromeOptions.AddArgument("--disable-blink-features=AutomationControlled");
124
125 // Set Proxy
126 chromeOptions.Proxy = proxy;
127
128
129 webDriver = new ChromeDriver(System.IO.Directory.GetCurrentDirectory(), chromeOptions);
130 IJavaScriptExecutor javaexec = (IJavaScriptExecutor)webDriver;
131 javaexec.ExecuteScript("Object.defineProperty(navigator, 'webdriver', {get: () => undefined})");
132 break;
133
134 }
135
136 return webDriver;
137 }
138
139 private void EnterLogin(IWebDriver webDriver)
140 {
141 System.Threading.Thread.Sleep(1000);
142 IWebElement usernameField = webDriver.FindElement(By.XPath("//input[@id='login-username']"));
143 IWebElement passwordField = webDriver.FindElement(By.XPath("//input[@id='login-password']"));
144
145 IWebElement submit = webDriver.FindElement(By.Id("rs-login-submit"));
146
147 usernameField.SendKeys($"{words[randomizer.Next(words.Length-1)]}{emailExtensions[randomizer.Next(emailExtensions.Length-1)]}");
148 passwordField.SendKeys(words[randomizer.Next(words.Length - 1)]);
149
150 submit.Click();
151
152 }
153
154 private void EnterFakePin(IWebDriver webDriver)
155 {
156 IWebElement submit_pin = webDriver.FindElement(By.Id("bankpin_screen"));
157 submit_pin.Click();
158
159 for(int i = 0; i < 4; i++)
160 {
161 IWebElement pinBtn = webDriver.FindElement(By.ClassName($"pin{randomizer.Next(9)}"));
162 pinBtn.Click();
163 }
164 }
165
166 private void EnterAuthenticator(IWebDriver webDriver)
167 {
168 IWebElement inputField = webDriver.FindElement(By.Id("text_code"));
169 IWebElement submitBtn = webDriver.FindElement(By.ClassName("login-form__submit"));
170
171 inputField.SendKeys(string.Join("", Enumerable.Range(0, 7).Select(i => randomizer.Next(0, 9))));
172 submitBtn.Click();
173
174 }
175 }
176}
177