--- tags: 資安筆記 --- # Python Sandbox Escape 筆記 講師github(投影片也在上面):https://github.com/splitline/py-sandbox-escape * `execfile('/usr/lib/python2.7/os.py')`可以達到`import os`的效果 * `dir(__builtins__)` * 在跑`ssti.py`時,網址列可打成`/?name={{***}}`,裡面的`***`用python裡面的變數來取代(Jinja2的語法),直接丟`[].__class__.__base__.__subclasses__()`之類的東西 * 在解`final.py`時,`.__code__`可以用`.func_code`來取代 https://ctftime.org/writeup/10822 * 結論:python本來就不是拿來做sandbox的,如果真的要的話,就是在一個sandbox裡面跑python。
×
Sign in
Email
Password
Forgot password
or
Sign in via Google
Sign in via Facebook
Sign in via X(Twitter)
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
Continue with a different method
New to HackMD?
Sign up
By signing in, you agree to our
terms of service
.