본문 바로가기

정보보안

(12)
Bandit Level 27 → Level 28 There is a git repository at ssh://bandit27-git@localhost/home/bandit27-git/repo. The password for the user bandit27-git is the same as for the user bandit27. Clone the repository and find the password for the next level. 갑자기 git이 등장하기 시작했다. 띠용 repository를 ssh://bandit27-git@localhost/home/bandit27-git/repo에서 clone 하라고 한다. /tmp에 적당한 디렉터리를 만들어주고 clone 명령을 실행한다. 비밀번호 입력에 bandit27 계정의 비밀번호 입력을 해 주면..
Bandit Level 26 → Level 27 Good job getting a shell! Now hurry and grab the password for bandit27! 그냥 bandit27 비밀번호 빨리 알아 오란다. bandit26 계정에 그냥 로그인하면 바로 로그아웃되니, 이전의 vi에디터에 이어서 :set shell 명령을 사용해 쉘을 배쉬쉘로 지정해 주고, :shell 을 해주게 되면 배쉬쉘로 들어오게 된다. 여기서 ls를 해 보면 bandit27-do 라는 파일이 있는데, 실행할 수 있는 파일이니 실행해 보자. 음.. 보아하니 저번이랑 비슷하게 bandit27 계정의 권한으로 명령을 실행 할 수 있는 것 같다. 그렇다면 또 그 방법으로... 왜 소문자밖에 안나오지 하고 틀렸나 했는데 다행히 맞았다. ㅋㅋ
Bandit Level 25 → Level 26 Logging in to bandit26 from bandit25 should be fairly easy… The shell for user bandit26 is not /bin/bash, but something else. Find out what it is, how it works and how to break out of it. bandit26의 쉘이 배쉬쉘이 아니라 다른 것이다. 직접 찾아서 뭐 어떻게 해보란다. bandit25 계정의 홈 디렉터리에 bandit26 계정에 로그인하기 위한 RSA private key가 있는데, 일단 그냥 로그인을 시도해 보면 바로 로그아웃되는 것을 볼 수 있다. 이 방법은 아닌 것 같고.. 일단 /etc/passwd 파일을 열어보면 각 사용자의 쉘이 무엇인지 알 ..
Bandit Level 24 → Level 25 A daemon is listening on port 30002 and will give you the password for bandit25 if given the password for bandit24 and a secret numeric 4-digit pincode. There is no way to retrieve the pincode except by going through all of the 10000 combinations, called brute-forcing. daemon이 30002포트 리스닝을 하고 있고, bandit24 계정의 비밀번호와 4자리의 비밀번호(0000~9999)를 입력하면 bandit25계정의 비밀번호가 주어진다고 한다. 일일이 하나하나 다 해볼 순 없으니... 쉘스크..