Skip to content

Instantly share code, notes, and snippets.

@pich4ya
Created October 22, 2017 15:58
Show Gist options
  • Save pich4ya/7130935b4ba1abac24dbb5043b17baa2 to your computer and use it in GitHub Desktop.
Save pich4ya/7130935b4ba1abac24dbb5043b17baa2 to your computer and use it in GitHub Desktop.
Thailand CTF 2017 Write-up : Compression (150)
โจทย์ Compression.txt
3c
94
d5
28
17
f0
00
30
48
30
44
36
86
dd
60
00
00
00
00
28
06
40
26
20
00
00
22
50
21
15
02
30
48
ff
fe
30
44
36
24
00
cb
00
20
48
00
01
00
00
00
00
68
14
00
55
99
70
00
50
ae
ed
a1
55
00
00
00
00
a0
02
16
80
d6
0d
00
00
02
04
05
a0
04
02
08
0a
02
21
00
94
00
00
00
00
01
03
03
06
วิธีแก้
1.) แปลง hex > binary form
$ cat Compression.txt |tr -d ' '|tr -d '\n'|xxd -r -p > comp.bin
2.) ใช้ text2pcap แปลง binary เป็น pcap แต่ต้องใช้ format ของ hexdump เป็น input
$ hexdump comp.bin > comp-hexdump.txt
$ text2pcap comp-hexdump.txt comp-flag.pcap
Input from: comp-hexdump.txt
Output to: comp-flag.pcap
Output format: PCAP
Wrote packet of 94 bytes.
Read 1 potential packet, wrote 1 packet (134 bytes).
3.) เปิด pcap ที่ได้จะเจอ TCP 1 packet ตอบ destination IPv6 เป็น flag (เดาเอา)
เปิด pcap ด้วย Wireshark > เลือก packet > IPv6 section ข้างล่าง > Destination > คลิกขวา copy > Value
Flag: 2400:cb00:2048:1::6814:55
@thanapatr1
Copy link

ขอขั้นตอนการสร้างโจทย์ได้ไหมครับ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment