# Enumeration

Now to use Gobuster to see what vulnerabilities could be available

<figure><img src="https://2022164620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtzurpgroDJSMn9AFVmQP%2Fuploads%2FOA434tThK207KLvFwBCD%2F6.PNG?alt=media&#x26;token=13042398-5bcb-41ef-bea8-501c42840db4" alt=""><figcaption></figcaption></figure>

returned "/css", "/index.php" and "/index.html"

Port 8080 shows a login portal with a link to the reset password page. Unlike the home page, the pages are not PHP and the HTTP Header shows X-Forwarded-Server: Golang. Sending the payload {{ will return an HTTP 502.

Even though I plan to learn about Golang, I have never used it before and had to google why Go SSTI was so important.

<figure><img src="https://2022164620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtzurpgroDJSMn9AFVmQP%2Fuploads%2F7h1IYNbwhXBuOgRwocxW%2F7.PNG?alt=media&#x26;token=7156d94e-fb51-4b2f-8095-3f994d98bd98" alt=""><figcaption></figcaption></figure>

it recommended trying {{.}}

<figure><img src="https://2022164620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtzurpgroDJSMn9AFVmQP%2Fuploads%2FSieiJUjpCBTKM4xaydbj%2F8.PNG?alt=media&#x26;token=3779153f-f113-4174-ac11-e3fd3536f7e9" alt=""><figcaption></figcaption></figure>

Before that I was trying random admin admin password and email combinations. This is just a random one I saved from those searches.

<figure><img src="https://2022164620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtzurpgroDJSMn9AFVmQP%2Fuploads%2FQQMOlWQ3CclMPBgVQJho%2F9.PNG?alt=media&#x26;token=3af38985-879f-42ae-81ad-77549b94a677" alt=""><figcaption></figcaption></figure>

Now trying forgot password

<figure><img src="https://2022164620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtzurpgroDJSMn9AFVmQP%2Fuploads%2FlSY81sWNV9AW04mFt0iP%2F10.PNG?alt=media&#x26;token=4f3b4cc7-af7d-4793-95ef-8782cbd24a8f" alt=""><figcaption></figcaption></figure>

Now sending the information I proxy'ed from forgot password through repeater and response. I am able to then try the golang ssti i picked up and I am presented with the email and password dumped within response.

<figure><img src="https://2022164620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtzurpgroDJSMn9AFVmQP%2Fuploads%2FKU8z32DtwFKLxHN2XP2e%2F11.PNG?alt=media&#x26;token=08bccac1-644e-4825-bbf6-0cb704f85f65" alt=""><figcaption></figcaption></figure>

After logging in with the credentials, I am greeted with Golang sorce code.

This confused me for a while so I had to get some help.

<figure><img src="https://2022164620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtzurpgroDJSMn9AFVmQP%2Fuploads%2Fiffx3696DvHsx7OjYeTg%2F12.PNG?alt=media&#x26;token=6b2c1ee1-ae92-4bca-baea-c4c7c69573e0" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2022164620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtzurpgroDJSMn9AFVmQP%2Fuploads%2FCKohYXqIUU9l4feiDsRp%2F13.PNG?alt=media&#x26;token=05c083ed-2520-4991-a73d-ea88f5a9bca1" alt=""><figcaption></figcaption></figure>

I was shown if I put "{{DebugCmd "id" }}" to replace the original email address, I would be given a reverse shell with root access!

This is a docker container without ping, curl, wget, nc, etc which makes getting custom binaries on the box difficult. Further testing also shows that this docker container cannot access the internet so all commands need to be sent through the web requests

<figure><img src="https://2022164620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtzurpgroDJSMn9AFVmQP%2Fuploads%2FCziOpjZksCTDZ73MAN5L%2F14.PNG?alt=media&#x26;token=de4edefe-c55c-4b02-a13c-189fb4ec9e02" alt=""><figcaption></figcaption></figure>

with hostname I can see that this is a AWS service

<figure><img src="https://2022164620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtzurpgroDJSMn9AFVmQP%2Fuploads%2FjLcKQP307ttlJ2v6eB8J%2F15.PNG?alt=media&#x26;token=55547c5c-fe43-4548-958b-1bbd93e2bdba" alt=""><figcaption></figcaption></figure>

Its never this easy... tried to get credentials to the service. That was unavailabe but I can still use my burpsuite webshell to explore the aws box

<figure><img src="https://2022164620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtzurpgroDJSMn9AFVmQP%2Fuploads%2FoHuHUdhVGU7gye5VSryx%2F16.PNG?alt=media&#x26;token=2ed70910-27a9-4800-8526-dc936fcc628b" alt=""><figcaption><p>holy mother of...</p></figcaption></figure>
