sewing-waste-and-agriculture-leftovers

手动追踪了一下UDP流,然后一行行对比可见字符,拼出完整flag:kalmar{if_4t_first_you_d0nt_succeed_maybe_youre_us1ng_udp}

赛后Discord群内的一行命令解出

1
2
tshark -2 -r swaal.pcap -R "udp.port==9999" -T fields -e data | tr -d '\n' | fold -w 120 | while read l; do echo "$l" | xxd -r -p | tr -d '\n'; echo; done > raw_bytes.txt
for i in {1..58}; do cat raw_bytes.txt | cut -b "$i" | sort -u | tr -d '\n'; done; echo

cards

所有的flagpart.txt拼起来应该是这样的(确实存在一个换行),不知道shuffle的规则是什么

1
2
m_tfwr_flf_3eccaykdw_hhuhrld{erae
_onsuo}04afr__ar_u1ut_ksffklas_hsce33f_e3p_hn

病急乱投医,实在找不到有啥顺序相关的东西了,于是想对应CWD的大小顺序重新排列,应该是个没啥用的尝试

1
2
3
4
5
6
7
8
9
10
11
CWD = "349 366 361 369 373 365 377 380 383 386 378 391 393 397 382 405 402 401 417 347 348 357 372 360 375 389 388 395 396 410 394 411 416 413 420 343 344 346 353 354 358 359 362 368 370 371 381 398 387 403 406 419 342 350 351 352 355 363 379 376 384 385 392 400 412 414 345 356 364 367 374 390 407 408 404 415 409 399 418"
string = "m_tfwr_flf_3eccaykdw_hhuhrld{erae\n_onsuo}04afr__ar_u1ut_ksffklas_hsce33f_e3p_hn"

CWD = CWD.split(" ")
CWD = [int(i) - 342 for i in CWD]
for i in range(len(CWD)):
print(string[CWD[i]], end="")

# Output:
# fhwdauou0fnru_}skfpr_ard
# __ute133fn_tw3eyk_l{eokrl_hmlf_chs_4a_f3_fchreahsaecs

赛后看wp说就是对应CWD的顺序,但我能找到的CWD顺序就是上面脚本中那样,头大

终于解出来了。CWD顺序是len=35的数据中的directory,即“150 Opening BINARY mode data connection for flagpart.txt (1 bytes).”的数据,并且原脚本字符排序方式也是错误的…重写的脚本用的键值对的思想重排字符串

1
2
3
4
5
6
7
8
9
10
11
12
13
14
CWD = "345 377 378 385 384 404 368 352 354 361 383 413 355 381 397 403 369 382 400 418 386 408 388 409 358 399 412 414 348 363 347 366 405 420 364 370 416 357 359 384 419 417 380 346 353 390 392 406 343 379 396 371 362 351 393 372 373 407 411 410 342 344 398 401 356 394 349 365 391 375 395 360 402 389 374 376 415 350 367"
string = "m_tfwr_flf_3eccaykdw_hhuhrld{erae\n_onsuo}04afr__ar_u1ut_ksffklas_hsce33f_e3p_hn"

CWD = CWD.split(" ")
CWD = [int(i) - 342 for i in CWD]
key_value = {}
for i in range(len(CWD)):
key_value[CWD[i]] = string[i]
for i in sorted(key_value.keys()):
print(key_value[i], end="")

# Output:
# kalmar{shuffle_shuff1e_can_you_k33p_tr4ck_of_here_th3_cards_are_shuffl3d_n0w}
#

感谢diffany的帮助,然后手搓了一下直接解题的脚本,大佬实在tql,orz

1
2
3
4
5
6
7
8
9
10
11
12
import os

string = ""
for i in range(79, 158):
cmd = "tshark -r cards.pcap -qz follow,tcp,raw," + str(i) + " | awk '{a[NR]=$0}END{print a[NR-1]}' | sed 's/^[ \t]*//;s/[ \t]*$//'"
string += bytes.fromhex(os.popen(cmd).read()).decode("utf-8")
cmd = "tshark -r cards.pcap -Y 'frame.len == 135 and ftp.current-working-directory' -T fields -e ftp.current-working-directory"
CWD = os.popen(cmd).read().split("\n")
CWD.pop()
CWD = [int(i) - 342 for i in CWD]
for i in range(len(CWD) - 1):
print(string[CWD.index(i)], end="")

lleHSyniT!

直接以文本形式打开proc.dmp,搜索kalmar拿到flag:kalmar{My_F4v0r1t3_G4m3_1s_Cobalt_Strike:gL0b4l_0p3r4t0rs}

命令行

1
2
3
4
5
$ file proc.dmp
proc.dmp: Mini DuMP crash report, 17 streams, Thu Feb 23 07:38:10 2023, 0x469925 type

$ strings proc.dmp | grep kalmar
password:kalmar{My_F4v0r1t3_G4m3_1s_Cobalt_Strike:gL0b4l_0p3r4t0rs}

Invoiced

耀哥的wp,稍微做个笔记

1
2
3
4
5
6
7
8
9
10
11
12
13
用meta来重定向......

http-equiv:定义与 HTTP 头部一起使用的名称。如果网页从 Web 服务器传送,则该属性会被忽略。
http-equiv 是 <meta> 标签中的一个可选属性,用于模拟 HTTP 头信息中的一些属性。当 http-equiv 属性被设置时,content 属性必须也被设置,以提供额外的信息。
http-equiv 属性通常用于控制页面的缓存、重定向、字符集、XSS保护等行为。以下是一些常用的 http-equiv 属性:
content-language:指定文档的语言,如 <meta http-equiv="content-language" content="zh-CN"> 表示页面使用简体中文语言。
expires:指定网页的到期时间,如 <meta http-equiv="expires" content="Tue, 01 Jan 2030 00:00:00 GMT"> 表示网页的到期时间是 2030 年 1 月 1 日。
refresh:指定网页的刷新时间和重定向地址,如 <meta http-equiv="refresh" content="5;URL=http://www.example.com/"> 表示网页将在 5 秒后自动刷新并重定向到 http://www.example.com/。
content-type:指定网页的 MIME 类型和字符集,如 <meta http-equiv="content-type" content="text/html;charset=UTF-8"> 表示网页是 HTML 格式,并使用 UTF-8 字符集。
X-UA-Compatible:指定浏览器的兼容模式,如 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 表示强制使用最新的 IE 内核。


address=asd&discount=FREEZTUFSSZ1412&email=8870%40qq.com&name=<meta http-equiv="refresh" content="0; url=http://127.0.0.1:5000/orders">&phone=1