snmp-check

Description

Snmpcheck is an open source tool distributed under GPL license. Its goal is to automate the process of gathering information of any devices with SNMP protocol support (Windows, Unix-like, network appliances, printers…). Like snmpwalk, snmpcheck allows you to enumerate the SNMP devices and places the output in a very human readable friendly format. It could be useful for penetration testing or systems monitoring.

PlatformLinux
AuthorMatteo Cantoni
LicenseGPLv3
URLhttp://www.nothink.org/codes/snmpcheck/

Usage

snmp-check v1.9 - SNMP enumerator
Copyright (c) 2005-2015 by Matteo Cantoni (www.nothink.org)
 
 Usage: snmp-check [OPTIONS] <target IP address>
 
  -p --port        : SNMP port. Default port is 161;
  -c --community   : SNMP community. Default is public;
  -v --version     : SNMP version (1,2c). Default is 1;
 
  -w --write       : detect write access (separate action by enumeration);
 
  -d --disable_tcp : disable TCP connections enumeration!
  -t --timeout     : timeout in seconds. Default is 5;
  -r --retries     : request retries. Default is 1;
  -i --info        : show script version;
  -h --help        : show help menu;

Examples

snmp-check x.x.x.x

The following output shows snmp-check run with default settings.

└─# snmp-check 192.168.168.42
snmp-check v1.9 - SNMP enumerator
Copyright (c) 2005-2015 by Matteo Cantoni (www.nothink.org)
 
[+] Try to connect to 192.168.168.42:161 using SNMPv1 and community 'public'
 
[*] System information:
 
  Host IP address               : 192.168.168.42
  Hostname                      : 0xbabe.local
  Description                   : Linux 0xbabe.local 2.6.8-4-386 #1 Wed Feb 20 06:15:54 UTC 2008 i686
  Contact                       : Root <root@localhost> (configure /etc/snmp/snmpd.local.conf)
  Location                      : Unknown (configure /etc/snmp/snmpd.local.conf)
  Uptime snmp                   : 02:27:01.75
  Uptime system                 : 02:26:28.35
  System date                   : 2021-2-3 02:57:09.0
 
[*] Network information:
 
  IP forwarding enabled         : no
  Default TTL                   : 64
  TCP segments received         : 4004
  TCP segments sent             : 2614
  TCP segments retrans          : 0
  Input datagrams               : 4245
  Delivered datagrams           : 4245
  Output datagrams              : 2854
 
[*] Network interfaces:
 
  Interface                     : [ up ] lo
  Id                            : 1
  Mac Address                   : :::::
  Type                          : softwareLoopback
  Speed                         : 10 Mbps
  MTU                           : 16436
  In octets                     : 264
  Out octets                    : 264
 
  Interface                     : [ up ] eth0
  Id                            : 2
  Mac Address                   : 00:50:56:bf:a3:08
  Type                          : ethernet-csmacd
  Speed                         : 100 Mbps
  MTU                           : 1500
  In octets                     : 3325200
  Out octets                    : 234338
 
  Interface                     : [ down ] sit0
  Id                            : 3
  Mac Address                   : 00:00:00:00:a3:08
  Type                          : unknown
  Speed                         : 0 Mbps
  MTU                           : 1480
  In octets                     : 0
  Out octets                    : 0
 
 
[*] Network IP:
 
  Id                    IP Address            Netmask               Broadcast          
  1                     127.0.0.1             255.0.0.0             0                  
  2                     192.168.168.42        255.255.255.0         1                  
 
[*] Routing information:
 
  Destination           Next hop              Mask                  Metric             
  0.0.0.0               192.168.168.254       0.0.0.0               1                  
  192.168.168.0         0.0.0.0               255.255.255.0         0                  
 
[*] TCP connections and listening ports:
 
  Local address         Local port            Remote address        Remote port           State              
  0.0.0.0               25                    0.0.0.0               0                     listen             
  0.0.0.0               80                    0.0.0.0               0                     listen             
  0.0.0.0               139                   0.0.0.0               0                     listen             
  0.0.0.0               199                   0.0.0.0               0                     listen             
  0.0.0.0               445                   0.0.0.0               0                     listen             
 
[*] Listening UDP ports:
 
  Local address         Local port         
  0.0.0.0               137                
  0.0.0.0               138                
  0.0.0.0               161                
  192.168.168.42        137                
  192.168.168.42        138                
 
