Module 25: Attacking AWS Cloud Infrastructure
About the Public Cloud Labs
Leaked Secrets to Poisoned Pipeline - Lab Design
Accessing the Labs
kali@kali:~$ nmcli connection
NAME UUID TYPE DEVICE
Wired connection 1 67f8ac63-7383-4dfd-ae42-262991b260d7 ethernet eth0
lo 1284e5c4-6819-4896-8ad4-edeae32c64ce loopback lo
kali@kali:~$ sudo nmcli connection modify "Wired connection 1" ipv4.dns "203.0.113.84"
kali@kali:~$ sudo systemctl restart NetworkManager
kali@kali:~$ cat /etc/resolv.conf
# Generated by NetworkManager
search localdomain
nameserver 203.0.113.84
...
kali@kali:~$ nslookup git.offseclab.io
Server: 203.0.113.84
Address: 203.0.113.84#53
Non-authoritative answer:
Name: git.offseclab.io
Address: 198.18.53.73Enumeration
Enumerating Jenkins
Enumerating the Git Server
Enumerating the Application
Discovering Secrets
Downloading the Bucket
Searching for Secrets in Git
Poisoning the Pipeline
Enumerating the Repositories


Modifying the Pipeline
Enumerating the Builder
Compromising the Environment via Backdoor Account
Discovering What We Have Access To
Creating a Backdoor Account
Dependency Chain Abuse
Accessing the Labs
Information Gathering
Enumerating the Services
Conducting Open Source Intelligence
Dependency Chain Attack
Understanding the Attack


Creating Our Malicious Package
Command Execution During Install
Command Execution During Runtime
Adding a Payload
Publishing Our Malicious Package
Compromising the Environment
Enumerating the Production Container
Scanning the Network
Loading Jenkins





Exploiting Jenkins






Enumerating with Discovered Credentials
Discovering the State File and Escalating to Admin
Last updated