hacktricks/network-services-pentesting/pentesting-snmp/cisco-snmp.md

79 lines
4.7 KiB
Markdown
Raw Permalink Normal View History

2022-09-30 10:43:59 +00:00
# Cisco SNMP
2024-07-18 20:49:07 +00:00
{% hint style="success" %}
2024-09-16 20:40:46 +00:00
Learn & practice AWS Hacking:<img src="../../.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="../../.gitbook/assets/arte.png" alt="" data-size="line">\
Learn & practice GCP Hacking: <img src="../../.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="../../.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
2024-07-18 20:49:07 +00:00
2022-09-30 10:43:59 +00:00
<details>
2024-07-18 20:49:07 +00:00
<summary>Support HackTricks</summary>
2022-09-30 10:43:59 +00:00
2024-07-18 20:49:07 +00:00
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
2022-09-30 10:43:59 +00:00
</details>
2024-07-18 20:49:07 +00:00
{% endhint %}
2022-09-30 10:43:59 +00:00
2024-11-19 11:31:22 +00:00
<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
If you are interested in **hacking career** and hack the unhackable - **we are hiring!** (_fluent polish written and spoken required_).
{% embed url="https://www.stmcyber.com/careers" %}
## Pentesting Cisco Networks
2022-09-30 10:43:59 +00:00
2024-02-08 21:36:15 +00:00
**SNMP** functions over UDP with ports 161/UDP for general messages and 162/UDP for trap messages. This protocol relies on community strings, serving as passwords that enable communication between SNMP agents and servers. These strings are pivotal for they determine access levels, specifically **read-only (RO) or read-write (RW) permissions**. A notable attack vector for pentesters is the **brute-forcing of community strings**, aiming to infiltrate network devices.
2022-09-30 10:43:59 +00:00
A practical tool for executing such brute-force attacks is [**onesixtyone**](https://github.com/trailofbits/onesixtyone), which necessitates a list of potential community strings and the IP addresses of the targets:
2022-09-30 10:43:59 +00:00
2024-02-03 16:02:14 +00:00
```bash
onesixtyone -c communitystrings -i targets
2022-09-30 10:43:59 +00:00
```
#### `cisco_config_tftp`
2022-09-30 10:43:59 +00:00
2024-02-08 21:36:15 +00:00
The Metasploit framework features the `cisco_config_tftp` module, facilitating the extraction of device configurations, contingent upon acquiring an RW community string. Essential parameters for this operation include:
2022-09-30 10:43:59 +00:00
* RW community string (**COMMUNITY**)
* Attacker's IP (**LHOST**)
* Target device's IP (**RHOSTS**)
* Destination path for the configuration files (**OUTPUTDIR**)
2022-09-30 10:43:59 +00:00
2024-02-08 21:36:15 +00:00
Upon configuration, this module enables the download of device settings directly to a specified folder.
2022-09-30 10:43:59 +00:00
#### `snmp_enum`
2022-09-30 10:43:59 +00:00
2024-02-08 21:36:15 +00:00
Another Metasploit module, **`snmp_enum`**, specializes in gathering detailed hardware information. It operates with either type of community string and requires the target's IP address for successful execution:
2022-09-30 10:43:59 +00:00
```bash
msf6 auxiliary(scanner/snmp/snmp_enum) > set COMMUNITY public
msf6 auxiliary(scanner/snmp/snmp_enum) > set RHOSTS 10.10.100.10
msf6 auxiliary(scanner/snmp/snmp_enum) > exploit
```
2024-02-08 03:08:28 +00:00
## References
2024-02-03 16:02:14 +00:00
* [https://medium.com/@in9uz/cisco-nightmare-pentesting-cisco-networks-like-a-devil-f4032eb437b9](https://medium.com/@in9uz/cisco-nightmare-pentesting-cisco-networks-like-a-devil-f4032eb437b9)
2024-11-19 11:31:22 +00:00
<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
If you are interested in **hacking career** and hack the unhackable - **we are hiring!** (_fluent polish written and spoken required_).
{% embed url="https://www.stmcyber.com/careers" %}
2022-09-30 10:43:59 +00:00
2024-07-18 20:49:07 +00:00
{% hint style="success" %}
2024-09-16 20:40:46 +00:00
Learn & practice AWS Hacking:<img src="../../.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="../../.gitbook/assets/arte.png" alt="" data-size="line">\
Learn & practice GCP Hacking: <img src="../../.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="../../.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
2024-07-18 20:49:07 +00:00
2022-09-30 10:43:59 +00:00
<details>
2024-07-18 20:49:07 +00:00
<summary>Support HackTricks</summary>
2022-09-30 10:43:59 +00:00
2024-07-18 20:49:07 +00:00
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
2022-09-30 10:43:59 +00:00
</details>
2024-07-18 20:49:07 +00:00
{% endhint %}