> For the complete documentation index, see [llms.txt](https://oscp.nstsec.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://oscp.nstsec.com/services-exploitation/161-snmp.md).

# 161 - SNMP

## <mark style="color:red;">Enumeration</mark>

The SNMP Management Information Base (MIB) is a database that typically contains network management information. The database is organized in a tree-like structure, where branches represent different organizations or network functions. The leaves of the tree (final endpoints) correspond to specific variable values that can be accessed and probed by an external user.

Scan for SNMP:

```
sudo nmap -sU --open -p 161 10.11.1.1-254 -oG open-snmp.txt
```

We can leverage a tool like onesixtyone to perform a brute force attack against a list of IP addresses.

```
onesixtyone -c wordlist.txt -i iplist.txt
```

After identifying SNMP services, we can initiate queries to extract specific MIB data that could be of interest.

## <mark style="color:red;">Windows SNMP Enumeration Example</mark>

MIB Tree:

```
snmpwalk -c public -v1 -t 10 10.11.1.14
```

Windows users:

```
snmpwalk -c public -v1 10.11.1.14 1.3.6.1.4.1.77.1.2.25
```

Windows processes:

```
snmpwalk -c public -v1 10.11.1.73 1.3.6.1.2.1.25.4.2.1.2
```

Open TCP ports:

```
snmpwalk -c public -v1 10.11.1.14 1.3.6.1.2.1.6.13.1.3
```

Installed software:

```
snmpwalk -c public -v1 10.11.1.50 1.3.6.1.2.1.25.6.3.1.2
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://oscp.nstsec.com/services-exploitation/161-snmp.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
