๐Ÿง Linux (Bandit)

[OverTheWire][Linux] Bandit Level4 -> Level5

์„ ๋‹ฌ 2024. 12. 20. 17:54
๋ฐ˜์‘ํ˜•

๋ฌธ์ œ

Level Goal

The password for the next level is stored in the only human-readable file in the inhere directory. Tip: if your terminal is messed up, try the “reset” command.

Commands you may need to solve this level

ls , cd , cat , file , du , find

 

ํ’€์ด

  • Human-readable ํŒŒ์ผ: ์ผ๋ฐ˜ ํ…์ŠคํŠธ ํŒŒ์ผ, ๋กœ๊ทธ ํŒŒ์ผ, ์ฝ”๋“œ ํŒŒ์ผ ๋“ฑ ์‚ฌ๋žŒ์ด ์ฝ์„ ์ˆ˜ ์žˆ๋Š” ๋‚ด์šฉ์ด ํฌํ•จ๋œ ํŒŒ์ผ์ž…๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, .txt, .md, .html, .csv ํŒŒ์ผ์€ ๋ชจ๋‘ ์‚ฌ๋žŒ์ด ์ฝ๊ณ  ์ดํ•ดํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • Machine-readable ํŒŒ์ผ: ์‚ฌ๋žŒ์ด ์ฝ๊ธฐ ์–ด๋ ค์šด ์ด์ง„ ๋ฐ์ดํ„ฐ๋‚˜ ๋ฐ”์ด๋„ˆ๋ฆฌ ํ˜•์‹์˜ ํŒŒ์ผ๋“ค์ž…๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, ์ด๋ฏธ์ง€ ํŒŒ์ผ(.jpg, .png), ์˜ค๋””์˜ค ํŒŒ์ผ(.mp3), ๋™์˜์ƒ ํŒŒ์ผ(.mp4), ์‹คํ–‰ ํŒŒ์ผ(.exe) ๋“ฑ์€ ๋Œ€๋ถ€๋ถ„ ์‚ฌ๋žŒ์ด ์ง์ ‘ ๋‚ด์šฉ์„ ์ฝ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. ์ปดํ“จํ„ฐ๋Š” ์ด๋ฅผ ํ•ด์„ํ•˜๊ณ  ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

 

 

ํŒŒ์ผ์ด ์•„์ฃผ ๋งŽ๋‹ค.

์ด๊ฑธ ๋‹ค ์ˆ˜๋™์œผ๋กœ ํ™•์ธํ•˜๋ผ๋Š”๊ฑด ์•„๋‹๊ฑฐ๋‹ค

bandit4@bandit:~/inhere$ for f in *; do file -- "$f"; done

 

human-readable์ธ๊ฑด textํŒŒ์ผ์ด๋ฏ€๋กœ 07๋ฒˆ์ด๋‹ค

 

bandit4@bandit:~/inhere$ cat -- '-file07'

 

cat -file07์„ ์ง„ํ–‰ํ•˜๋ฉด ํŒŒ์ผ ์ด๋ฆ„์ด ํ•˜์ดํ”ˆ(-)์œผ๋กœ ์‹œ์ž‘ํ•ด์„œ cat ๋ช…๋ น์–ด๊ฐ€ ์ด๋ฅผ ์˜ต์…˜์œผ๋กœ ์ž˜๋ชป ํ•ด์„ํ•œ๋‹ค.

ํŒŒ์ผ ์ด๋ฆ„ ์•ž์— --๋ฅผ ์ถ”๊ฐ€ํ•ด์„œ, cat ๋ช…๋ น์–ด๊ฐ€ ํŒŒ์ผ ์ด๋ฆ„์„ ์˜ต์…˜์œผ๋กœ ํ•ด์„ํ•˜์ง€ ์•Š๋„๋ก ํ•˜์ž

 

๋”๋ณด๊ธฐ

4oQYVPkxZOOEOO5pTW81FB8j8lxXGUQw

๋ฐ˜์‘ํ˜•

'๐Ÿง Linux (Bandit)' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

[OverTheWire][Linux] Bandit Level6 -> Level7  (0) 2024.12.23
[OverTheWire][Linux] Bandit Level5 -> Level6  (0) 2024.12.23
[OverTheWire][Linux] Bandit Level3 -> Level4  (0) 2024.12.20
[OverTheWire][Linux] Bandit Level2 -> Level3  (1) 2024.12.20
[OverTheWire][Linux] Bandit Level1 -> Level2  (1) 2024.12.20