[*] Processes:
 
  Id                    Status                Name                  Path                  Parameters         
  1                     runnable              init                  init [2]                                 
  2                     runnable              ksoftirqd/0           ksoftirqd/0                              
  3                     runnable              events/0              events/0                                 
  4                     runnable              khelper               khelper                                  
  5                     runnable              kacpid                kacpid                                   
  99                    runnable              kblockd/0             kblockd/0                                
  109                   runnable              pdflush               pdflush                                  
  110                   runnable              pdflush               pdflush                                  
  111                   runnable              kswapd0               kswapd0                                  
  112                   runnable              aio/0                 aio/0                                    
  255                   runnable              kseriod               kseriod                                  
  276                   runnable              scsi_eh_0             scsi_eh_0                                
  284                   runnable              khubd                 khubd                                    
  348                   runnable              shpchpd_event         shpchpd_event                            
  380                   runnable              kjournald             kjournald                                
  935                   runnable              vmmemctl              vmmemctl                                 
  1177                  runnable              vmtoolsd              /usr/sbin/vmtoolsd                       
  3772                  running               syslogd               /sbin/syslogd                            
  3775                  runnable              klogd                 /sbin/klogd                              
  3780                  runnable              clamd                 /usr/local/sbin/clamd                     
  3782                  runnable              clamav-milter         /usr/local/sbin/clamav-milter  --black-hole-mode -l -o -q /var/run/clamav/clamav-milter.ctl
  3791                  runnable              inetd                 /usr/sbin/inetd                          
  3795                  runnable              nmbd                  /usr/sbin/nmbd        -D                 
  3797                  runnable              smbd                  /usr/sbin/smbd        -D                 
  3801                  running               snmpd                 /usr/sbin/snmpd       -Lsd -Lf /dev/null -p /var/run/snmpd.pid
  3807                  runnable              sshd                  /usr/sbin/sshd                           
  3822                  runnable              smbd                  /usr/sbin/smbd        -D                 
  3886                  runnable              sendmail-mta          sendmail: MTA: accepting connections                     
  3900                  runnable              atd                   /usr/sbin/atd                            
  3903                  runnable              cron                  /usr/sbin/cron                           
  3910                  runnable              apache                /usr/sbin/apache                         
  3911                  runnable              apache                /usr/sbin/apache                         
  3912                  runnable              apache                /usr/sbin/apache                         
  3913                  runnable              apache                /usr/sbin/apache                         
  3914                  runnable              apache                /usr/sbin/apache                         
  3915                  runnable              apache                /usr/sbin/apache                         
  3926                  runnable              getty                 /sbin/getty           38400 tty1         
  3928                  runnable              getty                 /sbin/getty           38400 tty2         
  3929                  runnable              getty                 /sbin/getty           38400 tty3         
  3930                  runnable              getty                 /sbin/getty           38400 tty4         
  3931                  runnable              getty                 /sbin/getty           38400 tty5         
  3932                  runnable              getty                 /sbin/getty           38400 tty6         
  4022                  runnable              apache                /usr/sbin/apache                         
  4032                  runnable              apache                /usr/sbin/apache                         
 
[*] Storage information:
 
  Description                   : ["Real Memory"]
  Device id                     : [#<SNMP::Integer:0x00005603d60ea328 @value=2>]
  Filesystem type               : ["unknown"]
  Device unit                   : [#<SNMP::Integer:0x00005603d60e8640 @value=1024>]
  Memory size                   : 250.82 MB
  Memory used                   : 123.28 MB
 
  Description                   : ["Swap Space"]
  Device id                     : [#<SNMP::Integer:0x00005603d60e3190 @value=3>]
  Filesystem type               : ["unknown"]
  Device unit                   : [#<SNMP::Integer:0x00005603d60e1458 @value=1024>]
  Memory size                   : 203.91 MB
  Memory used                   : 0 bytes
 
  Description                   : ["/"]
  Device id                     : [#<SNMP::Integer:0x00005603d60dc0c0 @value=4>]
  Filesystem type               : ["unknown"]
  Device unit                   : [#<SNMP::Integer:0x00005603d60da3b0 @value=4096>]
  Memory size                   : 3.74 GB
  Memory used                   : 765.66 MB
 
  Description                   : ["/sys"]
  Device id                     : [#<SNMP::Integer:0x00005603d6030f40 @value=5>]
  Filesystem type               : ["unknown"]
  Device unit                   : [#<SNMP::Integer:0x00005603d602f258 @value=4096>]
  Memory size                   : 0 bytes
  Memory used                   : 0 bytes
 
 
[*] File system information:
 
  Index                         : 1
  Mount point                   : /
  Remote mount point            : -
  Access                        : 1
  Bootable                      : 1
 
[*] Device information:
 
  Id                    Type                  Status                Descr              
  768                   unknown               unknown               AuthenticAMD: AMD EPYC 7371 16-Core Processor
  1025                  unknown               running               network interface lo
  1026                  unknown               running               network interface eth0
  1027                  unknown               down                  network interface sit0
  1536                  unknown               unknown               VMware Virtual IDE CDROM Drive
  1552                  unknown               unknown               SCSI disk (/dev/sda)
  3072                  unknown               unknown               Guessing that there's a floating point co-processor

Blog Posts