Commit 60791e45 by lucyoa Committed by fwkz

Targeting IoT

parent 7d7a2ce7
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'2wire', '2wire',
), ),
} }
vendor = '2wire' modules = ['routers/2wire', 'cameras/2wire', 'misc/2wire']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'3com', '3com',
), ),
} }
vendor = '3com' modules = ['routers/3com', 'cameras/3com', 'misc/3com']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'Asmax', 'Asmax',
), ),
} }
vendor = 'asmax' modules = ['routers/asmax', 'cameras/asmax', 'misc/asmax']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'Asus', 'Asus',
), ),
} }
vendor = 'asus' modules = ['routers/asus', 'cameras/asus', 'misc/asus']
...@@ -28,7 +28,7 @@ class Exploit(exploits.Exploit): ...@@ -28,7 +28,7 @@ class Exploit(exploits.Exploit):
'Multi', 'Multi',
), ),
} }
vendor = '' modules = ['routers', 'cameras', 'misc']
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(80, 'Target port') # default port port = exploits.Option(80, 'Target port') # default port
...@@ -37,15 +37,16 @@ class Exploit(exploits.Exploit): ...@@ -37,15 +37,16 @@ class Exploit(exploits.Exploit):
def __init__(self): def __init__(self):
self.vulnerabilities = [] self.vulnerabilities = []
self.not_verified = [] self.not_verified = []
self._exploits_directory = path.join(utils.EXPLOITS_DIR, self.vendor) self._exploits_directories = [path.join(utils.EXPLOITS_DIR, module) for module in self.modules]
def run(self): def run(self):
self.vulnerabilities = [] self.vulnerabilities = []
self.not_verified = [] self.not_verified = []
with threads.ThreadPoolExecutor(self.threads) as executor: with threads.ThreadPoolExecutor(self.threads) as executor:
for exploit in utils.iter_modules(self._exploits_directory): for directory in self._exploits_directories:
executor.submit(self.target_function, exploit) for exploit in utils.iter_modules(directory):
executor.submit(self.target_function, exploit)
print_info() print_info()
if self.not_verified: if self.not_verified:
......
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'Belkin', 'Belkin',
), ),
} }
vendor = 'belkin' modules = ['routers/belkin', 'cameras/belkin', 'misc/belkin']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'BHU uRouter', 'BHU uRouter',
), ),
} }
vendor = 'bhu' modules = ['routers/bhu', 'cameras/bhu', 'misc/bhu']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'Billion', 'Billion',
), ),
} }
vendor = 'billion' modules = ['routers/billion', 'cameras/billion', 'misc/billion']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'Cisco', 'Cisco',
), ),
} }
vendor = 'cisco' modules = ['routers/cisco', 'cameras/cisco', 'misc/cisco']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'Comtrend', 'Comtrend',
), ),
} }
vendor = 'comtrend' modules = ['routers/comtrend', 'cameras/comtrend', 'misc/comtrend']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'Dlink', 'Dlink',
), ),
} }
vendor = 'dlink' modules = ['routers/dlink', 'cameras/dlink', 'misc/dlink']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'Fortinet', 'Fortinet',
), ),
} }
vendor = 'fortinet' modules = ['routers/fortinet', 'cameras/fortinet', 'misc/fortinet']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'Grandstream', 'Grandstream',
), ),
} }
vendor = 'grandstream' modules = ['routers/grandstream', 'cameras/grandstream', 'misc/grandstream']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'Huawei', 'Huawei',
), ),
} }
vendor = 'huawei' modules = ['routers/huawei', 'cameras/huawei', 'misc/huawei']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'Ipfire', 'Ipfire',
), ),
} }
vendor = 'ipfire' modules = ['routers/ipfire', 'cameras/ipfire', 'misc/ipfire']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'Juniper', 'Juniper',
), ),
} }
vendor = 'juniper' modules = ['routers/juniper', 'cameras/juniper', 'misc/juniper']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'Linksys', 'Linksys',
), ),
} }
vendor = 'linksys' modules = ['routers/linksys', 'cameras/linksys', 'misc/linksys']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'Movistar', 'Movistar',
), ),
} }
vendor = 'movistar' modules = ['routers/movistar', 'cameras/movistar', 'misc/movistar']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'Multi', 'Multi',
), ),
} }
vendor = 'multi' modules = ['routers/multi', 'cameras/multi', 'misc/multi']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'Netcore', 'Netcore',
), ),
} }
vendor = 'netcore' modules = ['routers/netcore', 'cameras/netcore', 'misc/netcore']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'Netgear', 'Netgear',
), ),
} }
vendor = 'netgear' modules = ['routers/netgear', 'cameras/netgear', 'misc/netgear']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'Netsys', 'Netsys',
), ),
} }
vendor = 'netsys' modules = ['routers/netsys', 'cameras/netsys', 'misc/netsys']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'Shuttle', 'Shuttle',
), ),
} }
vendor = 'shuttle' modules = ['routers/shuttle', 'cameras/shuttle', 'misc/shuttle']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'Technicolor', 'Technicolor',
), ),
} }
vendor = 'technicolor' modules = ['routers/technicolor', 'cameras/technicolor', 'misc/technicolor']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'Thomson', 'Thomson',
), ),
} }
vendor = 'thomson' modules = ['routers/thomson', 'cameras/thomson', 'misc/thomson']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'TP-Link', 'TP-Link',
), ),
} }
vendor = 'tplink' modules = ['routers/tplink', 'cameras/tplink', 'misc/tplink']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'Ubiquiti', 'Ubiquiti',
), ),
} }
vendor = 'ubiquiti' modules = ['routers/ubiquiti', 'cameras/ubiquiti', 'misc/ubiquiti']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'Zte', 'Zte',
), ),
} }
vendor = 'zte' modules = ['routers/zte', 'cameras/zte', 'misc/zte']
...@@ -20,4 +20,4 @@ class Exploit(BaseScanner): ...@@ -20,4 +20,4 @@ class Exploit(BaseScanner):
'Zyxel', 'Zyxel',
), ),
} }
vendor = 'zyxel' modules = ['routers/zyxel', 'cameras/zyxel', 'misc/zyxel']
...@@ -69,20 +69,21 @@ class RoutersploitCompleterTest(RoutersploitTestCase): ...@@ -69,20 +69,21 @@ class RoutersploitCompleterTest(RoutersploitTestCase):
def test_complete_use_exploits_2(self): def test_complete_use_exploits_2(self):
self.rsf.send("use exploits/\t\t") self.rsf.send("use exploits/\t\t")
self.assertPrompt( self.assertPrompt(
'exploits/dlink/' "exploits/cameras/ exploits/misc/ exploits/routers/ \r\n",
self.raw_prompt
) )
def test_complete_use_exploits_3(self): def test_complete_use_exploits_3(self):
self.rsf.send("use exploits/dli\t") self.rsf.send("use exploits/routers/dli\t")
self.assertPrompt( self.assertPrompt(
self.raw_prompt, self.raw_prompt,
'use exploits/dlink/' 'use exploits/routers/dlink/'
) )
def test_complete_use_exploits_4(self): def test_complete_use_exploits_4(self):
self.rsf.send("use exploits/dlink/dir_300_320_\t\t\t") self.rsf.send("use exploits/routers/dlink/dir_300_320_\t\t\t")
self.assertPrompt( self.assertPrompt(
'exploits/dlink/dir_300_320_615_auth_bypass' 'exploits/routers/dlink/dir_300_320_615_auth_bypass'
) )
def test_raw_commands_with_module(self): def test_raw_commands_with_module(self):
......
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