A Python-based DNS server that can receive and reconstruct data transmitted through DNS queries. This tool is useful for data exfiltration scenarios where traditional network communication methods are restricted.
- Receives data chunks through DNS queries
- Reconstructs data from base64-encoded chunks
- Configurable chunk size and total data size limits
- Colored console output for better visibility
- File and console logging
- Rate limiting to prevent DoS attacks
- Configurable through a central configuration file
- Clone the repository:
git clone https://github.com/yourusername/DNS-Exfiltration.git
cd DNS-Exfiltration
- Install dependencies:
pip install -r requirements.txt
Run the server with default settings:
python server.py -o output.txt
Run the server with custom port:
python server.py -o output.txt -p 5353
-o, --output
: Path to the output file (required)-p, --port
: Server listening port (default: 53)
The server can be configured through the config.py
file. Available settings include:
- Port number
- Server address
- Maximum chunk size
- Maximum total data size
- Chunk timeout
- Log directory
- Output directory
- Authentication requirements
- Rate limiting
- The server includes rate limiting to prevent DoS attacks
- Optional authentication can be enabled
- Configurable size limits to prevent memory issues
- Input validation for all parameters
Logs are stored in the logs
directory with timestamps. Both file and console logging are supported.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.