diff --git a/README.md b/README.md index 9ce3084..f7d6d6d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ LLMNR/NBT-NS/mDNS Poisoner -(Original work by Laurent Gaffie http://www.spiderlabs.com) +Author: Laurent Gaffie http://www.spiderlabs.com diff --git a/Responder.py b/Responder.py old mode 100644 new mode 100755 diff --git a/fingerprint.py b/fingerprint.py index 24432a5..29191d0 100644 --- a/fingerprint.py +++ b/fingerprint.py @@ -21,7 +21,7 @@ import struct import string import logging -from utils import * +#from utils import * from odict import OrderedDict from packets import SMBHeader, SMBNego, SMBNegoFingerData, SMBSessionFingerData diff --git a/tools/DHCP.py b/tools/DHCP.py old mode 100644 new mode 100755 diff --git a/tools/FindSQLSrv.py b/tools/FindSQLSrv.py old mode 100644 new mode 100755 diff --git a/tools/Icmp-Redirect.py b/tools/Icmp-Redirect.py old mode 100644 new mode 100755 diff --git a/tools/RelayPackets.py b/tools/RelayPackets.py index 04e8eb0..580d85a 100644 --- a/tools/RelayPackets.py +++ b/tools/RelayPackets.py @@ -14,7 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see . -import struct +import struct, sys +sys.path.append('../') from odict import OrderedDict class Packet: @@ -351,4 +352,4 @@ class SMBDCESVCCTLStartService(Packet): def ParseAnswerKey(data,host): key = data[73:81] print "Key retrieved is:%s from host:%s"%(key.encode("hex"),host) - return key \ No newline at end of file + return key diff --git a/tools/SMBRelay.py b/tools/SMBRelay.py old mode 100644 new mode 100755 index 6dedf5e..e114055 --- a/tools/SMBRelay.py +++ b/tools/SMBRelay.py @@ -15,8 +15,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . import sys, os, struct,re,socket,random, RelayPackets,optparse,thread +sys.path.append('../') from fingerprint import RunSmbFinger from odict import OrderedDict +from utils import longueur from socket import * from RelayPackets import * @@ -61,7 +63,7 @@ Command = options.CMD Target = options.TARGET Responder_IP = options.Responder_IP -print "\nResponder SMBRelay 0.1\nPlease send bugs/comments to: lgaffie@trustwave.com" +print "\nResponder SMBRelay 0.1\nPlease send bugs/comments to: laurent.gaffie@gmail.com" print '\033[31m'+'Use this script in combination with Responder.py for best results (remember to set SMB = Off in Responder.conf)..\nUsernames to relay (-u) are case sensitive.'+'\033[0m' print 'To kill this script hit CRTL-C or Enter\nWill relay credentials for these users: '+'\033[1m\033[34m'+', '.join(UserToRelay)+'\033[0m\n' diff --git a/utils.py b/utils.py index 2fd0cbd..656bff0 100644 --- a/utils.py +++ b/utils.py @@ -21,7 +21,7 @@ import logging import socket import time import settings - +import struct try: import sqlite3 except: @@ -383,3 +383,7 @@ def hexdump(src, l=0x16): res.append(('%08X: %-'+str(l*(2+1)+1)+'s |%s|') % (i, hexa, text)) return '\n'.join(res) + +def longueur(payload): + length = struct.pack(">i", len(''.join(payload))) + return length