
CVE-2024-41570: Havoc C2 0.7 Teamserver SSRF exploit
이 취약점은 데몬 에이전트 등록 및 체크인을 스푸핑하여 팀서버에서 TCP 소켓을 열고 데이터를 읽고 쓸 수 있도록 합니다. 이를 통해 공격자는 팀서버의 원본 IP 등을 유출할 수 있습니다.
전체 분석: https://blog.chebuya.com/posts/server-side-request-forgery-on-havoc-c2/
https://github.com/user-attachments/assets/9ab99915-8a8c-4bbd-b762-00280a23703c
팀서버를 핫패치하려면:
sed -i '/case COMMAND_SOCKET:/,/return true/d' teamserver/pkg/agent/agent.go
make ts-build
usage: exploit.py [-h] -t TARGET -i IP -p PORT [-A USER_AGENT] [-H HOSTNAME] [-u USERNAME] [-d DOMAIN_NAME]
[-n PROCESS_NAME] [-ip INTERNAL_IP]
options:
-h, --help show this help message and exit
-t TARGET, --target TARGET
The listener target in URL format
-i IP, --ip IP The IP to open the socket with
-p PORT, --port PORT The port to open the socket with
-A USER_AGENT, --user-agent USER_AGENT
The User Agent for the spoofed agent
-H HOSTNAME, --hostname HOSTNAME
The hostname for the spoofed agent
-u USERNAME, --username USERNAME
The username for the spoofed agent
-d DOMAIN_NAME, --domain-name DOMAIN_NAME
The domain name for the spoofed agent
-n PROCESS_NAME, --process-name PROCESS_NAME
The process name for the spoofed agent
-ip INTERNAL_IP, --internal-ip INTERNAL_IP
The internal ip for the spoofed agent