반응형
SMALL

 

24.12.31 뜻깊은 해킹입문 마무리

실력있는 분들이 bandit  자세히 잘 설명해 주어서  부담없이 문제를 풀수 있었다. 

 

반응형
LIST
반응형
SMALL

bandit32 ->bandit33

[1] >> 셀이 뜬다

[

bandit32 ->bandit33

[2] >> $0

    $ 

bandit32 -> bandit33

[3] $ bash 

[4] bandit33@bandit:~$ ls -al

 

bandt32 ->bandit33

 

[6] bandit33@bandit:~$ cat /etc/bandit_pass/bandit33

     bandit33 비밀번호 

 

반응형
LIST
반응형
SMALL

[1] bandit31@bandit:~$ mkdir /tmp/band32

[2]  bandit31@bandit:~$ cd /tmp/band32

[3] bandit31@bandit:/tmp/band32$ git clone ssh://bandit31-git@localhost:2220/home/bandit31-git/repo

bandit31 -> bandit32

[4] bandit31@bandit:/tmp/band32$ ls -al

     repo 확인

[5] bandit31@bandit:/tmp/band32$ cd repo

bandit31 -> bandit32

[6] bandit31@bandit:/tmp/band32/repo$ cat README.md\      

     Details: 

        File nameL key.txt

        Content: 'May I come in'

        Branch: master

bandit31 -> bandit32

[7] bandit31@bandit:/tmp/band32/repo$ git branch 

    * master

[8] bandit31@bandit:/tmp/band32/repo$ echo "May I come in" > key.txt

[9] bandit31@bandit:/tmp/band32/repo$ ls -al

    key.txt 확인

bandit31 -> bandit32

[10] bandit31@bandit:/tmp/band32/repo$ git add -f key.txt

[11] bandit31@bandit:/tmp/band32/repo$ git commit -m 'key ad'

[12] bandit31@bandit:/tmp/band32/repo$ git push origin master

bandit31 -> bandit32

[13] bandit31@bandit:/tmp/band32/repo$ git show xxxxxxxxxxxxx

      bandit32비밀번호 확인됨

      3O9RfhqyAlVBEZpVb6LYStshZoqoSx5K

 

반응형
LIST
반응형
SMALL

[1]  bandit30@bandit:~$ ls -al

[2]  bandit30@bandit:~$ mkdir /tmp/band31

[3] bandit30@bandit:~$ cd /tmp/band31

[4] bandit30@bandit/tmp/band31$ git clone ssh://bandit30-git@localhost:2220/home/bandit30-git/repo 엔터치고

     중간에 yes 누르고

    마지막에 bandit30 password 복사해서 붙여넣기

bandit30 -> bandit31

[5] bandit30@bandit/tmp/band31$ ls -al

     repo 파일 확인

[6] bandit30@bandit/tmp/band31$ cd repo

[7] bandit30@bandit/tmp/band31/repo$ ls -al

bandit30 -> bandit31

[8] bandit30@bandit/tmp/band31$ cat README.md

     just an epmty file...

[9] bandit30@bandit/tmp/band31$ git branch -a

     master 확인

bandit30 -> bandit31

[10] bandit30@bandit/tmp/band31$ git show-ref

       xxxxxxxxxx refs/tags/secret 확인해 보자

bandit30 ->bandit31

[11] bandit30@bandit/tmp/band31$ git show xxxxxxxxxxx

       bandit31 비밀번호 확인

 

 

반응형
LIST
반응형
SMALL

bandit29 ->

[1] bandit29@bandit:~$ ls -al

     파일을 확임함

    bandit29@bandit:~$ mkdir /tmp/band30

    bandit29@bandit:~$ cd /tmp/band30

    bandit29@bandit/tmp/band30$ ls -al

    파일 확인 특별한게 없다.

[2] bandit29@bandit/tmp/band30$ git clone ssh://bandit29-git@lcoalhost:2220/hom/bandit29-git /repo

bandit29 ->bandit30

[3]  Yes 

bandit29 ->bandit30

[4] bandit29@bandit/tmp/band30$ ls -al

     repo 파일 확인

bandt29 -> bandit30

[5] bandit29@bandit/tmp/band30$ cd repo

[6] bandit29@bandit/tmp/band30/repo$ ls -al

     README.md 확인됨

[7] bandit29@bandit/tmp/band30/repo$ cat README.md

     # Bandit Notes

        Some notes for bandit30 of bandit.

bandit29 -> bandit30

[8] bandit29@bandit/tmp/band30/repo$  git branch -a

     remotes/origin/HEAD -> origin/master

     dev branch 변경

[9] bandit29@bandit/tmp/band30/repo$ git chekout dev 

[8] bandit29@bandit/tmp/band30/repo$ git branch -a

bandit29 -> bandit30

[9] (HEAD detached at origin/dev)

[10] bandit29@bandit/tmp/band30/repo$ git log

bandit29 -> bandit30

    commit : xxxxxxxx  확인됨

bandit29 -> bandit30

[9] bandit29@bandit/tmp/band30/repo$ git show xxxxxxxxxxx  

bandit29 -> bandit30

[10] bandit30 비밀번호 확인

반응형
LIST
반응형
SMALL

bandit27 ->bandit28

[1] ssh://bandit28-git@localhost/home/bandit28-git/repo 에 git저장소에 있습니다. 사용자의 비밀번호는  bandit28-git사용

     자와 동일합니다.

bandit27 -> bandit28

[2] bandit28@bandit:~$ mkdir /tmp/git29

[3] bandit28@banit:~$ cd /tmp/git29

 

bandit28 -> bandit29

[4]   yes  침

bandit28 -> bandit29

[5] bandit28-git@localhost's password: bandit28 비밀번호 복사해서 붙여넣기

bandit28 ->bandit29

[6] bandit28@bandit:/tmp/git29$ ls -al

     repo 파일 확인

[7] bandit28@bandit:/tmp/git29 $ cd repo

[8] bandit28@bandit:/tmp/git29 $ ls -al

     README.md

bandit27 ->bandit28

[9] bandit28@bandit:/tmp/git29 $ cat README.md

     - username: bandit29

     - password: XXXXXX

       비밀번호가  확인이 안된다.

bandit27 -> bandit28

[10] bandit28@bandit:/tmp/git29 $ git log 

       commit: xxxxxxxx

       commit: xxxxxxxx

       commit: xxxxxxxx

   

bandit28 ->bandit29

[11]  bandit28@bandit:/tmp/git29 $ git show xxxxxxxxxx

 

bandit28 -> bandit29

[12]  password:  xxxxxxxxxx    (bandit29 비밀번호 확인)

반응형
LIST
반응형
SMALL

bandit27 ->bandit28

 

[1]  이 스토리 ssh://bandit27g-git@localhost/home/bandit27-git/repo 있습니다. 사용자의 비밀번호는 bandit27-git 사용자

      와 동일하니다.

bandit27 ->bandit28

 

[2]  bandit27@bandit:~$ git clone ssh://bandit27-git@localhost/home/bandit27-git/repo

bandit27 ->bandit28

[3] bandit27@bandit:~$ mkdir /temp/ban27

[4] bandit27@bandit:~$ cd /tmp/ban27

bandit27 -> bandit28

[5]  bandit27@bandit:/tmp/ban27$  git clone ssh://bandit27-git@localhost/home/bandit27-git/repo

      yes누름

bandit27 -> bandit28

[6]  bandit27@bandit:/tmp/ban27$ chmod 777 /tmp/ban27

bandit27 ->bandit28

[7] bandit27-git@localhost's password: bandit27비번을 복사해서 붙여넣기 한다.

bandit27 -> bandit28

[8]  bandit27@bandit:/tmp/ban27$ ls -al

      repo 파일 확인

bandit27 -> bandit28

[9]  bandit27@bandit:/tmp/ban27$ cd repo

[10]  bandit27@bandit:/tmp/ban27/repo$ ls

        README

[11]  bandit27@bandit:/tmp/ban27/repo$ cat README

        bandit28비밀번호 확인

반응형
LIST
반응형
SMALL

bandit26 -> bandit27

[1] 쉘을 잘 구했음 이제 서룰러 bandit27의 비밀번호를 얻어라

      bandit 26은 bandit25 shell에서 bandit27 비밀번호를 얻을수 있다.

bandit26 -> bandit27

[2] bandit25@bandit:~$ ssh -i bandit26.sshkey bandit26@localhost -p2220  

    창을 작게 만든후(5줄만 보이게) bandit25통해서 bandit26 접속하여 bandit27비번을 확인하는 과정이다.

bandit26 ->bandit27

[3]  yes 엔터

bandit26 -> bandit27

[4] ---More--  뜨면  v 입력

bandit26 -> bandit27

[5] :set shell=/bin/bash   / bandit26접속 방법/

bandit26 -> bandit27

[6] :sh 입력

     bandit26@bandit:~$ ./bandit27-do cat /etc/bandit_pass/bandit27  

     bandit27비밀번호 확인됨

bandit26 ->bandit27

 

반응형
LIST
반응형
SMALL

bandit25 -> bandit26

[1] bandit25에서 bandit26에 고르인하는것은 꽤 쉬울 것입니다. 사용자 bandit26의 셀은 /bin/bash가 아니라

     다른것입니다. 그것이 무엇인지, 어떻게 작옹하는지, 그리고 그것을 벗어나는 방법을 알아보세요.

bandit25 -> bandit26

 

[2] bandit25@bandit:~$ ls -al

     bandit26.sshkey 파일확인

bandit25 ->bandit26

[3] bandit25@bandit:~$ cat  /etc/passwd | grep bandit26

     bandit26:/usr/bin/showtext  이부분을 확인한다

     bandit25@bandit:~$ ls -la /usr/bin/showtext

bandit25 -> bandit26

[4] bandit25@bandit:~$ cat /usr/bin/showtext

     #!/bin/sh

     export TERM=linux

     exec more ~/text.txt

     exit 0

     내용을 확인할수 있다.

bandit25 -> bandit26

[5] bandit25@bandit:~$ ssh -i ./bandtit26.sshkey bandit26@localhost -p2220

     창을 작게 한 상태에서 접속을 하고

 

[6] 위와 같이  창이 뜨면  v를 누르고

bandit25 -> bandit26

 

[7] :e /etc/bandit_pass/bandit26 입력

bandit25 -> bandit26

   

[8] bandit26 비밀번호확인 

반응형
LIST
반응형
SMALL

bandit24 -> bandit25

[1] 데몬은 포토30002에서 수신 대기하고 있으며 bandit24의 비밀번호와 비밀숫자 4자리 핀코드가 주어지면

     bandit25의 비밀번호를 제공합니다. 10000개의 조합을 모두 거치는 것(무차별 대입 공격이라고함)을 제외

     하고 핀코드를 검색할 방법이 없습니다. 매번 새 연결을 만들 필요가 없습니다.

 

bandit24 -> bandit25

[2] bandit24@bandit:~$ mkdir /tmp/n25

[3] bandit24@bandit:~$ cd /tmp/n25

bandit24 -> bandit25

[4] bandit24@bandit:/tmp/n25$ cat > pincode.sh

    빨강박스 입력

    password24 =  " 이부분은 bandit24비번 복사해서 붙이기 "

[5] bandit24@bandit:/tmp/n25$ ls -al

     pincode.sh 파일 확인

bandit24 -> bandit25

[6] bandit24@bandit:/tmp/n25$./pincode.sh

     bandit24@bandit:/tmp/n25$  chmod 777 pincode.sh

    bandit24@bandit:/tmp/n25$ ls -al

    pincode.sh 파일 초록색으로 바뀜

bandit24 -> bandit25

[7]  bandit24@bandit:/tmp/n25$ ./pincode.sh 

      bandit24@bandit:/tmp/n25$ ls -al

      pass25.txt 파일 확인

bandit24 -> bandit25

[8] bandit24@bandit:/tmp/n25$ cat pass25.txt | nc localhost 30002

    아래와 같이

    Wrong! Please enter the correct current password and pincode. Try again. (계속뜬다)

    맨 마지막줄

bandit24 -> bandit25

  The password of user bandit25 is 비빌번호 확인

반응형
LIST

+ Recent posts