Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNMP network scanner #7

Open
da-ekchajzer opened this issue Apr 27, 2022 · 0 comments
Open

SNMP network scanner #7

da-ekchajzer opened this issue Apr 27, 2022 · 0 comments

Comments

@da-ekchajzer
Copy link
Collaborator

Problem

As a network administrator, I monitor my network with SNMP. I want to use cabestan to inventories the devices on my network from an SNMP network scan

Solution

We could use net-SNMP client with a wrapper to gather multiple information.

Device discovery

Discovering devices with SNMP enable can be done throught the nmp snmp-brute script

Exemple : nmap -sU -p161 --script snmp-brute --script-args snmplist=community.lst 192.168.1.0/24

User should be able to provide a collection of IPs referring to SNMP devices.

Device type

Device type could be retrieved from the OID

  • switches
  • bridges
  • routers
  • access servers
  • computer hosts
  • hubs
  • printers

Devices data

Documentation : easysnmp.com/tutorial/getting-snmp-data/

We could use snmpwalk to list available values given though the SNMP interface

command:snmpwalk -v 1 -c public 10.0.1.1 1.3.6.1.2.1

SNMPv2-MIB::sysContact.0 = STRING: Network Admin
SNMPv2-MIB::sysName.0 = STRING: My Router
SNMPv2-MIB::sysLocation.0 = STRING: Main Office
SNMPv2-MIB::sysServices.0 = INTEGER: 14IF-MIB::ifPhysAddress.1 = STRING:
IF-MIB::ifPhysAddress.2 = STRING: 44:d9:e7:7:40:68
IF-MIB::ifPhysAddress.3 = STRING:
IF-MIB::ifPhysAddress.4 = STRING: 44:d9:e7:7:40:62
IF-MIB::ifAdminStatus.1 = INTEGER: up(1)
IF-MIB::ifAdminStatus.2 = INTEGER: up(1)
IF-MIB::ifAdminStatus.3 = INTEGER: up(1)
IF-MIB::ifAdminStatus.4 = INTEGER: up(1)...

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant