For the complete documentation index, see llms.txt. This page is also available as Markdown.

Jenkins

Discovery

  • Default port: 8080

  • Also uses port 5000 for slave servers

  • Runs on Tomcat

  • Often runs as SYSTEM (Windows) or root (Linux)

If Jenkins is only listening on localhost after getting a shell or SSH access, forward it:

ssh USER@TARGET -L 9999:127.0.0.1:8080

Then browse to:

http://127.0.0.1:9999/login?from=%2F

Jenkins setup pages may reference the initial admin password path:

/root/.jenkins/secrets/initialAdminPassword

Default Credentials

admin:admin
admin:password
jenkins:jenkins

Script Console RCE (Authenticated)

Path: Manage Jenkins → Script Console or /script

Linux Reverse Shell (Groovy)

Linux - Alternative

Windows Command Execution

Windows Reverse Shell (Groovy)


Metasploit


CVEs

CVE
Description

CVE-2018-1999002 + CVE-2019-1003000

Pre-auth RCE (v2.137)

CVE-2019-1003000

Sandbox bypass

CVE-2024-23897 - CLI Arbitrary File Read

Jenkins 2.401.2 can be vulnerable to arbitrary file read through the CLI parser. If denyAnonymousReadAccess is false or the target otherwise permits CLI access, use CVE-2024-23897 to read files through the local forwarded port.

Read a simple file first:

The output may be embedded in CLI error text:

Read the initial administrator password:

Successful leak:

Reference:

  • https://nvd.nist.gov/vuln/detail/CVE-2024-23897

Last updated