From 1f4ee0fc3fb82015599756ae97622d7617f2e02b Mon Sep 17 00:00:00 2001 From: Frank MacMini Date: Thu, 2 Jan 2025 20:06:26 +0100 Subject: [PATCH 1/3] add enumeration for SNMP extended objects --- autorecon/default-plugins/snmpwalk.py | 1 + 1 file changed, 1 insertion(+) diff --git a/autorecon/default-plugins/snmpwalk.py b/autorecon/default-plugins/snmpwalk.py index 5263700..b094523 100644 --- a/autorecon/default-plugins/snmpwalk.py +++ b/autorecon/default-plugins/snmpwalk.py @@ -14,6 +14,7 @@ def configure(self): async def run(self, service): await service.execute('snmpwalk -c public -v 1 {address} 2>&1', outfile='{protocol}_{port}_snmp_snmpwalk.txt') + await service.execute('snmpwalk -c public -v 1 {address} NET-SNMP-EXTEND-MIB::nsExtendObjects 2>&1', outfile='{protocol}_{port}_snmp_snmpwalk.txt') 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') 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') 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') From 1d17d545687125f22bb2cb81eb425e88f1b66c1b Mon Sep 17 00:00:00 2001 From: Frank MacMini Date: Thu, 2 Jan 2025 20:10:31 +0100 Subject: [PATCH 2/3] fixing the output file name --- autorecon/default-plugins/snmpwalk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autorecon/default-plugins/snmpwalk.py b/autorecon/default-plugins/snmpwalk.py index b094523..8d257f1 100644 --- a/autorecon/default-plugins/snmpwalk.py +++ b/autorecon/default-plugins/snmpwalk.py @@ -14,7 +14,7 @@ def configure(self): async def run(self, service): await service.execute('snmpwalk -c public -v 1 {address} 2>&1', outfile='{protocol}_{port}_snmp_snmpwalk.txt') - await service.execute('snmpwalk -c public -v 1 {address} NET-SNMP-EXTEND-MIB::nsExtendObjects 2>&1', outfile='{protocol}_{port}_snmp_snmpwalk.txt') + await service.execute('snmpwalk -c public -v 1 {address} NET-SNMP-EXTEND-MIB::nsExtendObjects 2>&1', outfile='{protocol}_{port}_snmp_snmpwalk_extend_objects.txt') 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') 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') 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') From 15fd311028b4eb050ace35e68ac2fa97649780f0 Mon Sep 17 00:00:00 2001 From: Frank MacMini Date: Thu, 2 Jan 2025 21:08:50 +0100 Subject: [PATCH 3/3] changing snmpwalk to snmpbulkwalk --- autorecon/default-plugins/snmpwalk.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/autorecon/default-plugins/snmpwalk.py b/autorecon/default-plugins/snmpwalk.py index 8d257f1..46bd62a 100644 --- a/autorecon/default-plugins/snmpwalk.py +++ b/autorecon/default-plugins/snmpwalk.py @@ -13,12 +13,12 @@ def configure(self): self.run_once(True) async def run(self, service): - await service.execute('snmpwalk -c public -v 1 {address} 2>&1', outfile='{protocol}_{port}_snmp_snmpwalk.txt') - await service.execute('snmpwalk -c public -v 1 {address} NET-SNMP-EXTEND-MIB::nsExtendObjects 2>&1', outfile='{protocol}_{port}_snmp_snmpwalk_extend_objects.txt') - 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') - 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') - 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') - 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') - 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') - 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') - 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') + await service.execute('snmpbulkwalk -c public -v2c {address} 2>&1', outfile='{protocol}_{port}_snmp_snmpwalk.txt') + await service.execute('snmpbulkwalk -c public -v2c {address} NET-SNMP-EXTEND-MIB::nsExtendObjects 2>&1', outfile='{protocol}_{port}_snmp_snmpwalk_extend_objects.txt') + await service.execute('snmpbulkwalk -c public -v2c {address} 1.3.6.1.2.1.25.1.6.0 2>&1', outfile='{protocol}_{port}_snmp_snmpwalk_system_processes.txt') + await service.execute('snmpbulkwalk -c public -v2c {address} 1.3.6.1.2.1.25.4.2.1.2 2>&1', outfile='{scandir}/{protocol}_{port}_snmp_snmpwalk_running_processes.txt') + await service.execute('snmpbulkwalk -c public -v2c {address} 1.3.6.1.2.1.25.4.2.1.4 2>&1', outfile='{protocol}_{port}_snmp_snmpwalk_process_paths.txt') + await service.execute('snmpbulkwalk -c public -v2c {address} 1.3.6.1.2.1.25.2.3.1.4 2>&1', outfile='{protocol}_{port}_snmp_snmpwalk_storage_units.txt') + await service.execute('snmpbulkwalk -c public -v2c {address} 1.3.6.1.2.1.25.2.3.1.4 2>&1', outfile='{protocol}_{port}_snmp_snmpwalk_software_names.txt') + await service.execute('snmpbulkwalk -c public -v2c {address} 1.3.6.1.4.1.77.1.2.25 2>&1', outfile='{protocol}_{port}_snmp_snmpwalk_user_accounts.txt') + await service.execute('snmpbulkwalk -c public -v2c {address} 1.3.6.1.2.1.6.13.1.3 2>&1', outfile='{protocol}_{port}_snmp_snmpwalk_tcp_ports.txt')