Skip to content

An ESP32-WROOM-based Wi-Fi Device Sniffer that captures nearby device MAC addresses and signal strengths using promiscuous mode.

License

Notifications You must be signed in to change notification settings

SulaimanNiazi/ESP32_Simple_WiFi_Sniffer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ESP32 Wi-Fi Device Sniffer

An ESP32-WROOM-based Wi-Fi Device Sniffer that passively detects nearby devices by capturing their MAC addresses and signal strength (RSSI) using promiscuous mode.


πŸ”§ Features

  • Detects devices broadcasting on 2.4GHz Wi-Fi
  • Displays MAC address, RSSI, and last seen time
  • Uses ESP32's hardware promiscuous mode
  • Optional button to display all detected devices
  • Works offline without connecting to any Wi-Fi network

πŸ“¦ Requirements

  • ESP32-WROOM board
  • Arduino IDE with ESP32 board support
  • Micro USB cable

πŸ›  Wiring

ESP32 Pin Purpose
GPIO0 Display button (BOOT)
GND Button GND side

Optional: You can connect a push button between GPIO0 and GND to print the list of detected devices.


πŸ“² Installation

  1. Install Arduino IDE

  2. Add ESP32 board support via Board Manager:

    • Board URL: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
  3. Install the following libraries (should be built-in):

    • WiFi.h
    • esp_wifi.h
  4. Upload the sketch to your ESP32 board


▢️ How It Works

  • ESP32 is set to WIFI_MODE_NULL to disable connections
  • Promiscuous mode is enabled to capture all Wi-Fi packets
  • MAC addresses from management frames are extracted
  • Detected devices are stored in a list with their RSSI
  • Pressing GPIO0 (BOOT) prints the current device list

πŸ§ͺ Example Output

πŸš€ Starting WiFi sniffer...
[NEW] 92:14:36:FA:B2:77 RSSI: -45
[NEW] D8:BC:38:49:A1:CC RSSI: -70
πŸ“‹ Known devices:
  92:14:36:FA:B2:77 RSSI: -45 Last seen: 5 sec ago
  D8:BC:38:49:A1:CC RSSI: -70 Last seen: 10 sec ago

⚠️ Limitations

  • Only captures devices using 2.4GHz Wi-Fi
  • MAC randomization by modern phones may affect accuracy
  • Does not decode payloads or establish connections
  • Locked to a specific channel (default: 6)

πŸ’‘ Future Ideas

  • Channel hopping to capture on all Wi-Fi channels
  • Web server to view devices on a browser
  • Logging to SD card or serial monitor

πŸ“„ License

MIT License. Free to use and modify.


Contributions welcome!

About

An ESP32-WROOM-based Wi-Fi Device Sniffer that captures nearby device MAC addresses and signal strengths using promiscuous mode.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages