2025冬季挑战:Quinindrome
几个月过去了,自Synacktiv夏季挑战赛结束以来,第一片雪花已经飘落。该活动取得了成功,甚至有一位参与者在构思解决方案时发现了一个零日漏洞!虽然尚未公开,但将在Synacktiv网站后续的文章中详述。随着冬季来临,现在是时候推出Synacktiv冬季挑战赛了!加入其他参与者的行列,参加这场代码高尔夫竞赛,并在1月1日之前提交你的解决方案 🏌️。
目录
🎁 奖品
🏆 挑战内容
📩 参与方式
🖥️ 测试虚拟机
🥷🏼 额外挑战
🏅 当前排行榜
想要提升技能?探索我们的培训课程!了解更多。
🎁 奖品
前三名参赛者将获得以下奖品:
- 第一名:这套出色的iFixit工具包和一个焊台,助你修复所有电子设备。
- 第二名:这款8端口PoE+ Netgear交换机,非常适合家庭网络。
- 第三名:一个用于安全身份验证的Yubikey 5C NFC密钥!
🏆 挑战内容
核心是设计一个“quinindrome”,即一个满足以下两个要求的ELF二进制文件:
- 是回文,意味着它完全对称。
- 是字节级的“quine”:执行时在标准输出上打印其自身的文件内容。
当然,进程必须正常结束而不发生段错误,且返回代码必须设置为0。
参加过前一次挑战的人会认出这个主题,但请注意:你需要采用非常不同的技术来尽可能地优化你的解决方案。这一次,你必须巧妙地处理ELF文件的头部,并找到构成你程序的x86指令的最佳布局!
以下是测试脚本:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
#!/bin/bash
##### Argument checks #####
# Check if binary path is provided
if [ $# -ne 1 ]; then
echo "[+] Usage: $0 <binary_path>"
exit 1
fi
binary=$1
# Check if file exists and is readable
if [ ! -f "$binary" ] || [ ! -r "$binary" ]; then
echo "[!] Error: File '$binary' does not exist or is not readable."
exit 1
fi
##### First check: byte-wise palindrome #####
reversed_file=$(mktemp)
size=$(wc -c < "$binary")
# Read the file byte by byte in reverse order (in a very efficient way)
for ((i = size - 1; i >= 0; i--)); do
dd if="$binary" bs=1 skip=$i count=1 2>/dev/null
done > "$reversed_file"
if cmp -s "$binary" "$reversed_file"; then
echo "[+] First check passed: binary is a byte-wise palindrome."
rm "$reversed_file"
else
echo "[!] First check failed: binary is not a byte-wise palindrome."
rm "$reversed_file"
exit 1
fi
##### Build a scratch Podman image with the binary to test #####
# Create the containerfile
image_name="quinindrome_test"
containerfile=$(mktemp)
cat > "$containerfile" <<EOF
FROM scratch
COPY $binary /binary
CMD ["/binary"]
EOF
# Build the image
if ! podman build . -t "$image_name" -f "$containerfile" >/dev/null; then
echo "[!] Failed to build Podman test image."
rm "$containerfile"
exit 1
fi
rm "$containerfile"
##### Second check: quine property #####
output_file=$(mktemp)
max_run_time=120
# Run the binary in the scratch container and capture output & return code
timeout "$max_run_time" podman run --rm "$image_name" > "$output_file"
return_code=$?
if [ $return_code -ne 0 ]; then
echo "[!] Second check failed: binary execution returned non-zero status: $return_code."
rm "$output_file"
exit 1
fi
if cmp -s "$binary" "$output_file"; then
echo "[+] Second check passed: binary is a true quine, its output matches itself."
rm "$output_file"
else
echo "[!] Second check failed: Is that a quine? Binary output does not match itself."
rm "$output_file"
exit 1
fi
echo "[+] Both checks passed: your binary is a very nice quinindrome!"
echo "[+] Your score: $size"
|
📩 如何参与
解决方案提交截止日期为12月31日晚上11:59(UTC+1)。
要提交你的解决方案,请将其发送至 winter-challenge@synacktiv.com。
你可能已经猜到,获胜者将是能在上述测试脚本中获得最低分数的人。
如果出现平局,将根据参赛者提交解决方案的接收日期进行排名。
挑战赛将在12月进行,解决方案分析报告将于2026年初发布。
你可以随时提交你的解决方案。
你可以提交任意数量的解决方案,但每天最多一个。这意味着如果你在12月31日上午发送了一个二进制文件,你将没有机会再发送另一个。
一旦你的参赛作品被接收并验证,整体排名将会更新。但是,为了保持悬念,分数将不会公布。
如果你对规则有任何疑虑或问题,请随时通过电子邮件与我们联系。
🖥️ 测试虚拟机
以下是运行测试脚本以验证你解决方案的虚拟机描述:
- 操作系统:Debian 13。
- Linux内核版本:6.12.57+deb13-amd64。
- x86_64架构:这意味着你的二进制文件必须使用适用于32位或64位x86的头部和指令集。
- 已安装Podman版本:5.4.2。
- 虚拟机无法访问互联网。
- 配置为4个vCPU和8 GB RAM。
🥷🏼 额外挑战
我们已经制作了一个相当有效的解决方案。你能成功超越Synacktiv吗?
这是我们二进制文件的sha256sum:8af9fdd50a4b5df623d59b4fde2d8c01d88c27a9badb09e2fdb1b24ca475e111。
此解决方案将在挑战赛的分析报告中公布和解释。
祝你好运,节日快乐!
🏅 当前排行榜
- #1 Cortex - 2025年12月2日 晚上8:45