๋ฐ์ํ
https://overthewire.org/wargames/bandit/bandit7.html
OverTheWire: Level Goal
We're hackers, and we are good-looking. We are the 1%. <!-- Please read and accept the Rules! --> Level Goal The password for the next level is stored somewhere on the server and has all of the following properties: owned by user bandit7 owned by group ban
overthewire.org
๋ฌธ์
Level Goal
The password for the next level is stored somewhere on the server and has all of the following properties:
- owned by user bandit7
- owned by group bandit6
- 33 bytes in size
Commands you may need to solve this level
ls , cd , cat , file , du , find , grep
ํ์ด
ํ์ฌ ๋๋ ํ ๋ฆฌ์์ ls -al ํด๋ ์๋ฌด๊ฒ๋ ์๋ฌ๋ค (!!)
๋ฃจํธ ๋๋ ํ ๋ฆฌ๋ถํฐ ์ฐพ์์ผํ๋ ๋ฌธ์ ๋ค
bandit6@bandit:~$ find / -user bandit7 -group bandit6 -size 33c 2>/dev/null
- find / : ๋ฃจํธ ๋๋ ํ ๋ฆฌ(/)๋ถํฐ ์์ํด์ ๋ชจ๋ ํ์ผ๊ณผ ๋๋ ํ ๋ฆฌ๋ฅผ ์ฌ๊ท์ ์ผ๋ก ๊ฒ์ํฉ๋๋ค.
- -user bandit7 : bandit7 ์ฌ์ฉ์๊ฐ ์์ ํ ํ์ผ๋ง ๊ฒ์ํฉ๋๋ค.
- -group bandit6 : bandit6 ๊ทธ๋ฃน์ ์ํ ํ์ผ๋ง ๊ฒ์ํฉ๋๋ค.
- -size 33c : ํฌ๊ธฐ๊ฐ ์ ํํ 33 ๋ฐ์ดํธ์ธ ํ์ผ๋ง ์ฐพ์ต๋๋ค. c๋ ํฌ๊ธฐ๋ฅผ ๋ฐ์ดํธ ๋จ์๋ก ์ง์ ํฉ๋๋ค.
- 2>/dev/null :๊ถํ์ด ์์ด์ ๋ฐ์ํ๋ ์๋ฌ ๋ฉ์์ง๋ฅผ ์ถ๋ ฅํ์ง ์๋๋ก ์จ๊น๋๋ค.
๋ง์ง๋ง ์์๋ง ์ ๊ธฐ์ตํ๋ฉด ๋ ๋ฏ ํ๋ค
- 2>
- 2๋ ํ์ค ์๋ฌ(standard error, stderr)๋ฅผ ๋ํ๋ ๋๋ค.
- >๋ ๋ฆฌ๋๋ ์ ์ฐ์ฐ์๋ก, ์๋ฌ ๋ฉ์์ง๋ฅผ ๋ค๋ฅธ ๊ณณ์ผ๋ก ๋ณด๋ด๊ฒ ๋ค๋ ๋ป์ ๋๋ค.
- /dev/null
- /dev/null์ ์ ๋์ค ๊ณ์ด ์ด์์ฒด์ ์์ **"์์"**์ ์๋ฏธํ๋ ํน์ ํ์ผ์ ๋๋ค.
- ์ฌ๊ธฐ์ ๋ฐ์ดํฐ๋ฅผ ๋ณด๋ด๋ฉด ๋ฐ์ดํฐ๋ ์ฆ์ ์ฌ๋ผ์ง๋ฉฐ, ์๋ฌด ์ถ๋ ฅ๋ ํ์๋์ง ์์ต๋๋ค.
๋๋ณด๊ธฐ
morbNTDkSW6jIlUc0ymOdMaLnOlFVAaj
๋ฐ์ํ
'๐ง Linux (Bandit)' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[OverTheWire][Linux] Bandit Level7 -> Level8 (0) | 2024.12.23 |
---|---|
[OverTheWire][Linux] Bandit Level5 -> Level6 (0) | 2024.12.23 |
[OverTheWire][Linux] Bandit Level4 -> Level5 (0) | 2024.12.20 |
[OverTheWire][Linux] Bandit Level3 -> Level4 (0) | 2024.12.20 |
[OverTheWire][Linux] Bandit Level2 -> Level3 (1) | 2024.12.20 |