SNMP Write-Enabled Community String
SNMPv1 and v2c devices often configure a separate write community string alongside the read-only "public" string. "private" is the default write community on most devices. Write access allows modifying device configuration via SET operations and, on Linux systems running NET-SNMP, enables code execution through the EXTEND MIB.
Test for Write Access
Use snmpset to attempt a SET operation on a safe, writable OID. sysLocation (1.3.6.1.2.1.1.6) is harmless to modify and is writable on most devices that allow SNMP writes:
SNMPv2-MIB::sysLocation.0 = STRING: test
Successful response confirms write access. An "Access denied" or timeout means the string is wrong or write is not permitted.
Identify the Write Community String
If "private" fails, brute force the write community. Many devices use the same string for both read and write — if you already have the read string, test it for write access first:
If the read string does not have write access, scan for a separate write string:
Check NET-SNMP on Linux Targets
On Linux hosts running NET-SNMP, write access to the EXTEND MIB (1.3.6.1.4.1.8072.1.3.2) enables arbitrary command execution. First confirm NET-SNMP is running:
SNMPv2-MIB::sysDescr.0 = STRING: Linux target01 5.15.0-91-generic #101-Ubuntu SMP x86_64
Then check if the EXTEND MIB is accessible with write access:
A response (even an empty table) confirms the MIB is accessible. Write access to this MIB allows creating EXTEND entries that execute arbitrary shell commands when the OID is read. See SNMP Write Abuse – RCE via NET-SNMP-EXTEND-MIB for the full exploitation workflow.
Impact Assessment
Write access via SNMP enables:
Target type | Write impact |
|---|---|
Linux (NET-SNMP) | RCE via EXTEND MIB — shell commands execute as SNMP daemon user |
Network device (router/switch) | Modify routing tables, VLAN config, interface settings, SNMP trap destinations |
Printer/IoT | Factory reset, configuration wipe, credential change |
Windows (SNMP service) | Limited — Windows SNMP service write support is restricted by default |
For network devices, SNMP write access is often more impactful than read — routing table modification or SNMP trap redirection can cause outages or redirect traffic.
Verify Nmap Detection
Nmap does not directly test write access, but the snmp-brute script discovers both read and write community strings if they differ:
161/udp open snmp | snmp-brute: | public - Valid credentials (read) |_ private - Valid credentials (write)
Nmap identifies write strings when the wordlist includes them. Confirm write access with snmpset after discovery.
References
-
NET-SNMP snmpsetwww.net-snmp.org/docs/man/snmpset.html (opens in new tab)
snmpset syntax, type flags, and OID targeting
-
NET-SNMP EXTEND MIBwww.net-snmp.org/docs/mibs/netSnmpExtendMIB.html (opens in new tab)
EXTEND MIB structure enabling command execution registration
Was this helpful?
Your feedback helps improve this page.