[FTZ] Level1 ํ’€์ด

์ตœ๋Œ€ 1 ๋ถ„ ์†Œ์š”

๐Ÿ’ก FTZ Level1 ํ’€์ด

๋ฌธ์ œ

๊ณ„์ • : level1/level1

hint

level2 ๊ถŒํ•œ์— setuid๊ฐ€ ๊ฑธ๋ฆฐ ํŒŒ์ผ์„ ์ฐพ๋Š”๋‹ค.

ํ’€์ด

find / -perm -4000 -user level2 2>/dev/null

/bin/ExecuteMe ํŒŒ์ผ์ด ๋‚˜์˜ต๋‹ˆ๋‹ค. SetUID๊ฐ€ ๊ฑธ๋ ค์žˆ๊ณ , ์‹คํ–‰ ์‹œ level2 ๊ถŒํ•œ์œผ๋กœ ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค.

image

์‹คํ–‰ํ•˜๋ฉด ๋‹ค์Œ์ฒ˜๋Ÿผ ๋ช…๋ น์–ด ํ•˜๋‚˜๋ฅผ level2 ๊ถŒํ•œ์œผ๋กœ ์‹คํ–‰ ์‹œ์ผœ ์ค€๋‹ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. sh๋ฅผ ์ž…๋ ฅํ•ด์„œ sh์„ ํš๋“ํ•ด ์ค๋‹ˆ๋‹ค.

image

image

my-pass ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•ด์„œ level2 ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์•Œ์•„๋ƒ…๋‹ˆ๋‹ค.

image

ํƒœ๊ทธ:

์นดํ…Œ๊ณ ๋ฆฌ:

์—…๋ฐ์ดํŠธ:

๋Œ“๊ธ€๋‚จ๊ธฐ๊ธฐ