πŸ•΅οΈ
VeryLazyTech
πŸ“œ MediumπŸ›’ My ShopπŸ‘Ύ GithubπŸ“© Telegram πŸ“Ί YouTubeβœ– Twitter
  • πŸ•΅οΈWelcome!
    • VeryLazyTech
    • Support VeryLazyTech
      • πŸ‘Ύ GitHub
      • πŸ“œ Medium
      • β˜• My Shop
      • πŸ“Ί YouTube
      • βœ– Twitter
      • πŸ“© Telegram
  • πŸ›‘οΈ Vulnerabilities and Exploits
    • CVE - POC
      • Unauthenticated RCE Flaw in Rejetto HTTP File Server - CVE-2024-23692
      • POC - CVE-2024–4956 - Nexus Repository Manager 3 Unauthenticated Path Traversal
      • POC - CVE-2024-45241: Path Traversal in CentralSquare's CryWolf
      • Telerik Auth Bypass CVE-2024-4358
      • Check Point Security Gateways Information Disclosure - CVE-2024-24919
      • CVE-2024-23897 - Jenkins File Read Vulnerability
      • CVE-2024–10914- Command Injection Vulnerability in name parameter for D-Link NAS
      • POC - CVE-2024-21534 Jsonpath-plus vulnerable to Remote Code Execution (RCE)
      • CVE-2024-9935 - PDF Generator Addon for Elementor Page Builder <= 1.7.5 - Unauthenticated Arbitrary
      • CVE-2024-50623- Cleo Unrestricted file upload and download
      • POC - WordPress File Upload plugin, in the wfu_file_downloader.php file before version <= 4.24.11
      • POC - Remote and unauthenticated attacker can send crafted HTTP requests to RCE - cve-2025-3248
      • POCβ€Š-β€ŠCVE-2025–2539 File Away <= 3.9.9.0.1β€Š-β€ŠMissing Authorization to Unauthenticated Arbitrary File
      • POC - CVE-2025-29306 FOXCMS /images/index.html Code Execution Vulnerability
  • πŸ•΅οΈβ€β™‚οΈDorks
    • GitHub Dorks
    • Google Dork Online Tool
  • πŸ“š Resources
    • Top Hacking Books for 2024: FREE and Paid
    • How to Study for OSCP with the PWK Book PDF
    • Top 20 phishing tools to use in 2024
    • Top 8 Bug Bounty Books for 2025: Must-Reads for Ethical Hackers
    • Top Hacking Tools and Skills You Need to Learn in 2025
    • Offensive Cloud
    • Penetration Testing & Hacking Tools List
    • Top Cybersecurity Books by Topic
  • The Ultimate Penetration Testing Methodology (2025 Edition)
  • πŸ•ΈοΈPentesting Web
    • Client Side Template Injection (CSTI)
    • Identify a Server’s Origin IP
    • 2FA/MFA/OTP Bypass
  • IDOR
  • Open Redirect
  • Subdomain Takeover
  • Penetration Testing WiFi Networks
  • Client-Side Path Traversal
  • Clickjacking
  • Command Injection
  • JWT Vulnerabilities
  • Bypass rating limit
  • CORS - Misconfigurations & Bypass
  • LDAP Injection
  • File upload vulnerabilities
  • Content Security Policy (CSP) bypass
  • 🐧Linux
    • Practical Linux Commands
    • Bypassing Bash Restrictions - Rbash
    • Privilege escalation - Linux
  • Linux Environment Variables
  • πŸͺŸWindows
    • Active Directory Methodology
  • 🌐Network Pentesting
    • FTP - Port 21
    • SSH- Port 22
    • Telnet - Port 23
    • SMTP/s - Port 25,465,587
    • WHOIS - Port 43
    • TACACS+ - Port 49
    • DNS - Port 53
    • TFTP/Bittorrent-tracker - Port 69/UDP
    • Finger - Port 79
    • Web - Port 80,443
    • Kerberos - Port 88
    • POP - Port 110/995
    • Portmapper - Port 111/TCP/UDP
    • Ident - Port 113
    • NTP - Port 123/UDP
    • MSRPC - Port 135, 539
    • NetBios - Port 137,138,139
    • SMB - Port 139 445
    • IMAP - Port 143, 993
    • SNMP - Ports 161, 162, 10161, and 10162/UDP
    • IRC - Ports 194,6667,6660-7000
    • Check Point Firewall - Port 264
    • LDAP - Ports 389, 636, 3268, 3269
    • IPsec/IKE VPN - Port 500/UDP
    • Modbus - Port 502
    • Rexec - Port 512
    • Rlogin - Port 513
    • Rsh - Port 514
    • Line Printer Daemon (LPD) - Port 515
    • Apple Filing Protocol (AFP) - PORT 548
    • RTSP - Port 554, 8554
    • IPMI - Port 623/UDP/TCP
    • Internet Printing Protocol (IPP) - Port 631
    • EPP - Port 700
    • Rsync - Port 873
    • Rusersd Service - Port 1026
    • Socks - Port 1080
    • Java RMI - RMI-IIOP - Port 1098/1099/1050
    • MSSQL (Microsoft SQL Server) - Port 1433
    • Oracle TNS Listener - Port 1521,1522-1529
  • PPTP - Port 1723
  • MQTT (Message Queuing Telemetry Transport) - Port 1883
  • Compaq HP Insight Manager - Port 2301, 2381
  • NFS Service - Port 2049
  • Docker - Port 2375,2376
  • Squid - Port 3128
  • iScsi - Port 3260
  • SAPRouter - Port 3299
  • 😎Post-exploitation
    • File Transfer Cheatsheet: Windows andΒ Linux
  • πŸ§‘β€πŸ”§Technical guides
    • Kali Linux - Installation
Powered by GitBook
On this page
  • Basic info
  • Understanding SNMP Ports
  • Port 161/UDP - SNMP Agent Communication
  • Port 162/UDP - SNMP Manager Communication
  • Ports 10161 and 10162/UDP - SNMPv3 (Secure) Communication
  • Common Vulnerabilities in SNMP

Was this helpful?

  1. Network Pentesting

SNMP - Ports 161, 162, 10161, and 10162/UDP

PreviousIMAP - Port 143, 993NextIRC - Ports 194,6667,6660-7000

Last updated 2 months ago

Was this helpful?

Support VeryLazyTech πŸŽ‰

Become VeryLazyTech ! 🎁

  • Follow us on:

    • βœ– Twitter .

    • πŸ‘Ύ Github .

    • πŸ“œ Medium .

    • πŸ“Ί YouTube .

    • πŸ“© Telegram .

    • πŸ•΅οΈβ€β™‚οΈ My Site .

  • Visit our for e-books and courses. πŸ“š

Basic info

The Simple Network Management Protocol (SNMP) is a widely used protocol for managing and monitoring devices in an IP network. It enables the exchange of management information between network devices such as routers, switches, firewalls, servers, and more. While SNMP is invaluable for network administrators, it can also present a vulnerability if improperly configured or exposed to unauthorized access.

In penetration testing, one of the key areas of focus is identifying weaknesses in SNMP, particularly on commonly used UDP ports like 161, 162, 10161, and 10162. These ports are the default for SNMP operations and can often be leveraged for exploitation. In this article, we'll explore how these ports work, the potential risks they pose, and how to test them effectively during a penetration test.

Understanding SNMP Ports

Port 161/UDP - SNMP Agent Communication

Port 161 is the primary port used by SNMP agents to receive requests from SNMP managers. This port is responsible for handling requests such as:

  • Get: Retrieving information from devices.

  • Set: Modifying the configuration of devices.

  • Trap: Sending unsolicited notifications from the device to the manager.

Port 162/UDP - SNMP Manager Communication

Port 162 is used by SNMP managers to receive trap messages. These are notifications sent from SNMP agents about certain events or thresholds that have been exceeded. Traps are important for real-time monitoring but can also expose critical information about the network if intercepted by an attacker.

Ports 10161 and 10162/UDP - SNMPv3 (Secure) Communication

In SNMPv3, the communication is encrypted, and it uses ports 10161 and 10162. These ports offer a more secure way to handle SNMP requests and responses, as SNMPv3 includes support for authentication and encryption (AES and DES). Despite the added security, misconfigurations can still create vulnerabilities.

Common Vulnerabilities in SNMP

While SNMP itself is not inherently insecure, improper configurations or weak implementations can make it a target for attackers. Some of the most common vulnerabilities include:

  1. Default Community Strings SNMP uses community strings, which act as passwords for accessing the device’s management features. The default community strings, such as "public" and "private," are often left unchanged. If an attacker knows or guesses these strings, they can gain access to sensitive data.

  2. Lack of Encryption (SNMPv1 and SNMPv2c) Earlier versions of SNMP (v1 and v2c) do not support encryption, making the data transmitted over the network easily readable. Attackers can sniff network traffic to capture community strings or other sensitive information.

  3. Weak Authentication (SNMPv3) While SNMPv3 supports encryption, its authentication mechanisms can still be weak if poorly configured. Attackers may exploit misconfigured SNMPv3 settings to bypass security measures.

  4. Misconfigured Access Controls Improper access controls can expose SNMP services to unauthorized users. If these controls aren’t adequately implemented, attackers may gain access to SNMP agents and perform actions like changing configurations or exfiltrating sensitive data.

  5. Device Fingerprinting via SNMP SNMP is often used to gather information about network devices. Attackers can exploit publicly exposed SNMP services to fingerprint devices and map out the network topology, which could provide valuable information for later attacks.

Penetration Testing SNMP on Ports 161, 162, 10161, and 10162

Penetration testers commonly target SNMP during a network assessment to identify misconfigurations and vulnerabilities. Testing SNMP typically involves both passive reconnaissance (gathering information) and active exploitation (exploiting identified vulnerabilities).

Here’s how you can test SNMP effectively during a penetration test:

1. Banner Grabbing

Start by identifying devices running SNMP services on ports 161 and 162. Use tools like Nmap or Masscan to scan the network for these ports. This can help you identify devices running SNMP services.

nmap -p 161,162 <target_ip>

2. SNMP Enumeration

Once you’ve identified devices with SNMP services, you can use enumeration tools like snmpwalk, snmpget, or snmpbulkwalk to gather information from the target devices. If the community string is default or weak, you may be able to retrieve valuable information such as device configurations, running processes, and network interfaces.

snmpwalk -v 2c -c public <target_ip>

3. Brute Force Attacks

If the default community string is not exposed, you can attempt to brute-force community strings with tools like Hydra or SnmpBrute. A successful guess of the community string can allow you to interact with the SNMP agent and gather sensitive data.

hydra -l admin -P /path/to/wordlist snmp://<target_ip>

4. Exploiting SNMP Traps

If port 162 is open, you can attempt to intercept or send custom SNMP traps. Tools like Wireshark can be useful to monitor for inbound traps, while Metasploit offers the ability to send malicious traps that could trigger an alert or crash the SNMP service.

5. SNMPv3 Testing

When testing SNMPv3, ensure that the devices are using proper authentication and encryption. Weak credentials or misconfigured devices can expose sensitive data or allow unauthorized changes to network configurations. Tools like snmpwalk can also be used with SNMPv3, specifying the username, authentication method, and encryption options.

snmpwalk -v 3 -u <username> -a SHA -A <auth_password> -x AES -X <encryption_password> <target_ip>

6. SNMP Write Operations

Misconfigured devices may allow write operations using SNMP. Attackers can change configurations, such as routing tables or device settings, which can have a major impact on network security. It's crucial to test for such vulnerabilities and ensure that write access is restricted or properly protected.

snmpset -v 2c -c private <target_ip> <OID> <value>
Support VeryLazyTech πŸŽ‰
  • Follow us on:

Learn & practice

Become VeryLazyTech ! 🎁

βœ– Twitter .

πŸ‘Ύ Github .

πŸ“œ Medium .

πŸ“Ί YouTube .

πŸ“© Telegram .

πŸ•΅οΈβ€β™‚οΈ My Site .

Visit our for e-books and courses. πŸ“š

🌐
member
@VeryLazyTech
@VeryLazyTech
@VeryLazyTech
@VeryLazyTech
@VeryLazyTech
@VeryLazyTech
shop
For the OSCP.
member
@VeryLazyTech
@VeryLazyTech
@VeryLazyTech
@VeryLazyTech
@VeryLazyTech
@VeryLazyTech
shop