A NAT router with an FTP honeypot using a canarytoken

Overview

ESP8266_Router_Honeypot

A NAT router with an FTP honeypot using a canarytoken by @spacehuhn and @kodykinzie based on the espcanary library.

Requirements:

  • Wi-Fi network with internet to connect the ESP.

  • Arduino IDE with the following URL added under Preferences -> Additional board manager URL's: http://arduino.esp8266.com/stable/package_esp8266com_index.json

  • ESP8266 boards added in Arduino IDE by going to Tools -> Boards -> Boards Manager, and installing ESP8266 by ESP8266 Community

  • ESPcanary library installed in Arduino IDE by going to Sketch -> Include Library -> Manage Libraries and installing "ESPcanary" by Dan Hoover

Setup:

Git clone or download the ZIP file from this GitHub repo and open the ESP8266_Router_Honeypot.ino sketch in Arduino IDE. Replace the variables below with the Wi-Fi network information:

Alt text

#define STASSID "Your_Wifi_Network_Name" // set the SSID (name) of the Wi-Fi network the ESP8266 will connect to for internet

#define STAPSK "Your_Wifi_Network_Password" // set the password of the Wi-Fi network the ESP8266 will connect to for internet

#define NEWSSID "honeypot_Wifi_Name" // set the name (SSID) of the Wi-Fi network the ESP8266 will create

#define NEWPASS "honeypot_Wifi_Password" // set the password of the Wi-Fi network the ESP8266 will create

Next, got to Canarytokens.org and create a "Web bug" token. Copy the URL and paste it in the part of the code below, while setting the username and password for the honeypot FTP server:

Alt text

String canary = "Your_Canarytoken_URL"; //grab FREE web bug/URL tokens at http://canarytokens.org

String ftp_user = "admin"; //if you replace this with "%" it will accept ANY username

String ftp_pass = "password"; //if you replace this with "%" it will accept ANY password

Now, plug in your ESP8266 based device and select the correct board under Tools -> Board. Select the serial port the board is attached to under Tools -> Port.

Finally, press the green arrow to flash the software to the board.

Once it's done, open the serial monitor and set the baud rate to 115200, then press the reset button to watch the board boot.

You might also like...
This repo contains Direct3D 9, Direct3D 10, a few Direct3D 11, and DirectSound C++ samples from the legacy DirectX SDK updated to build using the Windows 10 SDK and the Microsoft.DXSDK.D3DX NuGet package

DirectX SDK Legacy Samples This repo contains Direct3D 9, Direct3D 10, a few Direct3D 11, and DirectSound samples that originally shipped in the legac

Which companies are using Flutter in Turkey πŸ‡ΉπŸ‡·
Which companies are using Flutter in Turkey πŸ‡ΉπŸ‡·

Which companies are using Flutter in Turkey πŸ‡ΉπŸ‡· You can easily see which companies are using Flutter in Turkey. Also, you can easily handle your Flut

A simple tcp tunnel on c using sockets Right now it only supports linux systems

A simple tcp tunnel on c using sockets Right now it only supports linux systems build BY MAKE mkdir build make cd build ./tunnel.o localport rem

A tiny example how to work with ZigBee stack using JN5169 microcontroller
A tiny example how to work with ZigBee stack using JN5169 microcontroller

Hello NXP JN5169 ZigBee World This is a tiny example how to work with ZigBee stack using JN5169 microcontroller. The example implements a smart switch

Example how to run eBPF probes without a usermode process using fentry

Pinning eBPF Probes Simple example to demonstrate how to pin kernel function and syscall probes. Overview From my reading of the kernel code, KProbe a

owfuzz: a WiFi protocol fuzzing tool using openwifi.
owfuzz: a WiFi protocol fuzzing tool using openwifi.

Openwifi is an open-source WiFi protocol stack based on SDR that is fully compatible with Linux mac80211. It's driver takes advantage of the Linux kernel's supports (mac80211, cfg80211) for WiFi high MAC, so it can provide an interface to the application layer like a common WiFi USB dongle.

Linux Terminal Service Manager (LTSM) is a set of service programs that allows remote computers to connect to a Linux operating system computer using a remote terminal session (over VNC or RDP)
Linux Terminal Service Manager (LTSM) is a set of service programs that allows remote computers to connect to a Linux operating system computer using a remote terminal session (over VNC or RDP)

Linux Terminal Service Manager (LTSM) is a set of service programs that allows remote computers to connect to a Linux operating system computer using a remote terminal session (over VNC)

Using Visual Studio C++ to read IP addresses and comport number (Serial number) on Windows platform

Using Visual Studio C++ to read IP addresses on Windows platform

Simple server and client using python socket and declarative programming

