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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2018-15473 PoC — OpenSSH 竞争条件问题漏洞

Source
Associated Vulnerability
Title:OpenSSH 竞争条件问题漏洞 (CVE-2018-15473)
Description:OpenSSH through 7.7 is prone to a user enumeration vulnerability due to not delaying bailout for an invalid authenticating user until after the packet containing the request has been fully parsed, related to auth2-gss.c, auth2-hostbased.c, and auth2-pubkey.c.
Description
CVE-2018-15473-Exploit
Readme
# POC CVE-2018-15473 exploit

Adaptado de https://github.com/Rhynorater/CVE-2018-15473-Exploit

Para rodar este exploit é necessário ter instalado:

- docker
- docker compose

## servidor ssh

Vamos começar puxando do DockerHub uma imagem que tem uma versão antiga (6.6) do SSH num Ubuntu antigo:
Pode demorar até alguns minutos para baixar tudo, mas só precisa baixar uma vez.
```
docker pull dockerbase/openssh-server
```
Contruímos a nossa imagem e subimos o container
```
docker-compose build
docker-compose up
```
Em outro terminal, abrimos a shell do servidor
```
docker exec -it server /bin/sh
```
Verificamos que a versão do SSH é antiga
```
ssh -V
```
Criamos um usuário
```
adduser mark
```
Insira a senha duas vezes para terminar o cadastro. 
Iniciamos o servidor ssh
```
/etc/init.d/ssh start
```
Descubra o IP com `ip a` e tente se conectar
do terminal hospedeiro ao server com o usuário que acabou de criar.
```
ssh mark@server
```


## atacante 

Na pasta `attacker`, só precisamos 
```
docker-compose build
docker-compose up
```

```
```
E entramos dentro do container
```
docker exec -it attacker /bin/sh
```

Podemos testar a conexão entre o attacker e o server (ssshhh, ele ainda não suspeita de nada)
```
ping server
```
Aí já podemos lançar os ataques:
```
./single_attack.sh
./attack.sh
```
File Snapshot

[4.0K] /data/pocs/2097cf1719f24a567a38d007f7cd30fdde8a3fe1 ├── [4.0K] attacker │   ├── [ 183] attack.sh │   ├── [ 284] docker-compose.yml │   ├── [ 384] Dockerfile │   ├── [ 140] myOutputFile.txt │   ├── [ 23] roomChars.txt │   ├── [ 55] single_attack.sh │   ├── [ 54] sleep.py │   └── [8.4K] sshUsernameEnumExploit.py ├── [1.3K] README.md └── [4.0K] server ├── [ 251] docker-compose.yml ├── [ 102] Dockerfile └── [ 54] sleep.py 2 directories, 12 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 →