NISRA 2023 Enlightened - Magic Function
Background
Source Code
1 | |
Recon
這一題真的很有趣,但也是算通靈的奇淫怪招,仔細看了一下直覺應該是跟format string有關係,比賽的時候的確有想到,但我當時想的payload有點偏掉了,當時的payload是: {test.email}.format(test=Test(Secret().flag)),也就是先傳入Secret().flag給Test這個class,然後再利用format傳入給
Exploit
1 | |
Flag: NISRA{Ma9ic_pY3h0n_!!???}