[Dreamhack] beginner: bof
ยท
CTF, War game
1. ๋ฌธ์ https://dreamhack.io/wargame/challenges/1111 bofDescription Buffer overflow is one of the basics of pwnable ๐ฑ The path of the flag file is /home/bof/flag.dreamhack.ioThe path of the flag file is /home/bof/flag.2. ํ์ด(1) ์ฝ๋ ํ์ธmain(): ์ฌ์ฉ์์ ์
๋ ฅ์ ๋ฐ์ read_cat()ํจ์๋ฅผ ํธ์ถํ๊ณ ์
๋ ฅ์ ์ถ๋ ฅํ๋ ์ฝ๋์ด๋ค. ์ด๋ ./cat ์ด ์ ์ฅ๋๋ v5๋ณ์๋ 16๋ฐ์ดํธ์ด๊ณ , ์
๋ ฅ๊ฐ์ 128 ๋ฐ์ดํธ์ ํฌ๊ธฐ์ด๋ค. ์ฆ, v4์ ํฌ๊ธฐ๊ฐ 128๋ฐ์ดํธ์ธ๋ฐ, scanf๋ก ์ต๋ 144๋ฐ์ดํธ๋ฅผ ์ฝ์ด๋ค์ด๋ฏ๋ก, bof๊ฐ ๋ฐ์ํ ์ ์๋ ๊ฒ..