본문 바로가기
워게임/hackthebox

[HTB] lame - 참고 링크 정리

by meanjung 2021. 8. 15.

풀이

https://rana-khalil.gitbook.io/hack-the-box-oscp-preparation/linux-boxes/lame-writeup-w-o-metasploit

 

Lame Writeup w/o Metasploit

 

rana-khalil.gitbook.io

 

 

순서

1. nmap으로 옵션 잘 줘서 상세히 확인/ udp 스캔 잊지 않기
2. 포트 하나하나 분석/구글링/ nmap --script(ls /usr/share/nmap/scripts/*~~*)
3. smb 취약점 발견
4. smbclient(공유된 자원 확인)/ smbhost(공유된 자원 permission 확인)
5. cve 발견.. cve 코드 찾아서 보니까 공통점 발견. 
6. nohup을 이용해서 reverse shell 얻기

 

 

포트스캔 결과

 


 

* nmap 옵션

nmap -sC -sV -O 10.10.10.3
nmap -sC -sV -O -p- 10.10.10.3
nmap -sU -O 10.10.10.3
-------------------------------------------
-sC: run default nmap scripts
-sV: detect service version
-O: detect OS
-p-: scan all ports
-sU: udp scan

 

 

* ftp 개념

https://security-nanglam.tistory.com/408

 

[FTP] 20? 21? Active? Passive? FTP 총 정리

FTP의 경우 port를 20, 21 을 쓰고 Active mode Passive mode 가 있다. 이번 주제는 FTP 정리다. FTP는 File Transfer Protocol로 TCP/IP 기반으로 동작하며 "Client"와 "Server"가 상호간 파일 전송을 위해서 사..

security-nanglam.tistory.com

 

 

* smbclient 에러 해결

NT_STATUS_CONNECTION_DISCONNECTED

https://takudaddy.tistory.com/434

 

SMBclient 'protocol negotiation failed' 에러 해결

Lab 내 몇몇의 서버들에서 smbclient 혹은 enum4linux 사용을 요하는데 줄곧 다음과 같은 에러 protocol negotiation failed: #NT_STATUS_CONNECTION_DISCONNECTED 또는 protocol negotiation failed: #NT_STATUS_..

takudaddy.tistory.com

 

 

* shell metacharacter

https://eunguru.tistory.com/91

 

[UNIX / Linux] 특수 문자(Shell Metacharacter)

특수 문자 = 메타 문자(Metacharacter) - 쉘 메타 문자: 쉘 명령에서 사용하는 문자들 중 사전에 정의된 특별한 기능대로 동작하는 일부 문자 - 사전 정의 된 특수 문자 특수 문자  사전 정의  ~  홈

eunguru.tistory.com

 

 

* reverse shell

https://hyotwo.tistory.com/84

 

Bind Shell(바인드쉘) 과 Reverse Shell(리버스쉘)

nc(넷캣)의 정말 강력한 장점은 커맨드 쉘을 생성시킬수 있다는 점이다. 이러한 이유로 모의해킹의 필수프로그램이 될 수 있었으며 원격으로 쉘을 생성할 때 이용된다. 이전에 먼저 바인드쉘과

hyotwo.tistory.com

 

 

* cve-2007-2447

https://github.com/amriunix/CVE-2007-2447/blob/master/usermap_script.py

 

GitHub - amriunix/CVE-2007-2447: CVE-2007-2447 - Samba usermap script

CVE-2007-2447 - Samba usermap script. Contribute to amriunix/CVE-2007-2447 development by creating an account on GitHub.

github.com

https://www.exploit-db.com/exploits/16320

 

Offensive Security’s Exploit Database Archive

 

www.exploit-db.com

https://hongd99.tistory.com/118

 

CVE-2007-2447 정리

description This module exploits a command execution vulnerability in Samba versions 3.0.20 through 3.0.25rc3 when using the non-default "username map script" configuration option. By specifying a u..

hongd99.tistory.com

 

 

 

사용한 모듈
nmap
nmap --script
smbclient
smbmap
nc
nohup
mkfifo
리버스 쉘

'워게임 > hackthebox' 카테고리의 다른 글

sense - 롸업 정리  (0) 2021.09.03
node 롸업 정리  (0) 2021.08.15
[풀이X삽질O]hackthebox - pwn with metasploit - Optimum  (0) 2021.07.18
hackthebox - pwn with metasploit - Jerry  (0) 2021.07.18
[풀이X삽질O]hackthebox - jerry  (0) 2021.07.18

댓글