Exploit Jenkins to gain an initial shell, then escalate your privileges by exploiting Windows authentication tokens.
Scanning
nmap
root@ip-10-10-77-178:~# nmap -A -T4 -O 10.10.126.34
Starting Nmap 7.60 ( https://nmap.org ) at 2021-09-21 16:30 BST
Nmap scan report for ip-10-10-126-34.eu-west-1.compute.internal (10.10.126.34)
Host is up (0.00046s latency).
Not shown: 997 filtered ports
PORT STATE SERVICE VERSION
80/tcp open http Microsoft IIS httpd 7.5
| http-methods:
|_ Potentially risky methods: TRACE
|_http-server-header: Microsoft-IIS/7.5
|_http-title: Site doesn't have a title (text/html).
3389/tcp open tcpwrapped
| ssl-cert: Subject: commonName=alfred
| Not valid before: 2021-09-20T15:27:46
|_Not valid after: 2022-03-22T15:27:46
8080/tcp open http Jetty 9.4.z-SNAPSHOT
| http-robots.txt: 1 disallowed entry
|_/
|_http-server-header: Jetty(9.4.z-SNAPSHOT)
|_http-title: Site doesn't have a title (text/html;charset=utf-8).
MAC Address: 02:1A:CA:11:02:A3 (Unknown)
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Aggressive OS guesses: Microsoft Windows Server 2008 (90%), Microsoft Windows Server 2008 R2 (90%), Microsoft Windows Server 2008 R2 or Windows 8 (90%), Microsoft Windows 7 SP1 (90%), Microsoft Windows 8.1 Update 1 (90%), Microsoft Windows 8.1 R1 (90%), Microsoft Windows Phone 7.5 or 8.0 (90%), Microsoft Windows Server 2008 or 2008 Beta 3 (89%), Microsoft Windows Server 2008 R2 or Windows 8.1 (89%), Microsoft Windows Server 2008 R2 SP1 (89%)
No exact OS matches for host (test conditions non-ideal).
Network Distance: 1 hop
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows
TRACEROUTE
HOP RTT ADDRESS
1 0.46 ms ip-10-10-126-34.eu-west-1.compute.internal (10.10.126.34)
OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 33.09 seconds
3 Ports open
Enumeration
Port 80
landing page after some enum no thing interesting except this mail alfred@wayneenterprises.com
Port 8080
Jenkins login page ... after some tries of default credentials admin:admin
Now we should find a way to execute reverse shell jenkins has this ability just copy me