Socket-programming Simple server and client using python socket and declarative programming How to use? open cmd and navigate to the location of the s

Comments
  • Undefined reference to 'dhcp_set_dns'

    Undefined reference to 'dhcp_set_dns'

    c:/users/user/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\user\AppData\Local\Temp\arduino-sketch-B2DFF35DFBCC04C8720AC622751D0BA2\sketch\ESP8266_Router_Honeypot.ino.cpp.o:(.text.setup+0x5c): undefined reference to dhcps_set_dns' c:/users/user/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\user\AppData\Local\Temp\arduino-sketch-B2DFF35DFBCC04C8720AC622751D0BA2\sketch\ESP8266_Router_Honeypot.ino.cpp.o: in function_ZN14HardwareSerial5beginEm': C:\Users\user\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\cores\esp8266/HardwareSerial.h:76: undefined reference to dhcps_set_dns' c:/users/user/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\user\AppData\Local\Temp\arduino-sketch-B2DFF35DFBCC04C8720AC622751D0BA2\sketch\ESP8266_Router_Honeypot.ino.cpp.o: in functionsetup': C:\Users\user\Documents\Arduino\ESP8266_Router_Honeypot-main\ESP8266_Router_Honeypot/ESP8266_Router_Honeypot.ino:56: undefined reference to `dhcps_set_dns' collect2.exe: error: ld returned 1 exit status

    opened by Thousif10 2
  • newssid displaying wrong

    newssid displaying wrong

    hello. my device is generating a ssid called ESP-XXXXX which is th mac address. I have set the NEWSSID as #define NEWSSID "Hotspot" // set the name (SSID) of the Wi-Fi network the ESP8266 will create

    I am assuming this is not a comment and should have the # in front. I appreciate your assistance. no rush.

    opened by mtwebmaster 3
  • Grabbing HOSTNAME?

    Grabbing HOSTNAME?

    Just saw your video, awesome work. However, for the local IP, I think this would sometimes be hard to identify.

    Would it be possible to grab the hostname or mac address of the device and add that to the canary tolken?

    Might be hard to do since it would have to be run separately from the FTP service.

    opened by ITCMD 1
Owner
Skickar
I'm a computer. Science student.
Skickar
C++ FTP Server Library for Windows, Linux & more

fineFTP Server FineFTP is a minimal FTP server library for Windows and Unix flavors. The project is CMake based and only depends on asio, which is int

Continental 1 Nov 22, 2022
Reliable & unreliable messages over UDP. Robust message fragmentation & reassembly. P2P networking / NAT traversal. Encryption.

GameNetworkingSockets GameNetworkingSockets is a basic transport layer for games. The features are: Connection-oriented API (like TCP) ... but message

Valve Software 6.4k Dec 30, 2022
Zigbee 🐝 Router for Xiaomi DGNWG05LM and Aqara ZHWG11LM gateways.

Lumi Router (JN5169) This firmware is a replacement for the original firmware for the Zigbee chip JN5169 on Xiaomi DGNWG05LM and Aqara ZHWG11LM gatewa

Igor Listopad 39 Dec 8, 2022
zrp is a nat-passthrough reverse proxy written in modern c++.

zrp is a nat-passthrough reverse proxy written in modern c++. A major use case is to expose a local server via a remote server with public IP.

Coleman 12 Oct 27, 2022
A program that implements the forwading of packets from a router.

Nume: Dragne Lavinia-Stefana Grupa: 324 CA PROTOCOALE DE COMUNICATIE Tema #1 - Router Continutul proiectului este urmatorul: - dir

null 1 Jun 22, 2022
Node-portmapping allows to forward ports on Network Address Translators (NAT)

Multi-protocol NAT Port Mapping for Node.js node-portmapping allows to forward ports on Network Address Translators (NAT). It implements the protocols

Paul-Louis Ageneau 5 Jun 24, 2022
Raven is like a simplified SSH with NAT traversal.

Raven Raven works like a simplified SSH with NAT traversal. Now developing... But you can still have a test for fun! Just fill server_ip in Raven.conf

null 4 Oct 26, 2022
The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.

Welcome! The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design

Microsoft 7.2k Dec 30, 2022
Single C file TLS 1.2/1.3 implementation, using tomcrypt as crypto library

TLSe Single C file TLS 1.3, 1.2, 1.1 and 1.0(without the weak ciphers) implementation, using libtomcrypt as crypto library. It also supports DTLS 1.2

Eduard Suica 481 Dec 31, 2022
Simple conservative GC using mimalloc

migc Small and simple library that implements conservative GC using mimalloc API. Features Small and tiny. libmigc.so is just 20KB when linked with mi

playX 34 Jan 1, 2023