https://tryhackme.com/room/adventofcyber4
Task 1-5
Diese Tasks enthalten keine Fragen.
Task 6 [Day 1] Frameworks Someone’s coming to town!
Frage 1:
Who is the adversary that attacked Santa’s network this year?
Wir klicken auf „View Site“ und bekommen ein paar Rätsel und Puzzel vorgesetzt. Diese müssen wir lösen und erhalten unsere Antwort:




Antwort 1:
The Bandit Yeti!
Frage 2:
What’s the flag that they left behind?
Diese Antwort erhalten wir aus dem Schritt in Frage 1.
Antwort 2:
THM{IT’S A Y3T1 CHR1$TMA$}
Task 7 [Day 2] Log Analysis Santa’s Naughty & Nice Log
Frage 1:
Use the ls
command to list the files present in the current directory. How many log files are present?
elfmcblue@day-2-log-analysis:~$ ls
SSHD.log webserver.log
elfmcblue@day-2-log-analysis:~$
Antwort 1:
2
Frage 2:
Elf McSkidy managed to capture the logs generated by the web server. What is the name of this log file?
Die Antwort finden wir in der Ausgabe von Frage 1.
Antwort 2:
webserver.log
Frage 3:
On what day was Santa’s naughty and nice list stolen?
Wir suchen mit grep nach Der Liste:
elfmcblue@day-2-log-analysis:~$ grep "santa" webserver.log
10.10.249.191 - - [18/Nov/2022:12:28:16 +0000] "GET /santa HTTP/1.1" 404 437 "-" "gobuster/3.0
.1"
10.10.249.191 - - [18/Nov/2022:12:28:17 +0000] "GET /santa_claus HTTP/1.1" 404 437 "-" "gobust
er/3.0.1"
10.10.249.191 - - [18/Nov/2022:12:28:17 +0000] "GET /evilsanta HTTP/1.1" 404 437 "-" "gobuster
/3.0.1"
10.10.249.191 - - [18/Nov/2022:12:28:18 +0000] "GET /santana HTTP/1.1" 404 437 "-" "gobuster/3
.0.1"
10.10.249.191 - - [18/Nov/2022:12:28:18 +0000] "GET /santabarbara HTTP/1.1" 404 437 "-" "gobus
ter/3.0.1"
10.10.249.191 - - [18/Nov/2022:12:34:39 +0000] "GET /santaslist.txt HTTP/1.1" 200 133872 "-" "
Wget/1.19.4 (linux-gnu)"
10.10.249.191 - - [18/Nov/2022:12:35:18 +0000] "GET /santafe HTTP/1.1" 404 437 "-" "gobuster/3
.0.1"
10.10.249.191 - - [18/Nov/2022:12:35:18 +0000] "GET /jasonsantamar-20 HTTP/1.1" 404 437 "-" "g
obuster/3.0.1"
10.10.249.191 - - [18/Nov/2022:12:35:18 +0000] "GET /santa_maria_maggiore HTTP/1.1" 404 437 "-
" "gobuster/3.0.1"
10.10.249.191 - - [18/Nov/2022:12:35:18 +0000] "GET /santa-clara-county HTTP/1.1" 404 437 "-"
"gobuster/3.0.1"
10.10.249.191 - - [18/Nov/2022:12:35:20 +0000] "GET /texas-santa-barbara HTTP/1.1" 404 437 "-"
"gobuster/3.0.1"
10.10.249.191 - - [18/Nov/2022:12:35:21 +0000] "GET /topicsantafe HTTP/1.1" 404 437 "-" "gobus
ter/3.0.1"
10.10.249.191 - - [18/Nov/2022:12:35:22 +0000] "GET /jasonsantamaria HTTP/1.1" 404 437 "-" "go
buster/3.0.1"
10.10.249.191 - - [18/Nov/2022:12:35:27 +0000] "GET /carlossantana_75 HTTP/1.1" 404 437 "-" "g
obuster/3.0.1"
elfmcblue@day-2-log-analysis:~$
Die Liste wurde am 18.11.2022 heruntergeladen, das war ein Freitag.
Antwort 3:
Friday
Frage 4:
What is the IP address of the attacker?
Die Antwort erhalten wir aus Frage 3.
Antwort 4:
10.10.249.191
Frage 5:
What is the name of the important list that the attacker stole from Santa?
Diese Antwort erhalten wir ebenfalls aus Frage 3 (merkwürdig, jetzt nach dem Namen zu fragen).
Antwort 5:
santaslist.txt
Frage 6:
Look through the log files for the flag. The format of the flag is: THM{}
Hier suchen wir wieder mit grep, jedoch in der anderen Log-Datei:
elfmcblue@day-2-log-analysis:~$ grep "THM" SSHD.log
THM{STOLENSANTASLIST}
elfmcblue@day-2-log-analysis:~$
Antwort 6:
THM{STOLENSANTASLIST}
Task 8 [Day 3] OSINT Nothing escapes detective McRed
Frage 1:
What is the name of the Registrar for the domain santagift.shop?
Hier auf die korrekte Schreibweise achten! Wir checken die whois Daten auf dieser Website.
Antwort 1:
NAMECHEAP INC
Frage 2:
Find the website’s source code (repository) on github.com and open the file containing sensitive credentials. Can you find the flag?
Auf github.com geben wir in die Suchleiste „santagift.shop“ ein und öffnen das Ergebnis. In der Readme Datei sehen wir, dass die Datei „config.php“ sensitive Informationen beinhalten soll, gucken wir hier zuerst:
<?php
$FLAG = '{THM_OSINT_WORKS}';
/**
* If you have arrived here, the flag value is {THM_OSINT_WORKS}
*
--snip--
Und wir haben Glück!
Antwort 2:
{THM_OSINT_WORKS}
Frage 3:
What is the name of the file containing passwords?
Hier wird die Datei gesucht, die wie in Frage 2 geöffnet haben.
Antwort 3:
config.php
Frage 4:
What is the name of the QA server associated with the website?
Etwas weiter unten in config.php finden wir diese Zeile:
$ENV = "PROD"; //santagift.shop - Incase of QA, it will be qa.santagift.shop
Antwort 4:
qa.santagift.shop
Frage 5:
What is the DB_PASSWORD that is being reused between the QA and PROD environments?
Wieder etwas weiter unten finden wir folgende Zeile:
/** Database password */
define( 'DB_PASSWORD', 'S@nta2022' );
Antwort 5:
S@nta2022
Task 9 [Day 4] Scanning Scanning through the snow
Frage 1:
What is the name of the HTTP server running on the remote host?
Finden wir es mit einem nmap Scan heraus:
root@ip-10-10-21-7:~# nmap -sV 10.10.217.141
Starting Nmap 7.60 ( https://nmap.org ) at 2022-12-11 15:36 GMT
Nmap scan report for ip-10-10-217-141.eu-west-1.compute.internal (10.10.217.141)
Host is up (0.0069s latency).
Not shown: 996 closed ports
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.5 (Ubuntu Linux; protocol 2.0)
80/tcp open http Apache httpd 2.4.29 ((Ubuntu))
139/tcp open netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)
445/tcp open netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)
MAC Address: 02:BA:37:DA:C8:8F (Unknown)
Service Info: Host: IP-10-10-217-141; OS: Linux; CPE: cpe:/o:linux:linux_kernel
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 13.57 seconds
Antwort 1:
Apache
Frage 2:
What is the name of the service running on port 22 on the QA server?
Die Antwort erhalten wir aus Frage 1.
Antwort 2:
ssh
Frage 3:
What flag can you find after successfully accessing the Samba service?
Wie im Text angegeben loggen wir uns via smb auf dem Server ein. Hierzu öffnen wir die Ordnerstruktur und geben nach „Location“ die Adresse an. Danach klicken wir auf den „admin“-Ordner, auf „Registered User“ und geben die Logindaten (ubuntu:S@nta2022) ein:

