Skip to content
RCE Write-up Intermediate

I Found Root Access On Critical Financial Infrastructure Using A Two Day Old Kernel Exploit

An exposed Jenkins instance allowed open registration, giving the researcher access to the Script Console and command execution as the jenkins user. A two-day-old public kernel exploit then provided root access, exposing database backups, cryptographic keys, and source code.

ReFang Follow

Published on infosecwriteups.com

My name is Hamza Hashim. I’m an offensive security researcher and if you’ve followed my work before, you know I like to share what I find in the wild, not to show off, but because I genuinely believe the community gets stronger when we talk openly about how these things happen.

ReFang, on infosecwriteups.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

Impact

An attacker could execute commands as the jenkins user and escalate to root, potentially accessing database backups, cryptographic keys, and source code, and could use a GitHub Actions key to push code into official repositories.

What the attacker needed

Jenkins exposed on the internet; Open user registration enabled; Unpatched Linux kernel

The fix

The server should be firewalled or taken offline, open registration disabled, strong authentication required, all keys rotated, backups moved to an encrypted vault, and the kernel patched.

How it was found

  1. Scan for open ports and find port 8080 hosting a Jenkins dashboard.
  2. Navigate to the /manage endpoint and observe a Register button.
  3. Register an account and gain access to the management interface.
  4. Use the Script Console at /manage/script to execute a command confirming the jenkins user.
  5. Build a reverse shell payload and run it to obtain an interactive shell.
  6. Download and compile a public kernel exploit, run it, and obtain root.

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 automates building and testing software. This server was left open to the internet with a sign-up page, so anyone could create an account and use a built-in feature to run commands on the machine. A recently published flaw in the operating system then let the researcher become the all-powerful root user.

What is RCE?

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

More by ReFang

View all

1 more disclosed report, best first.

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.