A proof-of-concept tool demonstrating ARP poisoning attacks combined with FTP traffic monitoring and credential harvesting. This project is designed for educational purposes and penetration testing in controlled environments.
This tool is intended for educational purposes and authorized penetration testing only. Use only on networks you own or have explicit permission to test. Unauthorized use is illegal and unethical.
- ARP Poisoning: Performs man-in-the-middle attacks by poisoning ARP tables
- FTP Traffic Monitoring: Captures and analyzes FTP control and data channels
- Credential Harvesting: Extracts FTP usernames and passwords from intercepted traffic
- File Transfer Monitoring: Tracks file uploads and downloads
- Dockerized Environment: Complete testing environment with FTP server and client
- Signal Handling: Graceful cleanup and ARP table restoration on exit
The project consists of several Go modules:
main.go
: Entry point and command-line argument parsingarp/
: ARP poisoning functionalityftp/
: FTP traffic monitoring and analysisparse/
: Argument validation and data structuressignals/
: Signal handling for graceful shutdownutils/
: Utility functions for interface detection and permissions
- Docker and Docker Compose
- Root/Administrator privileges (for packet capture)
-
Clone and build the environment:
git clone <repository-url> cd inquisitor docker-compose up -d
-
Get container network information:
# Get IP addresses and MAC addresses of containers docker exec ftp-server ip addr show eth0 docker exec ftp-client ip addr show eth0
-
Start the attack from the attacker container:
docker exec -it attacker ./inquisitor \ -ipsrc <ftp-server-ip> \ -macsrc <ftp-server-mac> \ -ipdst <ftp-client-ip> \ -macdst <ftp-client-mac> \ -v
-
Test FTP traffic from client container:
docker exec -it ftp-client ftp <ftp-server-ip> # Login with: ftptest / testpass # Try downloading: get test.txt
# Install dependencies
go mod download
# Build the binary
go build -o inquisitor .
# Run with root privileges
sudo ./inquisitor -ipsrc <source-ip> -macsrc <source-mac> -ipdst <dest-ip> -macdst <dest-mac> -v
./inquisitor [options]
Options:
-ipsrc string Source IP address (FTP server)
-macsrc string Source MAC address (FTP server)
-ipdst string Destination IP address (FTP client)
-macdst string Destination MAC address (FTP client)
-v Enable verbose output
# Basic ARP poisoning with FTP monitoring
sudo ./inquisitor \
-ipsrc 192.168.1.100 \
-macsrc 00:11:22:33:44:55 \
-ipdst 192.168.1.101 \
-macdst 66:77:88:99:aa:bb \
-v
# The tool will:
# 1. Start ARP poisoning between the two hosts
# 2. Monitor FTP traffic on port 21
# 3. Extract credentials and file transfer information
# 4. Display captured data in real-time
The Docker Compose setup creates three containers:
ftp-server
: vsftpd server with test user (ftptest:testpass
)ftp-client
: Client container for testing FTP connectionsattacker
: Container running the inquisitor tool
- Username:
ftptest
- Password:
testpass
- Test file:
/home/ftptest/files/test.txt
- Usernames from
USER
commands - Passwords from
PASS
commands - Login attempts and success/failure status
- File downloads (
RETR
command) - File uploads (
STOR
,APPE
,STOU
commands) - Directory listings (
LIST
,NLST
commands) - Directory changes (
CWD
command)
- Source and destination IP addresses
- Client and server port numbers
- Data transfer volumes
- Root Privileges: Required for raw packet capture and injection
- Network Impact: ARP poisoning can disrupt network connectivity
- Detection: Modern networks may detect ARP poisoning attempts
- Cleanup: Tool automatically restores ARP tables on exit
- Continuously sends forged ARP replies
- Associates attacker's MAC with target IPs
- Redirects traffic through attacker's machine
- Restores original ARP entries on shutdown
- Uses libpcap for packet capture
- Filters traffic on ports 21 (control) and 20 (data)
- Parses FTP commands and responses
- Tracks connection states and file transfers
-
Permission Denied
# Ensure running with root privileges sudo ./inquisitor [options]
-
Interface Not Found
# Check available interfaces ip addr show # Tool auto-detects interface based on target IP
-
No Traffic Captured
# Verify network connectivity ping <target-ip> # Check if FTP traffic is actually flowing
- Understanding ARP protocol vulnerabilities
- Learning about man-in-the-middle attacks
- Demonstrating insecure protocol risks (FTP)
- Network security assessment training
- Penetration testing methodology
This is a proof-of-concept tool. Contributions for educational improvements are welcome:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is for educational purposes only. Use responsibly and only on networks you own or have explicit permission to test.
Remember: Always obtain proper authorization before testing on any network. Unauthorized network attacks are illegal and can result in serious legal consequences.