Nun öffnen wir die flag.txt:

Antwort 3:
{THM_SANTA_SMB_SERVER}
Frage 4:
What is the password for the username santahr?
Im selben Ordner der flag.txt ist eine weitere Datei, userlist.txt. Hier finden wir die Zugangsdaten:

Antwort 4:
santa25
Task 10 [Day 5] Brute-Forcing He knows when you’re awake
Frage 1:
Use Hydra to find the VNC password of the target with IP address 10.10.176.198
. What is the password?
Hier basteln wir uns unseren Befehl für Hydra. VNC benötigt keinen Benutzernamen!
root@ip-10-10-21-7:~# hydra -P /usr/share/wordlists/rockyou.txt 10.10.176.198 vnc -t 4
Hydra v8.6 (c) 2017 by van Hauser/THC - Please do not use in military or secret service organizations, or for illegal purposes.
Hydra (http://www.thc.org/thc-hydra) starting at 2022-12-11 16:16:00
[DATA] max 4 tasks per 1 server, overall 4 tasks, 14344398 login tries (l:1/p:14344398), ~3586100 tries per task
[DATA] attacking vnc://10.10.176.198:5900/
[STATUS] 577.00 tries/min, 577 tries in 00:01h, 14343821 to do in 414:20h, 4 active
[5900][vnc] host: 10.10.176.198 password: 1q2w3e4r
[STATUS] 582.33 tries/min, 1747 tries in 00:03h, 14342651 to do in 410:30h, 4 active
Antwort 1:
1q2w3e4r
Frage 2:
Using a VNC client on the AttackBox, connect to the target of IP address 10.10.176.198
. What is the flag written on the target’s screen?
Wir benutzen Remmina, wie in dem Task angegeben, und loggen uns auf der Machine ein. Auf dem Remote Screen sehen wir dann unsere Flag:

Antwort 3:
THM{I_SEE_YOUR_SCREEN}