https://github.com/maxime-vincent/spiffer
Set up your Raspberry PI as a Network Analyser / Sniffer / MITM
https://github.com/maxime-vincent/spiffer
men-in-the-middle mitm mitm-server network network-analysis packet-sniffer pi raspberry raspberry-pi-4 raspberry-pi-5 raspberrypi sniffer sniffer-packet spiffer
Last synced: 2 months ago
JSON representation
Set up your Raspberry PI as a Network Analyser / Sniffer / MITM
- Host: GitHub
- URL: https://github.com/maxime-vincent/spiffer
- Owner: Maxime-Vincent
- Created: 2024-10-22T19:37:15.000Z (8 months ago)
- Default Branch: V1.0
- Last Pushed: 2025-02-06T16:27:13.000Z (4 months ago)
- Last Synced: 2025-03-30T12:16:42.789Z (2 months ago)
- Topics: men-in-the-middle, mitm, mitm-server, network, network-analysis, packet-sniffer, pi, raspberry, raspberry-pi-4, raspberry-pi-5, raspberrypi, sniffer, sniffer-packet, spiffer
- Language: JavaScript
- Homepage:
- Size: 1.46 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sPIffer
> [!NOTE]
> Some dependencies are needed if you choose not to install it using the ```requirements.sh```:
> - tshark: ```sudo apt-get install tshark```
> - iptables: ```sudo apt-get install iptables```
> - bridge-utils: ```sudo apt-get install bridge-utils```
> - nodejs: ```sudo apt-get install nodejs```
> - npm: ```sudo apt-get install npm```
> - libpam0g-dev: ```sudo apt-get install libpam0g-dev```## Script Description
This package configures network forwarding on a Raspberry Pi by setting up a bridge (br0) between two added Ethernet interfaces (eth1 and eth2). It also enables traffic capture beyond the bridge (br0) which is in promiscuous mode.
## Key Features
1. Remove Existing Bridges: The script starts by clearing any pre-existing network bridges to ensure a clean setup.
2. Check Network Interfaces: It verifies the availability of the required interfaces (eth0, eth1, and eth2) to ensure they are active and ready for configuration.
3. Enable IP Forwarding: The script enables IP forwarding, allowing packets to be routed between the interfaces.
4. Create a Bridge: It creates a new bridge named br0 and attaches eth1 and eth2 to it, facilitating the transfer of traffic between these two interfaces.
5. It launches a web server that allows the user to start capturing and downloading network traffic.
## Use Case
This setup is ideal for scenarios where network traffic analysis is needed, such as monitoring for performance, security, or debugging purposes. By capturing traffic in real-time, users can gain insights into data flow and network behavior.## Manual installation
### First network configuration
#!/bin/sh
IP_ADDR=$1
cat < \/etc\/network\/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source /etc/network/interfaces.d/*
auto eth0
iface eth0 inet static
address $IP_ADDR
netmask 255.255.255.0
gateway 0.0.0.0
sudo systemctl disable dhcpcd
sudo systemctl stop dhcpcd
EOF### Move sPIffer folder inside /home
sudo mv /home
### Install packages required
sudo ./requirements.sh
### Create certificate with openssl
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.crt -config openssl.cnf
sudo mv server.key /home/sPIffer/src/certificate
sudo mv server.crt /home/sPIffer/src/certificate### Install npm node modules
sudo npm install
### Launch Server
sudo node server.js
or
sudo npm start