community string

term

networkingsecurity

Kept in this browser · My desk

The shared secret of SNMP versions 1 and 2c: a string sent in clear in every request, which the agent compares with its configured communities to decide whether, and with which view, to answer.

A community string is SNMP's oldest and weakest credential: the bytes of a string such as 'public' travel unencrypted at a fixed place in every v1 and v2c message, readable by anyone on the path. RFC 3410 called these versions fundamentally insecure and declared them Historic in 2002, yet devices still ship with them. Communities have caused amplification abuse, configuration theft and remote code execution through vulnerable agents. Use SNMPv3; where a community remains, make it read-only, long and random, tied to a view and to the poller's address.

What it is. In SNMPv1 (RFC 1157, May 1990) every message is a SEQUENCE of three things: a version, a community name as an OCTET STRING, and the PDU. An agent belongs to one or more communities; a message whose community matches is accepted and processed with that community's access profile, typically read-only or read-write over some view of the MIB. Community-based SNMPv2 (RFC 1901, January 1996, Experimental) kept the same envelope with version 1 instead of 0, which is why it is called v2c. Nothing protects the string: in a 41-byte GetRequest for sysDescr.0 with the community public, the six bytes 70 75 62 6c 69 63 sit at offset 7, in clear, in the request and again in the response.

What the standards said. RFC 1157 itself acknowledged that some implementations "may wish to support only a trivial authentication service that identifies all SNMP messages as authentic SNMP messages", while real administration needs authentication that identifies authentic messages "with a high degree of certainty". In December 2002 RFC 3410 said that versions 1 and 2c "support only trivial authentication based on plain-text community strings and, as a result, are fundamentally insecure", and declared them Historic so that SNMPv3 would be "the framework of choice". RFC 3584 (BCP 74, August 2003) let version 3 engines accept communities by mapping each to a security name, a context and a set of permitted source addresses, so that VACM views can limit them.

In practice. Defaults existed and survived: the NCSC's 2023 advisory names "the default 'public'" among the strings attackers used. Operators added their own, and a community has to be configured on every device and in every manager that polls it, so the same string tends to spread across a fleet and into the managers' configuration files. Device configurations themselves contain the strings, which is why stolen configurations are valuable: CISA's alert TA18-106A of April 2018 noted that exfiltrated configuration files "contain SNMP community strings". The usual hardening, short of SNMPv3, is a long random read-only community, an access list or the community's source-address binding allowing only the pollers, a view that excludes everything not polled, and no write community at all.

What goes wrong. Sniffing: CISA's TA17-156A (June 2017) warns that "an adversary could sniff network traffic to determine the community string", enabling man-in-the-middle or replay. Guessing: the NCSC notes that "A number of software tools can scan the entire network using SNMP", so default or easy-to-guess strings are found; the authenticationFailure trap, RFC 1157's report of a bad community, is often disabled. Amplification: an agent that answers any source with a community it knows becomes a reflector; CISA lists SNMPv2 GetBulk with an amplification factor of 6.3, and in Brazil CERT.br notifies network owners of hosts with "SNMP (UDP/161) open to the Internet" (its template's words, translated) while NIC.br's guidance says to avoid the community public and to test from outside with snmpget. Exploitation: the 2017 Cisco IOS SNMP vulnerabilities (CVE-2017-6736 to 6744) needed only the read-only community to run code; in 2021 APT28 used weak strings "including the default 'public'" against routers that accepted SNMP v2, around 250 of the victims in Ukraine, as the NCSC, NSA, CISA and FBI reported on 18 April 2023.

How version 3 engines handle them. RFC 3584's community table gives each community a row that maps the string to a securityName, a contextEngineID and contextName, and a transport tag naming the source addresses from which it is valid; the request is then judged by VACM as if a user of that name had sent it, at the noAuthNoPriv level. Binding the community to the poller's addresses is the standard's own defence, and it is exactly what attackers work around by spoofing: CISA's 2018 alert describes SNMP datagrams sent with source addresses forged to look as if they came from inside the target network, followed by the device sending its configuration out by TFTP. A filter on the network edge that drops packets claiming internal source addresses is therefore part of protecting a community.

Status. Communities remain in every mainstream implementation for compatibility. CISA's December 2024 guidance for communications infrastructure asks for SNMPv3 with encryption and authentication only, and for SNMP v1 and v2c to be disabled.

Neighbours. The replacement is the User-based Security Model of SNMPv3; the view a community may see is defined with VACM over the MIB; network-level protection is an ACL (access control list) on the management plane; the amplification side is covered under amplification attacks.

Also known as: community name, snmp community, snmp community string, public community

← Back to C Back to the glossary