MCPcopy Create free account
hub / github.com/AutoRecon/AutoRecon / SNMPWalk

Class SNMPWalk

autorecon/default-plugins/snmpwalk.py:3–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1from autorecon.plugins import ServiceScan
2
3class SNMPWalk(ServiceScan):
4
5 def __init__(self):
6 super().__init__()
7 self.name = "SNMPWalk"
8 self.tags = ['default', 'safe', 'snmp']
9
10 def configure(self):
11 self.match_service_name('^snmp')
12 self.match_port('udp', 161)
13 self.run_once(True)
14
15 async def run(self, service):
16 await service.execute('snmpwalk -c public -v 1 {address} 2>&1', outfile='{protocol}_{port}_snmp_snmpwalk.txt')
17 await service.execute('snmpwalk -c public -v 1 {address} 1.3.6.1.2.1.25.1.6.0 2>&1', outfile='{protocol}_{port}_snmp_snmpwalk_system_processes.txt')
18 await service.execute('snmpwalk -c public -v 1 {address} 1.3.6.1.2.1.25.4.2.1.2 2>&1', outfile='{scandir}/{protocol}_{port}_snmp_snmpwalk_running_processes.txt')
19 await service.execute('snmpwalk -c public -v 1 {address} 1.3.6.1.2.1.25.4.2.1.4 2>&1', outfile='{protocol}_{port}_snmp_snmpwalk_process_paths.txt')
20 await service.execute('snmpwalk -c public -v 1 {address} 1.3.6.1.2.1.25.2.3.1.4 2>&1', outfile='{protocol}_{port}_snmp_snmpwalk_storage_units.txt')
21 await service.execute('snmpwalk -c public -v 1 {address} 1.3.6.1.2.1.25.2.3.1.4 2>&1', outfile='{protocol}_{port}_snmp_snmpwalk_software_names.txt')
22 await service.execute('snmpwalk -c public -v 1 {address} 1.3.6.1.4.1.77.1.2.25 2>&1', outfile='{protocol}_{port}_snmp_snmpwalk_user_accounts.txt')
23 await service.execute('snmpwalk -c public -v 1 {address} 1.3.6.1.2.1.6.13.1.3 2>&1', outfile='{protocol}_{port}_snmp_snmpwalk_tcp_ports.txt')

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected