Skip to content
Info disclosure Write-up Intermediate

Why you should always scan UDP ports (1/2)

An SNMP service exposed with the default community string allowed enumeration of running processes, which revealed a Jenkins password. The attacker used that password to access Jenkins and its scripting console to obtain a reverse shell.

medium.com

Published on medium.com

Link to part 2

Security Shenanigans, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the SNMP service used the default read-only community string and exposed process command lines containing a Jenkins credential, and the Jenkins scripting console was enabled.

Impact

The attacker could gain a shell on the Jenkins host, and the text says this allowed taking control of the whole network.

What the attacker needed

SNMP reachable over UDP; default community string in use; Jenkins console enabled

How it was found

  1. Scan UDP ports and find an open SNMP port.
  2. Use nmap SNMP scripts and snmpwalk to enumerate the device.
  3. Run the snmp-processes script to list running processes.
  4. Extract the Jenkins password from a process command line.
  5. Log in to Jenkins and open the scripting console.
  6. Run a reverse shell script from the console to get a shell.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

SNMP is a protocol for monitoring network devices, and many devices ship with a default read-only password called a community string. If that default is left in place, anyone can query the device and see details such as running processes. Here, one of those processes had a password typed on its command line, which gave the attacker access to a Jenkins server.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.