HACK THE BOX, Synack Red Team Trackの中のbaby interdimensional internetをやってみた。
Webカテゴリーの課題。
レベルはEasy。
pythonのcommand injection脆弱性を突く課題。
pythonのFlaskのコードを読み、Burp Suiteでリクエストを加工してflagを取得。
Flask詳しくなかったので、公式サイトを見ながら解読。
一度command injectionできてしまえば、後はあっさり。
command injection部分は、実際には、あーでもないこーでもないと1時間くらい試行錯誤。
ちなみに、以下でeggとしているのは、単にingredient(材料)とあったからで、何でも良い。
ingredient=egg&measurements=1234
first flagへの道はまだ見えない。
参考サイト Thank you!
Exploiting Python Code Injection in Web Applications
A web application vulnerable to Python code injection allows you to send Python code though the application to the Python interpreter on the...
Page Not Found — Flask Documentation (2.3.x)