Wir wollen keine Zeit verlieren und machen gleich mit Content Discovery weiter!

Task 1 What Is Content Discovery?

Frage 1:
What is the Content Discovery method that begins with M?

Antwort 1:
Manually

Frage 2:
What is the Content Discovery method that begins with A?

Antwort 2:
Automated

Frage 3:
What is the Content Discovery method that begins with O?

Antwort 3:
OSINT

Task 2 Manual Discovery – Robots.txt

Frage 1:
What is the directory in the robots.txt that isn’t allowed to be viewed by web crawlers?

Dazu öffnen wir die robots.txt auf unserer Machine und entdecken ein „verstecktes“ Verzeichnis.

Antwort 1:
/staff-portal

Task 3 Manual Discovery – Favicon

Frage 1:
What framework did the favicon belong to?

Wir benutzen den angegebenen Befehl und holen uns den md5 Hash des Favicons.

curl https://static-labs.tryhackme.cloud/sites/favicon/images/favicon.ico | md5sum
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1406  100  1406    0     0   7990      0 --:--:-- --:--:-- --:--:--  8034
f276b19aabcb4ae8cda4d22625c6735f  -

Diesen geben wir nun in der Favicon Database ein und lassen uns das benutzte Framework ausgeben (hierzu benutzen wir die Suchfunktion unseres Browsers, mit STRG+F).

Antwort 1:
cgiirc

Task 4 Manual Discovery – Sitemap.xml

Frage 1:
What is the path of the secret area that can be found in the sitemap.xml file?

Wir klicken auf den angegebenen Link und kommen so zur sitemap.xml. Wenn wir uns an den gestrigen Raum erinnern, dann bleibt nur ein unbekanntes Verzeichnis übrig:

Antwort 1:
/s3cr3t-area

Besuchen wir die Seite, erhalten wir leider nur folgenden Satz: You found the sitemap endpoint

Task 5 Manual Discovery – HTTP Headers

Frage 1:
What is the flag value from the X-FLAG header?

Wenn wir den angegebenen Befehel benutzen, erhalten wir folgende Ausgabe:

└─$ curl http://10.10.156.98 -v
*   Trying 10.10.156.98:80...
* Connected to 10.10.156.98 (10.10.156.98) port 80 (#0)
> GET / HTTP/1.1
> Host: 10.10.156.98
> User-Agent: curl/7.84.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Server: nginx/1.18.0 (Ubuntu)
< Date: Tue, 23 Aug 2022 14:54:50 GMT
< Content-Type: text/html; charset=UTF-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< X-FLAG: THM{HEADER_FLAG}
--snip--

Antwort 1:
THM{HEADER_FLAG}

Task 6 Manual Discovery – Framework Stack

Frage 1:
What is the flag from the framework’s administration portal?

Jetzt wissen wir wozu die Flag gut ist, die wir gestern gefunden haben!

Wir folgen also der Anleitung und benutzen anschließend den neuen Link:

http://MACHINE_IP/thm-framework-login

Und loggen uns mit admin/admin ein, dahinter erwartet uns die Flag.

Antwort 1:
THM{CHANGE_DEFAULT_CREDENTIALS}

Task 7 OSINT – Google Hacking / Dorking

Frage1:
What Google dork operator can be used to only show results from a particular site?

Antwort 1:
site:

Task 8 OSINT – Wappalyzer

Frage 1:
What online tool can be used to identify what technologies a website is running?

Antwort 1:
Wappalyzer

Task 9 OSINT – Wayback Machine

Frage 1:
What is the website address for the Wayback Machine?

Antwort 1:
https://archive.org/web/

Task 10 OSINT – GitHub

Frage 1:
What is Git?

Antwort 1:
version control system

Task 11 OSINT – S3 Buckets

Frage 1:
What URL format do Amazon S3 buckets end in?

Antwort 1:
.s3.amazonaws.com 

Task 12 Automated Discovery

Frage 1:
What is the name of the directory beginning „/mo….“ that was discovered?

Hier folgen wir einfach der Anleitung. Die Pfade der Befehle sind (bei mir) nur etwas anders als angegeben:

ffuf -w /usr/share/seclists/Discovery/Web-Content/common.txt -u http://10.10.156.98/FUZZ
        /'___\  /'___\           /'___\       
       /\ \__/ /\ \__/  __  __  /\ \__/       
       \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\      
        \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/      
         \ \_\   \ \_\  \ \____/  \ \_\       
          \/_/    \/_/   \/___/    \/_/       

       v1.5.0 Kali Exclusive <3
________________________________________________

 :: Method           : GET
 :: URL              : http://10.10.156.98/FUZZ
 :: Wordlist         : FUZZ: /usr/share/seclists/Discovery/Web-Content/common.txt
 :: Follow redirects : false
 :: Calibration      : false
 :: Timeout          : 10
 :: Threads          : 40
 :: Matcher          : Response status: 200,204,301,302,307,401,403,405,500
________________________________________________

assets                  [Status: 301, Size: 178, Words: 6, Lines: 8, Duration: 69ms]
contact                 [Status: 200, Size: 3108, Words: 747, Lines: 65, Duration: 75ms]
customers               [Status: 302, Size: 0, Words: 1, Lines: 1, Duration: 85ms]
development.log         [Status: 200, Size: 27, Words: 5, Lines: 1, Duration: 72ms]
monthly                 [Status: 200, Size: 28, Words: 4, Lines: 1, Duration: 72ms]
news                    [Status: 200, Size: 2538, Words: 518, Lines: 51, Duration: 73ms]
private                 [Status: 301, Size: 178, Words: 6, Lines: 8, Duration: 62ms]
robots.txt              [Status: 200, Size: 46, Words: 4, Lines: 3, Duration: 63ms]
sitemap.xml             [Status: 200, Size: 1383, Words: 260, Lines: 43, Duration: 63ms]
:: Progress: [4713/4713] :: Job [1/1] :: 600 req/sec :: Duration: [0:00:08] :: Errors: 0 ::

Antwort 1:
/monthly

Frage 2:
What is the name of the log file that was discovered?

Antwort 2:
/development.log