Post 74 - Picklenose, we hardly knew ye

23 Dec 2024

Task 20, Day 14 Certificate mismanagement Even if we’re horribly mismanaged, there’ll be no sad faces on SOC-mas!

Parts of a certificate:

How it Works

Breakdown of what happens with a certificate:

Self-Signed Certificates vs. Trusted CA Certificates

Browsers typically don’t trust self-signed certificates because there is no third-party verification. Just because you say you’re ths entity doesn’t mean you are. Being too trusting leads to man-in-the-middle attacks. Trusted CA certificates are verified by a CA that acts as a trusted third party to confirm an entity is who they say they are.

Attack Vector

Resolve the target website to self in order to prevent DNS logs from alerting others. echo "<ip-address> <web-address.tld>" >> /etc/hosts. Can confirm with cat /etc/hosts. Next, use Burp to set self up as the man-in-the-middle (mitm). Proxy > Intercept off > Proxy Settings. Add new listener for our IP address. Set to port 8080 and toggle on Specific address to specify own address. Burp comes with its own self-signed certificate, and since users were already used to clicking advanced and accept, it won’t phase them with this new cert.

Sniff From the Middle

Reroute all traffic to own machine by adding resolution for website to own IP, setting self up as gateway (full attack is more in depth, just out of scope for this task).

(Dummy mode for this task involves running a script to simulate interactions with the website. If in the wild, it’s not necessary.)

Go to HTTP History section of Burp to see intercepted requests.

The Task

Use the mitm attack to sniff out admin creds and find flags along the way.

Recommeded Stuff

Burp Suite module.