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 username containing shell meta characters, attackers can execute arbitrary commands. No authentication is needed to exploit this vulnerability since this option is used to map usernames prior to authentication!
exploit Code
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
- usage
python usermap_script.py <RHOST> <RPORT> <LHOST> <LPORT>
- RPORT -- The target port (TCP : 139)
exploit code 중 payload 이해하기
1. 오른쪽 터미널에서 id 입력
2. 왼쪽 터미널에 id가 출력되어야 하는데
3. 파이프때문에 /bin/sh의 입력으로 id가 들어간다.
4. id의 실행결과가 /tmp/hello로 들어간다.
5. 왼쪽 터미널에서 nc가 /tmp/hello에서 입력을 받아 오른쪽 터미널의 nc에 넘겨주는데, 그 입력이 id의 실행결과였다.
nohup
no hang up : 끊지마!
로그아웃으로 세션과 연결을 종료해도 지금 실행한 프로그램을 종료하지 말아라, 라는 의미
즉, 세션과 연결이 종료되더라도 nohup으로 돌린 프로세스는 데몬 형태로 실행되게 되어 종료되지 않고 계속 실행된다.
- 사용법
중단없이 실행하고자 하는 프로그램 명령어 앞에 nohup만 붙여주면 된다.
[ 출처 : https://joonyon.tistory.com/98 ]
데몬
리눅스 시스템이 처음 가동될 때 실행되는 백그라운드 프로세스의 일종.
사용자의 요청을 기다리고 있다가 요청이 발생하면 이에 적절히 대응하는 리스너같은 역할
즉, 메모리에 상주하면서 특정 요청이 오면 즉시 대응할 수 있도록 대기중인 프로세스
[ 출처 : https://valuefactory.tistory.com/229 ]
'정보보안 > CVE' 카테고리의 다른 글
CVE-2014-6271 (shellshock) (0) | 2021.09.05 |
---|---|
CVE-2019-0232 테스트 해보기 (0) | 2021.07.22 |
댓글