Skip to content
Info disclosure Write-up Beginner

Shodan’t Have Shown That: How an Exposed Device Led to Source C

An exposed Jenkins server allowed anonymous login, and its build logs contained plaintext GitHub credentials. The attacker used these to clone the company's internal source code repository, which included production database credentials, AWS tokens, and SSH keys.

iski Follow

Published on infosecwriteups.com

Free Link 🎈

Iski, 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

Root cause

Likely the Jenkins server was misconfigured to allow anonymous access, and build logs stored credentials in plaintext.

Impact

The attacker could access source code, production database credentials, AWS tokens, and SSH keys, potentially leading to further compromise.

What the attacker needed

Jenkins exposed on the internet; Anonymous login enabled; Build logs contain secrets

How it was found

  1. Search Shodan for Jenkins servers on port 8080 in India.
  2. Identify a staging Jenkins instance with anonymous login enabled.
  3. Browse the build history and open the 'push-to-github' job log.
  4. Extract the plaintext GitHub username and password from the log.
  5. Clone the internal-api repository using the leaked credentials.
  6. Inspect the repository for .env files, tokens, and deployment scripts.

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.

A Jenkins server is a tool that automates building and deploying software. If it is left open to the internet without a password, anyone can read its build logs, which sometimes contain secret passwords or keys. Here, those secrets let the attacker download the company's private code and access other systems.

What is Info disclosure?

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

More by iski

View all

186 more disclosed reports, best first.

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.