Compare commits
No commits in common. "bc1a8ec19722914b1203d06798eb235e4ea58b0b" and "d2efdbaacde059d9afe768a4414ce911a07b7a94" have entirely different histories.
bc1a8ec197
...
d2efdbaacd
|
|
@ -29,11 +29,6 @@
|
||||||
* HID-based payload execution
|
* HID-based payload execution
|
||||||
* Emulate keyboard input for automation/testing
|
* Emulate keyboard input for automation/testing
|
||||||
|
|
||||||
- **Jammer ()**
|
|
||||||
|
|
||||||
- BLE/Bluetooth Jammer (Works with single NRF right now)
|
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🧩 Project Status
|
## 🧩 Project Status
|
||||||
|
|
@ -44,7 +39,6 @@
|
||||||
| WiFi Scan | ✅ Working |
|
| WiFi Scan | ✅ Working |
|
||||||
| Packet Analysis | ✅ Working |
|
| Packet Analysis | ✅ Working |
|
||||||
| BadUSB | ✅ Working |
|
| BadUSB | ✅ Working |
|
||||||
| Jammer | Works Partially |
|
|
||||||
| SD Card | 🚧 WIP |
|
| SD Card | 🚧 WIP |
|
||||||
| RF Capture/Replay | 🚧 WIP |
|
| RF Capture/Replay | 🚧 WIP |
|
||||||
| Emulator | 🚧 WIP |
|
| Emulator | 🚧 WIP |
|
||||||
|
|
|
||||||
|
|
@ -213,29 +213,29 @@ void device_check_run()
|
||||||
|
|
||||||
Serial.println("Diagnostics complete");
|
Serial.println("Diagnostics complete");
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
drawStatus(status);
|
drawStatus(status);
|
||||||
|
|
||||||
if (btnUp())
|
if (btnUp())
|
||||||
{
|
{
|
||||||
selectedIndex--;
|
selectedIndex--;
|
||||||
if (selectedIndex < 0) selectedIndex = MAX_ITEMS - 1;
|
if (selectedIndex < 0) selectedIndex = MAX_ITEMS - 1;
|
||||||
delay(150);
|
delay(150);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (btnDown())
|
if (btnDown())
|
||||||
{
|
{
|
||||||
selectedIndex++;
|
selectedIndex++;
|
||||||
if (selectedIndex >= MAX_ITEMS) selectedIndex = 0;
|
if (selectedIndex >= MAX_ITEMS) selectedIndex = 0;
|
||||||
delay(150);
|
delay(150);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (btnBack())
|
if (btnBack())
|
||||||
{
|
{
|
||||||
delay(150);
|
delay(150);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,16 +39,24 @@ RF24 radio2(CE2_PIN, CSN2_PIN);
|
||||||
SPIClass *RADIO_SPI;
|
SPIClass *RADIO_SPI;
|
||||||
|
|
||||||
|
|
||||||
void deactivateNRF1() {
|
|
||||||
digitalWrite(CSN1_PIN, HIGH);
|
|
||||||
digitalWrite(CE1_PIN, LOW);
|
|
||||||
}
|
|
||||||
|
|
||||||
void deactivateNRF2() {
|
|
||||||
digitalWrite(CSN2_PIN, HIGH);
|
|
||||||
digitalWrite(CE2_PIN, LOW);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// ================= BLE SCAN =================
|
||||||
|
//BLEScan *pBLEScan;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//void startBLEScan()
|
||||||
|
//{
|
||||||
|
// BLEDevice::init("");
|
||||||
|
//
|
||||||
|
// pBLEScan = BLEDevice::getScan();
|
||||||
|
//
|
||||||
|
// pBLEScan->setActiveScan(true);
|
||||||
|
//
|
||||||
|
// pBLEScan->start(5);
|
||||||
|
//
|
||||||
|
// Serial.println("BLE scan complete");
|
||||||
|
//}
|
||||||
|
|
||||||
// ================= SYSTEM INFO =================
|
// ================= SYSTEM INFO =================
|
||||||
void printSystemUsage()
|
void printSystemUsage()
|
||||||
|
|
@ -102,16 +110,16 @@ void setup()
|
||||||
USB.begin();
|
USB.begin();
|
||||||
Keyboard.begin();
|
Keyboard.begin();
|
||||||
|
|
||||||
|
// Begin Ble mouse
|
||||||
|
bleMouse.begin();
|
||||||
|
|
||||||
|
|
||||||
// NRF SPI safety
|
// NRF SPI safety
|
||||||
//pinMode(CSN1_PIN, OUTPUT);
|
pinMode(CSN1_PIN, OUTPUT);
|
||||||
//digitalWrite(CSN1_PIN, HIGH);
|
digitalWrite(CSN1_PIN, HIGH);
|
||||||
|
|
||||||
//pinMode(CSN2_PIN, OUTPUT);
|
pinMode(CSN2_PIN, OUTPUT);
|
||||||
//digitalWrite(CSN2_PIN, HIGH);
|
digitalWrite(CSN2_PIN, HIGH);
|
||||||
deactivateNRF1();
|
|
||||||
deactivateNRF2();
|
|
||||||
|
|
||||||
RADIO_SPI = new SPIClass(FSPI);
|
RADIO_SPI = new SPIClass(FSPI);
|
||||||
RADIO_SPI->begin(NRF_SCK, NRF_MISO, NRF_MOSI);
|
RADIO_SPI->begin(NRF_SCK, NRF_MISO, NRF_MOSI);
|
||||||
|
|
|
||||||
|
|
@ -11,16 +11,14 @@
|
||||||
#include "device_check.h"
|
#include "device_check.h"
|
||||||
#include "blemouse.h"
|
#include "blemouse.h"
|
||||||
#include "sysinfo.h"
|
#include "sysinfo.h"
|
||||||
#include "BleMouse.h"
|
|
||||||
|
|
||||||
// ================= MENU DATA =================
|
// ================= MENU DATA =================
|
||||||
extern BleMouse bleMouse;
|
|
||||||
|
|
||||||
// Root menu
|
// Root menu
|
||||||
const char *mainMenuItems[] = {
|
const char *mainMenuItems[] = {
|
||||||
"BadUSB",
|
"BadUSB",
|
||||||
"RF Capture",
|
"RF Capture",
|
||||||
"NRF Tools",
|
"NRF Jammer",
|
||||||
"BLE Scan",
|
"BLE Scan",
|
||||||
"Wifi Scan",
|
"Wifi Scan",
|
||||||
"Wifi Analyzer",
|
"Wifi Analyzer",
|
||||||
|
|
@ -32,18 +30,13 @@ const char *mainMenuItems[] = {
|
||||||
|
|
||||||
Menu mainMenu = {mainMenuItems, sizeof(mainMenuItems) / sizeof(mainMenuItems[0])};
|
Menu mainMenu = {mainMenuItems, sizeof(mainMenuItems) / sizeof(mainMenuItems[0])};
|
||||||
|
|
||||||
|
|
||||||
// NRF Tools menu
|
|
||||||
const char *nrfToolsItems[] = {
|
|
||||||
"BLE Jammer",
|
|
||||||
"Bluetooth Jammer"
|
|
||||||
};
|
|
||||||
|
|
||||||
Menu nrfToolsMenu = {nrfToolsItems, sizeof(nrfToolsItems) / sizeof(nrfToolsItems[0])};
|
|
||||||
|
|
||||||
|
|
||||||
// BadUSB submenu
|
// BadUSB submenu
|
||||||
const char *badusbItems[] = {"DEMO",
|
//const char *badusbItems[] = {
|
||||||
|
// "Demo",
|
||||||
|
// "Open CMD",
|
||||||
|
// "Rickroll"};
|
||||||
|
|
||||||
|
const char *badusbItems[] = {"DEMO",
|
||||||
"KEYBOARD",
|
"KEYBOARD",
|
||||||
"HID SCRIPT",
|
"HID SCRIPT",
|
||||||
"Open Notepad",
|
"Open Notepad",
|
||||||
|
|
@ -164,15 +157,9 @@ void launchFeature()
|
||||||
printCapture();
|
printCapture();
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
// startNRFJammer();
|
startNRFJammer();
|
||||||
//startBleJammer();
|
|
||||||
//startBluetoothJammer();
|
|
||||||
currentMenu = &nrfToolsMenu;
|
|
||||||
menuIndex = 0;
|
|
||||||
menuOffset = 0;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
break;
|
|
||||||
case 3:
|
case 3:
|
||||||
ble_scan();
|
ble_scan();
|
||||||
ble_drawMenu();
|
ble_drawMenu();
|
||||||
|
|
@ -234,8 +221,6 @@ void launchFeature()
|
||||||
ESP.restart();
|
ESP.restart();
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
// Begin Ble mouse
|
|
||||||
bleMouse.begin();
|
|
||||||
ble_mouse_run();
|
ble_mouse_run();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -243,8 +228,6 @@ void launchFeature()
|
||||||
else if (currentMenu == &badusbMenu)
|
else if (currentMenu == &badusbMenu)
|
||||||
{
|
{
|
||||||
badUSBMenu(menuIndex);
|
badUSBMenu(menuIndex);
|
||||||
} else if (currentMenu == &nrfToolsMenu) {
|
|
||||||
NRFToolsMenu(menuIndex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
insideFeature = false;
|
insideFeature = false;
|
||||||
|
|
|
||||||
|
|
@ -9,161 +9,91 @@ extern SPIClass *RADIO_SPI;
|
||||||
extern RF24 radio1;
|
extern RF24 radio1;
|
||||||
extern RF24 radio2;
|
extern RF24 radio2;
|
||||||
|
|
||||||
const byte bleChannels[] = {2, 26, 80};
|
|
||||||
|
|
||||||
const byte bluetoothChannels[] = {
|
|
||||||
32, 34, 46, 48, 50, 52,
|
|
||||||
0, 1, 2, 4, 6, 8,
|
|
||||||
22, 24, 26, 28, 30,
|
|
||||||
74, 76, 78, 80
|
|
||||||
};
|
|
||||||
|
|
||||||
void initNRF(RF24 &radio)
|
void initNRF(RF24 &radio)
|
||||||
{
|
{
|
||||||
if (!radio.begin(RADIO_SPI)) {
|
radio.begin(RADIO_SPI);
|
||||||
Serial.println("NRF not found");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
radio.setAutoAck(false);
|
radio.setAutoAck(false);
|
||||||
radio.stopListening();
|
radio.stopListening();
|
||||||
radio.setRetries(0, 0);
|
|
||||||
radio.setPALevel(RF24_PA_MAX);
|
|
||||||
radio.setDataRate(RF24_2MBPS);
|
|
||||||
radio.openWritingPipe(0xE7E7E7E7E7LL);
|
|
||||||
Serial.println("NRF Initialized");
|
|
||||||
|
|
||||||
|
radio.setRetries(0, 0);
|
||||||
|
radio.setDataRate(RF24_2MBPS);
|
||||||
|
radio.setPALevel(RF24_PA_MAX);
|
||||||
|
|
||||||
|
radio.openWritingPipe(0xE7E7E7E7E7LL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void jamChannels(const char* label, int startCh, int endCh) {
|
||||||
|
byte data1[32], data2[32];
|
||||||
|
for (int i = 0; i < 32; i++) {
|
||||||
|
data1[i] = random(0, 256);
|
||||||
|
data2[i] = random(0, 256);
|
||||||
|
}
|
||||||
|
|
||||||
//void startBleJammer() {
|
for (int ch = startCh; ch <= endCh; ch++) {
|
||||||
// initNRF(radio1);
|
// Status screen
|
||||||
// initNRF(radio2);
|
u8g2.clearBuffer();
|
||||||
//
|
u8g2.drawStr(0, 10, "Jamming:");
|
||||||
// Serial.println("NRF JAMMER STARTED");
|
u8g2.setCursor(60, 10);
|
||||||
//
|
u8g2.print(label);
|
||||||
// const char payload[] = "xxxxxxxxxxxxxxxx";
|
u8g2.setCursor(0, 30);
|
||||||
//
|
u8g2.print("Channel: ");
|
||||||
// u8g2.clearBuffer();
|
u8g2.print(ch);
|
||||||
// u8g2.drawStr(0, 10, "Jamming:");
|
u8g2.sendBuffer();
|
||||||
// u8g2.setCursor(60, 10);
|
|
||||||
// u8g2.print("Bluetooth");
|
|
||||||
// u8g2.sendBuffer();
|
|
||||||
//
|
|
||||||
// while(true) {
|
|
||||||
//
|
|
||||||
// // Channels (you can change this set)
|
|
||||||
// const byte channels[] = {2, 26, 80};
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// for (int i = 0; i < sizeof(channels); i++) {
|
|
||||||
// radio1.setChannel(channels[i]);
|
|
||||||
// radio1.write(&payload, sizeof(payload));
|
|
||||||
// //radio2.setChannel(channels[i]);
|
|
||||||
// //radio2.write(&payload, sizeof(payload));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if (btnBack())
|
|
||||||
// {
|
|
||||||
// Serial.println("Jammer stopped");
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void startBluetoothJammer()
|
|
||||||
//{
|
|
||||||
// initNRF(radio1);
|
|
||||||
// initNRF(radio2);
|
|
||||||
//
|
|
||||||
// Serial.println("NRF JAMMER STARTED");
|
|
||||||
//
|
|
||||||
// const char payload[] = "xxxxxxxxxxxxxxxx";
|
|
||||||
//
|
|
||||||
// u8g2.clearBuffer();
|
|
||||||
// u8g2.drawStr(0, 10, "Jamming:");
|
|
||||||
// u8g2.setCursor(60, 10);
|
|
||||||
// u8g2.print("Bluetooth");
|
|
||||||
// u8g2.sendBuffer();
|
|
||||||
//
|
|
||||||
// while(true) {
|
|
||||||
//
|
|
||||||
// // Channels (you can change this set)
|
|
||||||
// const byte channels[] = {32, 34, 46, 48, 50, 52, 0, 1, 2, 4, 6, 8, 22, 24, 26, 28, 30, 74, 76, 78, 80};
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// for (int i = 0; i < sizeof(channels); i++) {
|
|
||||||
// radio1.setChannel(channels[i]);
|
|
||||||
// radio1.write(&payload, sizeof(payload));
|
|
||||||
// //radio2.setChannel(channels[i]);
|
|
||||||
// //radio2.write(&payload, sizeof(payload));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if (btnBack())
|
|
||||||
// {
|
|
||||||
// Serial.println("Jammer stopped");
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
void startJammer(const char* name, const byte* channels, size_t channelCount)
|
unsigned long startTime = millis();
|
||||||
|
while (millis() - startTime < JAM_DURATION) {
|
||||||
|
radio1.setChannel(ch);
|
||||||
|
radio1.stopListening();
|
||||||
|
radio1.write(data1, sizeof(data1));
|
||||||
|
delayMicroseconds(100);
|
||||||
|
|
||||||
|
radio2.setChannel(ch);
|
||||||
|
radio2.stopListening();
|
||||||
|
radio2.write(data2, sizeof(data2));
|
||||||
|
delayMicroseconds(100);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void nrfJammerSweep()
|
||||||
|
{
|
||||||
|
static uint8_t ch1 = 0;
|
||||||
|
static uint8_t ch2 = 124;
|
||||||
|
|
||||||
|
uint8_t payload[32] = {0xFF};
|
||||||
|
|
||||||
|
radio1.setChannel(ch1);
|
||||||
|
radio1.writeFast(payload, sizeof(payload));
|
||||||
|
|
||||||
|
radio2.setChannel(ch2);
|
||||||
|
radio2.writeFast(payload, sizeof(payload));
|
||||||
|
|
||||||
|
ch1++;
|
||||||
|
ch2--;
|
||||||
|
|
||||||
|
if (ch1 > 124) ch1 = 0;
|
||||||
|
if (ch2 > 124) ch2 = 124;
|
||||||
|
}
|
||||||
|
|
||||||
|
void startNRFJammer()
|
||||||
{
|
{
|
||||||
initNRF(radio1);
|
initNRF(radio1);
|
||||||
initNRF(radio2);
|
initNRF(radio2);
|
||||||
|
|
||||||
Serial.println("NRF JAMMER STARTED");
|
Serial.println("NRF JAMMER STARTED");
|
||||||
|
// nrfJammerSweep();
|
||||||
|
jamChannels("Bluetooth", 0, 78);
|
||||||
|
|
||||||
const char payload[] = "xxxxxxxxxxxxxxxx";
|
|
||||||
|
|
||||||
u8g2.clearBuffer();
|
if (btnBack())
|
||||||
u8g2.drawStr(0, 10, "Jamming:");
|
|
||||||
u8g2.setCursor(60, 10);
|
|
||||||
u8g2.print(name);
|
|
||||||
u8g2.sendBuffer();
|
|
||||||
|
|
||||||
while (true)
|
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < channelCount; i++)
|
Serial.println("Jammer stopped");
|
||||||
{
|
return;
|
||||||
radio1.setChannel(channels[i]);
|
|
||||||
radio1.write(&payload, sizeof(payload));
|
|
||||||
|
|
||||||
// Optional second NRF
|
|
||||||
// radio2.setChannel(channels[i]);
|
|
||||||
// radio2.write(&payload, sizeof(payload));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (btnBack())
|
|
||||||
{
|
|
||||||
Serial.println("Jammer stopped");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void NRFToolsMenu(int index) {
|
delayMicroseconds(200);
|
||||||
switch (index) {
|
|
||||||
case 0:
|
|
||||||
// startBleJammer();
|
|
||||||
// BLE
|
|
||||||
startJammer(
|
|
||||||
"BLE",
|
|
||||||
bleChannels,
|
|
||||||
sizeof(bleChannels)
|
|
||||||
);
|
|
||||||
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
// startBluetoothJammer();
|
|
||||||
// Bluetooth
|
|
||||||
startJammer(
|
|
||||||
"Bluetooth",
|
|
||||||
bluetoothChannels,
|
|
||||||
sizeof(bluetoothChannels)
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,10 @@
|
||||||
// Initialization
|
// Initialization
|
||||||
void initNRF(RF24 &radio);
|
void initNRF(RF24 &radio);
|
||||||
|
|
||||||
void startBluetoothJammer();
|
// Jammer modes
|
||||||
void startBleJammer();
|
void startNRFJammer(); // dual-radio sweep jammer
|
||||||
|
void stopNRFJammer(); // (optional, for future)
|
||||||
|
|
||||||
void startJammer(const char* name, const byte* channels, size_t channelCount);
|
// Advanced (later)
|
||||||
|
void nrfJammerSweep(); // internal, but can expose if needed
|
||||||
void NRFToolsMenu(int index);
|
void nrfSetChannel(uint8_t ch);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue