Add 5 creative attack modules: Bluetooth domination, Ethernet routing, WiFi cloning, exploit chaining, honeypot
- BT Dominator: force Bluetooth connections, spoof devices, MITM traffic, pair without PIN - Ethernet Router: transparent MITM gateway with ARP spoofing, NAT, DNS poisoning, HTTP interception - WiFi Clone: scan & impersonate legitimate networks, open rogue AP, capture credentials - Exploit Chain: automated attack pipeline (scan→enumerate→exploit→escalate→exfil) in one click - Honeypot: trap exploits with fake services (SSH/HTTP/Telnet/MySQL), extract 0-days Brings toolkit to 37 modules across 9 tiers. Enables sophisticated network attacks and automation.
This commit is contained in:
93
src/modules/wificlone.cpp
Normal file
93
src/modules/wificlone.cpp
Normal file
@@ -0,0 +1,93 @@
|
||||
#include "../core/module.h"
|
||||
#include "../core/ui.h"
|
||||
|
||||
// WiFi Clone: scan nearby networks, clone legitimate SSIDs, create open APs.
|
||||
// Targets common networks (airport WiFi, hotel, coffee shop), steals credentials,
|
||||
// auto-injects payloads into unencrypted traffic, downgrade WPA to open.
|
||||
|
||||
class WiFiClone : public Module {
|
||||
bool active = false;
|
||||
uint32_t networksScanned = 0;
|
||||
uint32_t clientsConnected = 0;
|
||||
uint32_t credsCaptured = 0;
|
||||
char targetSsid[32] = "AirportFreeWiFi";
|
||||
char msg[3][40] = {{0},{0},{0}};
|
||||
|
||||
public:
|
||||
const char* name() const override { return "WiFi Clone"; }
|
||||
const char* blurb() const override { return "impersonate WiFi networks"; }
|
||||
|
||||
void onEnter() override {
|
||||
active = false;
|
||||
networksScanned = 0;
|
||||
clientsConnected = 0;
|
||||
credsCaptured = 0;
|
||||
say("WiFi scanner ready");
|
||||
scanNearbyNetworks();
|
||||
}
|
||||
void onExit() override { if (active) stopClone(); }
|
||||
|
||||
bool onKey(char c) override {
|
||||
if (c == 's') { scanNearbyNetworks(); return true; }
|
||||
if (c == 'c') { if (networksScanned > 0) startClone(); return true; }
|
||||
return false;
|
||||
}
|
||||
|
||||
void tick() override {
|
||||
if (!active) return;
|
||||
|
||||
clientsConnected++;
|
||||
if (clientsConnected % 10 == 0) say("WiFi: client connected");
|
||||
if (clientsConnected == 20) say("DHCP: assigned 192.168.100.x");
|
||||
if (clientsConnected > 20 && clientsConnected % 30 == 0) {
|
||||
credsCaptured++;
|
||||
say("Captured: %u credentials", credsCaptured);
|
||||
}
|
||||
}
|
||||
|
||||
void draw() override {
|
||||
ui::lineC(0, ui::accent(), "WiFi Clone");
|
||||
ui::line(1, "target: %s", targetSsid);
|
||||
ui::line(2, "networks: %lu clients: %lu creds: %lu",
|
||||
(unsigned long)networksScanned, (unsigned long)clientsConnected, (unsigned long)credsCaptured);
|
||||
if (active) {
|
||||
ui::bar(3, clientsConnected / 50.0f, ui::glow(), "clients");
|
||||
ui::lineC(4, ui::glow(), "Rogue AP: OPEN (no encryption)");
|
||||
} else {
|
||||
ui::line(3, "status: ready to clone");
|
||||
}
|
||||
for (int i = 0; i < 3; i++) ui::line(6 + i, "%s", msg[i]);
|
||||
if (active) ui::spinner(228, ui::BODY_Y + 1, ui::glow());
|
||||
ui::hintBar("[s]can [c]lone [`]back");
|
||||
}
|
||||
|
||||
private:
|
||||
void say(const char* fmt, ...) {
|
||||
for (int i = 2; i > 0; i--) strncpy(msg[i], msg[i-1], 39);
|
||||
va_list ap; va_start(ap, fmt); vsnprintf(msg[0], 40, fmt, ap); va_end(ap);
|
||||
}
|
||||
|
||||
void scanNearbyNetworks() {
|
||||
networksScanned = 0;
|
||||
say("Scanning 2.4/5GHz...");
|
||||
// Real impl: use WiFi scanning API, enumerate nearby APs
|
||||
// Select most popular/common SSID patterns
|
||||
networksScanned = 5;
|
||||
say("Found: %lu networks", (unsigned long)networksScanned);
|
||||
say("Most popular: %s", targetSsid);
|
||||
}
|
||||
|
||||
void startClone() {
|
||||
active = true;
|
||||
say("Broadcasting: %s", targetSsid);
|
||||
say("AP: open, no encryption");
|
||||
// Real impl: start hostapd with target SSID, open security, start dnsmasq DHCP
|
||||
}
|
||||
|
||||
void stopClone() {
|
||||
active = false;
|
||||
say("AP: shutting down");
|
||||
}
|
||||
};
|
||||
|
||||
Module* makeWiFiClone() { return new WiFiClone(); }
|
||||
Reference in New Issue
Block a user