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

Add support for pipx #283

Closed
wants to merge 7 commits into from
Closed
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@
# Generated certificates and keys
certs/*.crt
certs/*.key

build/*
responder.egg-info/*
10 changes: 10 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
include MANIFEST.in
include LICENSE
include CHANGELOG.md
include README.md
include OSX_launcher

include Responder/Responder.conf
include Responder/certs/*
include Responder/files/*
include Responder/logs/*
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,17 @@ Edit this file /etc/NetworkManager/NetworkManager.conf and comment the line: `dn

launchctl unload /System/Library/LaunchDaemons/com.apple.netbiosd.plist

## Installation ##
Resopnder an be can be installed with `pipx`
```
git clone https://github.com/lgandx/Responder
cd Responder
pipx ensurepath
pipx install .

sudo $(which responder) -I <interface>
```

## Usage ##

First of all, please take a look at Responder.conf and tweak it for your needs.
Expand Down
681 changes: 681 additions & 0 deletions Responder/CHANGELOG.md

Large diffs are not rendered by default.

76 changes: 76 additions & 0 deletions Responder/Contributors
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
Commits | user
15 @jrmdev
7 @nobbd
6 @ValdikSS
6 @also-here
5 @HexPandaa
5 @exploide
5 @jvoisin
4 @Clément Notin
4 @Shutdown
4 @Yannick Méheut
3 @Hank Leininger
3 @brightio
3 @byt3bl33d3r
3 @myst404
3 @skelsec
2 @Alexandre ZANNI
2 @Crypt0-M3lon
2 @Laban Sköllermark
2 @Matthew Daley
2 @Pixis
2 @Rob Fuller
2 @ThePirateWhoSmellsOfSunflowers
2 @Vincent Yiu
2 @requin
1 @Andrii Nechytailov
1 @Antonio Herraiz
1 @Chris Maddalena
1 @Euan
1 @Garret Picchioni
1 @Gifts
1 @Gustaf Blomqvist
1 @Hubert Seiwert
1 @IMcPwn
1 @Jared Haight
1 @Jim Shaver
1 @Khiem Doan
1 @Leon Jacobs
1 @Lionel PRAT
1 @Markus
1 @MatToufoutu
1 @Matt
1 @Matt Andreko
1 @Matt Kelly
1 @Nikos Vassakis
1 @OJ
1 @Paul A
1 @Randy Ramos
1 @SAERXCIT
1 @Sagar-Jangam
1 @Sans23
1 @Sophie Brun
1 @Stephen Shkardoon
1 @Syntricks
1 @Timon Hackenjos
1 @Tom Aviv
1 @Ziga P
1 @cweedon
1 @deltronzero
1 @f3rn0s
1 @jackassplus
1 @jb
1 @kevintellier
1 @kitchung
1 @klemou
1 @lanjelot
1 @nickyb
1 @nodauf
1 @nop5L3D
1 @pixis
1 @ravenium
1 @soa
1 @steven
1 @thejosko
1 @trustedsec

File renamed without changes.
File renamed without changes.
File renamed without changes.
54 changes: 27 additions & 27 deletions Responder.py → Responder/Responder.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
except:
from socketserver import TCPServer, UDPServer, ThreadingMixIn
from threading import Thread
from utils import *
from Responder.utils import *
import struct
import Responder.settings as settings
banner()

parser = optparse.OptionParser(usage='python %prog -I eth0 -w -d\nor:\npython %prog -I eth0 -wd', version=settings.__version__, prog=sys.argv[0])
Expand Down Expand Up @@ -273,7 +274,6 @@ def serve_thread_tcp_auth(host, port, handler):

def serve_thread_SSL(host, port, handler):
try:

cert = os.path.join(settings.Config.ResponderPATH, settings.Config.SSLCert)
key = os.path.join(settings.Config.ResponderPATH, settings.Config.SSLKey)
context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
Expand All @@ -300,110 +300,110 @@ def main():

# Load (M)DNS, NBNS and LLMNR Poisoners
if settings.Config.LLMNR_On_Off:
from poisoners.LLMNR import LLMNR
from Responder.poisoners.LLMNR import LLMNR
threads.append(Thread(target=serve_LLMNR_poisoner, args=('', 5355, LLMNR,)))

if settings.Config.NBTNS_On_Off:
from poisoners.NBTNS import NBTNS
from Responder.poisoners.NBTNS import NBTNS
threads.append(Thread(target=serve_NBTNS_poisoner, args=('', 137, NBTNS,)))

if settings.Config.MDNS_On_Off:
from poisoners.MDNS import MDNS
from Responder.poisoners.MDNS import MDNS
threads.append(Thread(target=serve_MDNS_poisoner, args=('', 5353, MDNS,)))

#// Vintage Responder BOWSER module, now disabled by default.
#// Generate to much noise & easily detectable on the network when in analyze mode.
# Load Browser Listener
#from servers.Browser import Browser
#from Responder.servers.Browser import Browser
#threads.append(Thread(target=serve_thread_udp_broadcast, args=('', 138, Browser,)))

if settings.Config.HTTP_On_Off:
from servers.HTTP import HTTP
from Responder.servers.HTTP import HTTP
threads.append(Thread(target=serve_thread_tcp, args=(settings.Config.Bind_To, 80, HTTP,)))

if settings.Config.WinRM_On_Off:
from servers.WinRM import WinRM
from Responder.servers.WinRM import WinRM
threads.append(Thread(target=serve_thread_tcp, args=(settings.Config.Bind_To, 5985, WinRM,)))

if settings.Config.WinRM_On_Off:
from servers.WinRM import WinRM
from Responder.servers.WinRM import WinRM
threads.append(Thread(target=serve_thread_SSL, args=(settings.Config.Bind_To, 5986, WinRM,)))

if settings.Config.SSL_On_Off:
from servers.HTTP import HTTP
from Responder.servers.HTTP import HTTP
threads.append(Thread(target=serve_thread_SSL, args=(settings.Config.Bind_To, 443, HTTP,)))

if settings.Config.RDP_On_Off:
from servers.RDP import RDP
from Responder.servers.RDP import RDP
threads.append(Thread(target=serve_thread_tcp, args=(settings.Config.Bind_To, 3389, RDP,)))

if settings.Config.DCERPC_On_Off:
from servers.RPC import RPCMap, RPCMapper
from Responder.servers.RPC import RPCMap, RPCMapper
threads.append(Thread(target=serve_thread_tcp, args=(settings.Config.Bind_To, 135, RPCMap,)))
threads.append(Thread(target=serve_thread_tcp, args=(settings.Config.Bind_To, settings.Config.RPCPort, RPCMapper,)))

if settings.Config.WPAD_On_Off:
from servers.HTTP_Proxy import HTTP_Proxy
from Responder.servers.HTTP_Proxy import HTTP_Proxy
threads.append(Thread(target=serve_thread_tcp, args=(settings.Config.Bind_To, 3128, HTTP_Proxy,)))

if settings.Config.ProxyAuth_On_Off:
from servers.Proxy_Auth import Proxy_Auth
from Responder.servers.Proxy_Auth import Proxy_Auth
threads.append(Thread(target=serve_thread_tcp_auth, args=(settings.Config.Bind_To, 3128, Proxy_Auth,)))

if settings.Config.SMB_On_Off:
if settings.Config.LM_On_Off:
from servers.SMB import SMB1LM
from Responder.servers.SMB import SMB1LM
threads.append(Thread(target=serve_thread_tcp, args=(settings.Config.Bind_To, 445, SMB1LM,)))
threads.append(Thread(target=serve_thread_tcp, args=(settings.Config.Bind_To, 139, SMB1LM,)))
else:
from servers.SMB import SMB1
from Responder.servers.SMB import SMB1
threads.append(Thread(target=serve_thread_tcp, args=(settings.Config.Bind_To, 445, SMB1,)))
threads.append(Thread(target=serve_thread_tcp, args=(settings.Config.Bind_To, 139, SMB1,)))

if settings.Config.Krb_On_Off:
from servers.Kerberos import KerbTCP, KerbUDP
from Responder.servers.Kerberos import KerbTCP, KerbUDP
threads.append(Thread(target=serve_thread_udp, args=('', 88, KerbUDP,)))
threads.append(Thread(target=serve_thread_tcp, args=(settings.Config.Bind_To, 88, KerbTCP,)))

if settings.Config.SQL_On_Off:
from servers.MSSQL import MSSQL, MSSQLBrowser
from Responder.servers.MSSQL import MSSQL, MSSQLBrowser
threads.append(Thread(target=serve_thread_tcp, args=(settings.Config.Bind_To, 1433, MSSQL,)))
threads.append(Thread(target=serve_thread_udp_broadcast, args=(settings.Config.Bind_To, 1434, MSSQLBrowser,)))

if settings.Config.FTP_On_Off:
from servers.FTP import FTP
from Responder.servers.FTP import FTP
threads.append(Thread(target=serve_thread_tcp, args=(settings.Config.Bind_To, 21, FTP,)))

if settings.Config.POP_On_Off:
from servers.POP3 import POP3
from Responder.servers.POP3 import POP3
threads.append(Thread(target=serve_thread_tcp, args=(settings.Config.Bind_To, 110, POP3,)))

if settings.Config.LDAP_On_Off:
from servers.LDAP import LDAP, CLDAP
from Responder.servers.LDAP import LDAP, CLDAP
threads.append(Thread(target=serve_thread_tcp, args=(settings.Config.Bind_To, 389, LDAP,)))
threads.append(Thread(target=serve_thread_SSL, args=(settings.Config.Bind_To, 636, LDAP,)))
threads.append(Thread(target=serve_thread_udp, args=('', 389, CLDAP,)))

if settings.Config.MQTT_On_Off:
from servers.MQTT import MQTT
from Responder.servers.MQTT import MQTT
threads.append(Thread(target=serve_thread_tcp, args=(settings.Config.Bind_To, 1883, MQTT,)))

if settings.Config.SMTP_On_Off:
from servers.SMTP import ESMTP
from Responder.servers.SMTP import ESMTP
threads.append(Thread(target=serve_thread_tcp, args=(settings.Config.Bind_To, 25, ESMTP,)))
threads.append(Thread(target=serve_thread_tcp, args=(settings.Config.Bind_To, 587, ESMTP,)))

if settings.Config.IMAP_On_Off:
from servers.IMAP import IMAP
from Responder.servers.IMAP import IMAP
threads.append(Thread(target=serve_thread_tcp, args=(settings.Config.Bind_To, 143, IMAP,)))

if settings.Config.DNS_On_Off:
from servers.DNS import DNS, DNSTCP
from Responder.servers.DNS import DNS, DNSTCP
threads.append(Thread(target=serve_thread_udp, args=('', 53, DNS,)))
threads.append(Thread(target=serve_thread_tcp, args=(settings.Config.Bind_To, 53, DNSTCP,)))

if settings.Config.SNMP_On_Off:
from servers.SNMP import SNMP
from Responder.servers.SNMP import SNMP
threads.append(Thread(target=serve_thread_udp, args=('', 161, SNMP,)))

for thread in threads:
Expand All @@ -417,7 +417,7 @@ def main():


if settings.Config.DHCP_On_Off:
from poisoners.DHCP import DHCP
from Responder.poisoners.DHCP import DHCP
DHCP(settings.Config.DHCP_DNS)

while True:
Expand Down
4 changes: 4 additions & 0 deletions Responder/certs/gen-self-signed-cert.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
CERT_PATH=$1
openssl genrsa -out "$CERT_PATH/certs/responder.key" 2048
openssl req -new -x509 -days 3650 -key "$CERT_PATH/certs/responder.key" -out "$CERT_PATH/certs/responder.crt" -subj "/"
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions packets.py → Responder/packets.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import struct
import settings
import Responder.settings as settings
import codecs
import random
import re
from os import urandom
from base64 import b64decode, b64encode
from odict import OrderedDict
from utils import HTTPCurrentDate, SMBTime, RespondWithIPAton, RespondWithIPPton, RespondWithIP, StructPython2or3, NetworkRecvBufferPython2or3, StructWithLenPython2or3
from Responder.odict import OrderedDict
from Responder.utils import HTTPCurrentDate, SMBTime, RespondWithIPAton, RespondWithIPPton, RespondWithIP, StructPython2or3, NetworkRecvBufferPython2or3, StructWithLenPython2or3

# Packet class handling all packet generation (see odict.py).
class Packet():
Expand Down
4 changes: 2 additions & 2 deletions poisoners/DHCP.py → Responder/poisoners/DHCP.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@

BASEDIR = os.path.realpath(os.path.join(os.path.dirname(__file__), '..'))
sys.path.insert(0, BASEDIR)
from odict import OrderedDict
from utils import *
from Responder.odict import OrderedDict
from Responder.utils import *

def color(txt, code = 1, modifier = 0):
return "\033[%d;3%dm%s\033[0m" % (modifier, code, txt)
Expand Down
4 changes: 2 additions & 2 deletions poisoners/LLMNR.py → Responder/poisoners/LLMNR.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from packets import LLMNR_Ans, LLMNR6_Ans
from utils import *
from Responder.packets import LLMNR_Ans, LLMNR6_Ans
from Responder.utils import *

if (sys.version_info > (3, 0)):
from socketserver import BaseRequestHandler
Expand Down
4 changes: 2 additions & 2 deletions poisoners/MDNS.py → Responder/poisoners/MDNS.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
from socketserver import BaseRequestHandler
else:
from SocketServer import BaseRequestHandler
from packets import MDNS_Ans, MDNS6_Ans
from utils import *
from Responder.packets import MDNS_Ans, MDNS6_Ans
from Responder.utils import *

#Should we answer to those AAAA?
Have_IPv6 = settings.Config.IPv6
Expand Down
4 changes: 2 additions & 2 deletions poisoners/NBTNS.py → Responder/poisoners/NBTNS.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys
from packets import NBT_Ans
from utils import *
from Responder.packets import NBT_Ans
from Responder.utils import *

if (sys.version_info > (3, 0)):
from socketserver import BaseRequestHandler
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions servers/Browser.py → Responder/servers/Browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from utils import *
from packets import SMBHeader, SMBNegoData, SMBSessionData, SMBTreeConnectData, RAPNetServerEnum3Data, SMBTransRAPData
from Responder.utils import *
from Responder.packets import SMBHeader, SMBNegoData, SMBSessionData, SMBTreeConnectData, RAPNetServerEnum3Data, SMBTransRAPData
if settings.Config.PY2OR3 == "PY3":
from socketserver import BaseRequestHandler
else:
Expand Down
4 changes: 2 additions & 2 deletions servers/DNS.py → Responder/servers/DNS.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from utils import *
from packets import DNS_Ans, DNS_SRV_Ans, DNS6_Ans, DNS_AnsOPT
from Responder.utils import *
from Responder.packets import DNS_Ans, DNS_SRV_Ans, DNS6_Ans, DNS_AnsOPT
if settings.Config.PY2OR3 == "PY3":
from socketserver import BaseRequestHandler
else:
Expand Down
4 changes: 2 additions & 2 deletions servers/FTP.py → Responder/servers/FTP.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from utils import *
from Responder.utils import *
if settings.Config.PY2OR3 == "PY3":
from socketserver import BaseRequestHandler
else:
from SocketServer import BaseRequestHandler

from packets import FTPPacket
from Responder.packets import FTPPacket

class FTP(BaseRequestHandler):
def handle(self):
Expand Down
Loading