Skip to content
RCE Write-up Beginner

Finding a p1 in one minute with shodan.io RCE

A Jenkins instance allowed anyone to sign up for an account, and after logging in, the user could access the script console and run arbitrary commands on the server. This gave remote code execution to any attacker who found the exposed instance.

Paolo Arnolfo Follow

Published on medium.com

What could possibly be better than Finding a P2 in two minutes with Shodan.io? Easy answer: higher severity, less time!

sw33tLie, 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 Jenkins instance was misconfigured to allow public self-registration and did not restrict access to the script console to administrators only.

What the attacker needed

Jenkins instance exposed on the internet; Self-registration enabled; Script console accessible to any logged-in user

The fix

The Jenkins instance should be configured to disable public self-registration and restrict access to the script console to authorised administrators only.

How it was found

  1. Find Jenkins instances on Shodan that belong to the target company.
  2. On the login page, use the link to create a new account.
  3. Sign up and log in with the new account.
  4. Navigate to the /script endpoint to access the script console.
  5. Execute a command (e.g., list root directory) to confirm remote code execution.

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.

Jenkins is a tool that helps build and test software automatically. The problem was that the server let anyone create an account, and once logged in, a feature meant for administrators let you run commands on the server. That means an outsider could take full control of the machine.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.