Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1020 CNY

100%

CVE-2018-11235 PoC — Git 安全漏洞

Source
Associated Vulnerability
Title:Git 安全漏洞 (CVE-2018-11235)
Description:In Git before 2.13.7, 2.14.x before 2.14.4, 2.15.x before 2.15.2, 2.16.x before 2.16.4, and 2.17.x before 2.17.1, remote code execution can occur. With a crafted .gitmodules file, a malicious project can execute an arbitrary script on a machine that runs "git clone --recurse-submodules" because submodule "names" are obtained from this file, and then appended to $GIT_DIR/modules, leading to directory traversal with "../" in a name. Finally, post-checkout hooks from a submodule are executed, bypassing the intended design in which hooks are not obtained from a remote server.
Description
Proof of Concept - RCE Exploitation : Git submodules' names vulnerability  - Ensimag November 2018
Readme
# CVE-2018-11235

## Getting started

Pour build les conteneurs dockers, utilisez :

```sh
make docker
```

(Les commandes make suivantes sont à lancer en parallèle sur différents terminaux depuis votre machine)

Pour démarrer le conteneur du serveur attaquant, utilisez :

``` sh
make run_server
```

pour démarrer le conteneur représentant la victime, utilisez :

``` sh
make run_client
```
Le conteneur va lancer le script client.py. Le script va transmettre son adresse Ip et son nom de utilisateur au pirate.

Suivez les instructions de la console des clients pour cloner le dépôt git malveillant.

``` sh
git clone --recurse-submodules root@server:home/poc/malicious_repo client_pwned
```

Vous constaterez que l'adresse IP et le nom d'utilisateur de la victime sont transmis au serveur.

Après le clone, vérifiez que la clé publique des attaquants est bien ajoutée aux authorized_keys du client.


Ensuite, vous pouvez ouvrir un shell sur le client depuis le serveur, grâce à la commande suivante (à executer sur votre machine):

```sh
make server_bash
```

`ssh <transmitted_username>@<transmitted_host>`

## Questions

Si vous avez quelques problèmes que ce soit pour executer ce Proof of Concept, veuillez créer
une issue sur ce dépôt: https://github.com/ygouzerh/CVE-2018-11235/issues , nous vous répondrons le plus
rapidement possible.

File Snapshot

[4.0K] /data/pocs/1e4462c75e0da7f4f9d69425de50ce6dedfb563f ├── [4.0K] build ├── [ 865] client.py ├── [4.0K] dist ├── [ 694] Dockerfile.client ├── [ 814] Dockerfile.server ├── [4.0K] key ├── [ 358] Makefile ├── [4.0K] poc │   ├── [ 136] attack.sh │   ├── [1.1K] build.sh │   └── [6.2K] surprise.txt ├── [246K] rapport.pdf ├── [1.3K] README.md ├── [ 253] requirements.txt └── [ 652] server.py 4 directories, 11 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →