🐚Certificate SSHenanigans
Location - Pixel Island: Rainraster Cliffs
Objective
Solution
First, we look at what the Azure web app provides us with. It looks like it generates an ssh certificate for specific principals.

We can save this cert as id_rsa-cert.pub to authenticate to the server as user "Monitor"

We can close out of the running SatTracker by using ctrl + c
From here, we know that we can leverage the Azure REST API in order to enumerate the system & try to gain access to the source code for the app.
First we get information from the initial API endpoint. This gives us info about the Resource group, subsciption ID, and more.

Next, we get an Aurhtoization token from the oauth endpoint.


In this endpoint, we find a GitHub repository with the source code: https://github.com/SantaWorkshopGeeseIslandsDevOps/northpole-ssh-certs-fa
When we look at the source code, we see that the application actually allows us to set a value for the "principal".

In this situation, we can seemingly request ssh certificates for other users or "principals". So, we try for a default principal "admin" and when we send the request, we get an ssh cert back:

We found out during this that the application written by chatNPT was not secure, as it allowed us to request SSH certificates as other users on the machine.
Last updated