R's Hacking Daily Log

Gaming Server (2) 본문

TryHackMe/Challenge - WriteUp

Gaming Server (2)

hanhxx 2023. 3. 12. 20:54

[ check vulnerability ] id command를 실행하니 lxd라는 낯선 단어가 보였다. 

 

 

[ searchsploit ] searchsploit으로 lxd를 찾아보니 "Privilege Escalation" 결과가 나왔다.

굉장히 써먹고 싶은 이름이다..!!

 

 

[ exploit DB ]

exploitdb로 위에서 찾은 shell 내용을 찾아보니 위와 같이 실행해야 하는 step이 나와있다. 

(아니면 cat command로 46978.sh을 읽어도 된다.)

 

 

[ step by step ] step1에 나와있는 경로의 파일을 wget으로 받고 실행시키면 tar.gz 확장자의 파일이 생긴다. 

46978.sh도 복사해 privesc 이름의 파일도 하나 준비해준다. 

 

 

[ open server ] attacker terminal에서 server를 열어준다. 

 

 

[ wget file ] victim terminal에서는 wget으로 tar.gz & privesc file을 다운로드한다. 

 

 

[ execute shell ] 다운 받은 shell을 실행하려고 하니 사용 방법이 나온다.

 

 

 

[ execute shell ] usage에 나온 대로 실행을 하니 root shell을 얻었다. (OoO)

 

 

[ get root flag ] shell 내용에 적혀있던 대로 /mnt/root에 들어가 /root directory - root.txt 파일을 확인하면 드디어

root flag를 얻을 수 있다!!

'TryHackMe > Challenge - WriteUp' 카테고리의 다른 글

Year of the Rabbit (2)  (0) 2023.03.25
Year of the Rabbit (1)  (0) 2023.03.23
Gaming Server (1)  (0) 2023.03.12
Chill (2)  (0) 2023.03.09
Chill (1)  (0) 2023.03.08
Comments