summaryrefslogtreecommitdiffstats
path: root/solve
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2024-04-01 20:39:11 +0200
committerLouis Burda <quent.burda@gmail.com>2024-04-01 20:39:11 +0200
commitaa75093e0e43ece27948812c0cecf46894c846a2 (patch)
treef23e505bdbd2223dc3b2f1b8f57b6b50f0d39fa7 /solve
downloadcscg2024-for2-master.tar.gz
cscg2024-for2-master.zip
Add solutionHEADmaster
Diffstat (limited to 'solve')
-rw-r--r--solve/flag1
-rw-r--r--solve/intro-forensics-2.pcapngbin0 -> 34584 bytes
-rwxr-xr-xsolve/solve12
3 files changed, 13 insertions, 0 deletions
diff --git a/solve/flag b/solve/flag
new file mode 100644
index 0000000..f82fe59
--- /dev/null
+++ b/solve/flag
@@ -0,0 +1 @@
+CSCG{kn0cking_on_heavens_d000r}
diff --git a/solve/intro-forensics-2.pcapng b/solve/intro-forensics-2.pcapng
new file mode 100644
index 0000000..2c10651
--- /dev/null
+++ b/solve/intro-forensics-2.pcapng
Binary files differ
diff --git a/solve/solve b/solve/solve
new file mode 100755
index 0000000..5365871
--- /dev/null
+++ b/solve/solve
@@ -0,0 +1,12 @@
+#!/usr/bin/env python3
+
+from base64 import b64decode
+import subprocess
+import requests
+import re
+
+packet_filter = "ip.src_host == 192.168.178.21 && ip.dst_host == 45.142.177.160 && tcp.flags.syn == 1"
+cmd = f"tshark -nr intro-forensics-2.pcapng -Y '{packet_filter}' -T fields -e tcp.dstport"
+ports = subprocess.check_output(cmd, shell=True).decode().split("\n")
+ports = b"".join([int.to_bytes(int(p), 2, "big") for p in ports if p.strip() != ""])
+print(ports.decode())