Skip to content
This repository has been archived by the owner on Aug 28, 2018. It is now read-only.

Commit

Permalink
- Fixed a bug when ARP spoofing via arp replies
Browse files Browse the repository at this point in the history
- Amended license
  • Loading branch information
byt3bl33d3r committed Mar 15, 2015
1 parent b530470 commit 873112c
Show file tree
Hide file tree
Showing 14 changed files with 106 additions and 20 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ Changelog

- FilePwn plugin re-written to backdoor executables and zip files on the fly by using [the-backdoor-factory](https://github.com/secretsquirrel/the-backdoor-factory) and code from [BDFProxy](https://github.com/secretsquirrel/BDFProxy)

- Added msfrpc.py for interfacing with Metasploits rpc server
- Added [msfrpc.py](https://github.com/byt3bl33d3r/msfrpc/blob/master/python-msfrpc/msfrpc.py) for interfacing with Metasploits rpc server

- Added beefapi.py for interfacing with BeEF's RESTfulAPI
- Added [beefapi.py](https://github.com/byt3bl33d3r/beefapi) for interfacing with BeEF's RESTfulAPI

- Addition of the app-cache poisoning attack by [Krzysztof Kotowicz](https://github.com/koto/sslstrip) (blogpost explaining the attack here http://blog.kotowicz.net/2010/12/squid-imposter-phishing-websites.html)

Expand Down
18 changes: 18 additions & 0 deletions libs/banners.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
#! /usr/bin/env python2.7
# -*- coding: utf-8 -*-

# Copyright (c) 2014-2016 Marcello Salvati
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
#

import random

banner1 = """
Expand Down
19 changes: 19 additions & 0 deletions libs/beefapi.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
#!/usr/bin/env python2.7

# Copyright (c) 2014-2016 Marcello Salvati
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
#

import requests
import json
from random import sample
Expand Down
23 changes: 18 additions & 5 deletions libs/msfrpc.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
#! /usr/bin/env python2.7

# MSF-RPC - A Python library to facilitate MSG-RPC communication with Metasploit
# Ryan Linn - RLinn@trustwave.com, Marcello Salvati - byt3bl33d3r@gmail.com
# Copyright (C) 2011 Trustwave
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
# You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

# Copyright (c) 2014-2016 Ryan Linn - RLinn@trustwave.com, Marcello Salvati - byt3bl33d3r@gmail.com
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
#

import requests
import msgpack
Expand Down
2 changes: 1 addition & 1 deletion libs/sslstrip/ClientRequest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2004-2009 Moxie Marlinspike
# Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
Expand Down
2 changes: 1 addition & 1 deletion libs/sslstrip/CookieCleaner.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2004-2011 Moxie Marlinspike
# Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
Expand Down
18 changes: 18 additions & 0 deletions libs/sslstrip/DnsCache.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
#

import logging

class DnsCache:
Expand Down
2 changes: 1 addition & 1 deletion libs/sslstrip/SSLServerConnection.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2004-2009 Moxie Marlinspike
# Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
Expand Down
2 changes: 1 addition & 1 deletion libs/sslstrip/ServerConnection.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2004-2009 Moxie Marlinspike
# Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
Expand Down
2 changes: 1 addition & 1 deletion libs/sslstrip/ServerConnectionFactory.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2004-2009 Moxie Marlinspike
# Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
Expand Down
2 changes: 1 addition & 1 deletion libs/sslstrip/StrippingProxy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2004-2009 Moxie Marlinspike
# Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
Expand Down
4 changes: 2 additions & 2 deletions libs/sslstrip/URLMonitor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2004-2009 Moxie Marlinspike
# Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
Expand Down Expand Up @@ -78,7 +78,7 @@ def addSecureLink(self, client, url):
method = url[0:methodIndex]

pathIndex = url.find("/", methodIndex)
if (pathIndex == -1):
if pathIndex is -1:
pathIndex = len(url)
url += "/"

Expand Down
20 changes: 19 additions & 1 deletion mitmf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
#!/usr/bin/env python2.7

# Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
#

from twisted.web import http
from twisted.internet import reactor

Expand Down Expand Up @@ -152,7 +170,7 @@
p.initialize(args)
load.append(p)
except Exception, e:
print "[-] Error loading plugin: " + str(e)
print "[-] Error loading plugin %s: %s" % (p.name, str(e))

#Plugins are ready to go, start MITMf
if args.disproxy:
Expand Down
8 changes: 4 additions & 4 deletions plugins/Spoof.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def add_options(self, options):
options.add_argument('--shellshock', type=str, metavar='PAYLOAD', dest='shellshock', default=None, help='Trigger the Shellshock vuln when spoofing DHCP, and execute specified command')
options.add_argument('--gateway', dest='gateway', help='Specify the gateway IP')
options.add_argument('--target', dest='target', default=None, help='Specify a host to poison [default: subnet]')
options.add_argument('--arpmode', dest='arpmode', default='req', choices=["req", "rep"], help=' ARP Spoofing mode: requests (req) or replies (rep) [default: req]')
options.add_argument('--arpmode',type=str, dest='arpmode', default='req', choices=["req", "rep"], help=' ARP Spoofing mode: requests (req) or replies (rep) [default: req]')
#options.add_argument('--summary', action='store_true', dest='summary', default=False, help='Show packet summary and ask for confirmation before poisoning')

#added by alexander.georgiev@daloo.de
Expand Down Expand Up @@ -314,7 +314,7 @@ def __init__(self, gateway, interface, mac):
self.arpmode = 'req'
self.debug = False
self.send = True
self.arp_inter = 2
self.arp_inter = 3

def start(self):
if self.gatewaymac is None:
Expand All @@ -325,10 +325,10 @@ def start(self):
if self.targetmac is None:
sys.exit("[-] Error: Could not resolve target's MAC address")

if self.arpmode is 'req':
if self.arpmode == 'req':
pkt = self.build_arp_req()

elif self.arpmode is 'rep':
elif self.arpmode == 'rep':
pkt = self.build_arp_rep()

t = threading.Thread(name='arp_spoof', target=self.send_arps, args=(pkt, self.interface, self.debug,))
Expand Down

0 comments on commit 873112c

Please sign in to comment.