This guide covers common issues and their solutions when using GoSpoof.
Common Issues
1. Port Binding Issues
Error: “Address already in use”
Error: listen tcp :4444: bind: address already in use
Solution:
- Check if another process is using the port:
sudo lsof -i :4444
- Kill the process or choose a different port:
./goSpoof -p 4445
2. iptables Configuration
Error: “Permission denied”
Error: permission denied when setting up iptables
Solution:
- Run with sudo:
sudo ./goSpoof -sT 4444
- Or manually configure iptables:
sudo iptables -t nat -A PREROUTING -p tcp -m tcp --dport 1:65535 -j REDIRECT --to-ports 4444
Error: “Traffic not redirecting”
Solution:
- Reset iptables:
./goSpoof -fT
- Reconfigure iptables:
./goSpoof -sT 4444
3. Logging Issues
Error: “Cannot write to log file”
Error: cannot write to log file: permission denied
Solution:
- Check file permissions:
sudo chown $USER:$USER /path/to/logfile.log
- Ensure directory exists:
sudo mkdir -p /var/log/gospoof
sudo chown $USER:$USER /var/log/gospoof
4. Honeypot Mode Issues
Error: “Honeypot mode not working”
Solution:
- Ensure correct flag usage:
./goSpoof -honey Y
- Check log file permissions if using
-l
:
./goSpoof -honey Y -l /var/log/gospoof/honeypot.log
5. Port Range Configuration
Error: “Invalid port range”
Solution:
- Check port range format:
# Correct format
./goSpoof -sP "1-1000"
./goSpoof -sP "22,80,443"
# Incorrect format
./goSpoof -sP "1 to 1000"
./goSpoof -sP "22 80 443"
- Verify iptables port range format:
# Correct format
./goSpoof -sT 4444 -r "1:1000"
# Incorrect format
./goSpoof -sT 4444 -r "1-1000"
6. Rubber Glue Mode
Error: “Rubber glue mode not working”
Solution:
- Ensure it’s used as a standalone flag:
# Correct usage
./goSpoof -rg
# Incorrect usage
./goSpoof -rg -honey Y
Configuration Issues
1. YAML Configuration Errors
Symptoms:
- Configuration not loading
- Invalid configuration errors
Solutions:
- Validate YAML syntax:
yamllint config.yaml
- Check configuration format:
# Correct format
services:
- port: 22
banner: "SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.5"
# Incorrect format
services:
port: 22
banner: "SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.5"
2. Service Response Issues
Symptoms:
- Incorrect service banners
- Missing responses
Solutions:
- Verify service configuration:
services:
- port: 22
banner: "SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.5"
- Test individual services:
nc -v localhost 22
Network Issues
1. Connection Problems
Symptoms:
- Can’t connect to GoSpoof
- Port not responding
Solutions:
- Check firewall rules:
sudo iptables -L
- Verify port binding:
netstat -tulpn | grep goSpoof
Getting Help
If you’re still experiencing issues:
- Check the Configuration Guide
- Review Basic Usage
- Visit the GitHub Issues
- Join the Black Hills InfoSec Discord