tên challenge: Treasure hunt Mô tả: You must solve...

創建於:2026年4月26日

使用 GPT-5.5 Thinking 回答 Chat01

問題

traffic.pcap

tên challenge: Treasure hunt
Mô tả: You must solve this challenge if you want to come to the final.
flag format: CTFAC{....}
solve challenge với tư duy của top player các giải CTF quốc tế

思考

undefined

思考

undefined

思考

undefined

思考

bash -lc /usr/bin/python3 - <<'PY' import json recs=[json.loads(l) for l in open('/mnt/data/records_time.jsonl')] far=[r for r in recs if r['cx']>40] for r in far: print(f"{r['time']:.3f} v={r['props']['v']:2d} id={r['props']['id']:3d} c={r['inner']['c']:5d} g={r['inner']['g']:4d} l={r['inner']['l']} {r['method']} {r['path']} host={r['host'][:4]} z={r['z']} q={r['q']:<11} r={r['r']} tick={r['tick']} coord=({r['cx']:.6f},{r['cy']:.6f})") PY

Thought for 8m 9s

思考

bash -lc /usr/bin/python3 - <<'PY' cells=[[8,1],[1,29,27],[18,12,26,24],[24,24,28],[13,8,7,17,6],[3,29],[26,14,24,14,19],[19,27,7],[13,20,2],[26,21,29,21,22],[29,24],[20,24,12],[20,11]] import functools,operator for func in [('sum',sum),('xor',lambda g:functools.reduce(operator.xor,g,0)),('prod',lambda g:functools.reduce(operator.mul,g,1)),('count',len),('min',min),('max',max),('range',lambda g:max(g)-min(g)),('first',lambda g:g[0]),('last',lambda g:g[-1])]: name,f=func; vals=[f(g) for g in cells] print(name, vals) print(' raw',bytes([v&255 for v in vals])) print('mod95',''.join(chr((v%95)+32) for v in vals)) print('A1',''.join(chr(65+((v-1)%26)) for v in vals)) PY

Thought for 16m 59s

思考

undefined

思考

undefined

思考

bash -lc /usr/bin/python3 - <<'PY' import json,collections,re recs=[json.loads(l) for l in open('/mnt/data/records_time.jsonl')] for k,v in collections.Counter(tuple(r['conn_tuple']) for r in recs).items(): print(k,v) print('client ports sorted:') for conn,arr in sorted(collections.defaultdict(list, { }).items()): pass by=collections.defaultdict(list) for r in recs: by[tuple(r['conn_tuple'])].append(r) for conn,arr in sorted(by.items(), key=lambda kv:kv[0][1]): print(conn,'n',len(arr),'first',arr[0]['time'],'last',arr[-1]['time'],'vsum',sum(r['props']['v'] for r in arr),'countA',chr(65+((len(arr)-1)%26)), 'vA',chr(65+(sum(r['props']['v'] for r in arr)%26))) PY

Thought for 23m 33s

回答

Mình sẽ submit trước:

CTFAC{aktobe}

Lý do:

  1. Không có flag plaintext trong PCAP: không thấy CTFAC{, flag, treasure, final sau khi grep raw traffic và decoded payload.

  2. Traffic chính không phải DNS/ICMP/UDP mà là HTTP. Có 517 HTTP response chứa JSON wrapper với dữ liệu bị encode theo các chain như hex>, b64>, hex>b64>, b64>hex>.

  3. Sau khi decode các wrapper, payload thật là GeoJSON FeatureCollection. Mỗi feature là một MultiLineString hình chữ X, tức “marker” trên bản đồ — rất đúng với tên challenge Treasure hunt.

  4. Khi gom các marker theo tọa độ trung tâm, phần lớn cụm nằm quanh Balkan/Romania, nhưng có một cụm outlier rất xa ở khoảng:

    lat ≈ 49.997935, lon ≈ 57.004279

  5. Tọa độ này trỏ tới khu vực Aktobe / Aqtobe, Kazakhstan. Các nguồn tọa độ công khai cũng đặt Aktobe quanh 50.27969 N, 57.20718 E, đủ gần để xác định đây là địa danh mà challenge muốn dẫn tới. (Geodatos)

Vì flag format là CTFAC{....} và CTF thường normalize tên địa danh thành lowercase ASCII, đáp án hợp lý nhất là:

text
CTFAC{aktobe}

Nếu checker không nhận, thử fallback theo biến thể địa danh:

text
CTFAC{aqtobe} CTFAC{kazakhstan}

Nhưng mình đánh giá CTFAC{aktobe} là candidate mạnh nhất.

分享這個問答