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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2016-20012 PoC — OpenSSH 安全漏洞

Source
Associated Vulnerability
Title:OpenSSH 安全漏洞 (CVE-2016-20012)
Description:OpenSSH(OpenBSD Secure Shell)是Openbsd计划组的一套用于安全访问远程计算机的连接工具。该工具是SSH协议的开源实现,支持对所有的传输进行加密,可有效阻止窃听、连接劫持以及其他网络级的攻击。 OpenSSH 8.7之前版本存在安全漏洞,允许远程攻击者怀疑 SSH 服务器知道用户名和公钥的特定组合,以测试这种怀疑是否正确。 发生这种情况是因为仅当该组合对登录会话有效时才会发送质询。
Readme
# CVE-2016-20012  SSH Username Enumeration Script

This Python script attempts to enumerate valid usernames on an SSH server by trying to connect with an invalid password. It measures the response time for each username to identify possible valid accounts based on server behavior.

## Table of Contents
- [Overview](#overview)
- [How It Works](#how-it-works)
- [Requirements](#requirements)
- [Setup and Usage](#setup-and-usage)
- [Disclaimer](#disclaimer)

## Overview

This script performs SSH username enumeration by leveraging the `paramiko` library. It attempts to connect to an SSH server using usernames from a provided wordlist and an invalid password. The response times for each attempt are collected, and the average and standard deviation of the response times are calculated.

This script can be useful for security researchers or penetration testers to check if certain usernames exist on the target system by identifying differences in server response times.

## How It Works

1. **SSH Client**: The script uses `paramiko.SSHClient()` to initiate an SSH connection to a specified hostname and port.
2. **Invalid Password**: For each username from the wordlist, the script tries to authenticate with an invalid password.
3. **Response Time**: The time taken for each connection attempt is recorded.
4. **AuthenticationException**: The script expects an `AuthenticationException` when using an invalid password. If other errors occur, they are reported and the script stops.
5. **Statistics**: For each username, the script calculates the average response time and standard deviation over multiple attempts.

## Requirements

To run this script, you need to have the following installed on your machine:

- Python 3.x
- The following Python libraries:
  - `paramiko`
  - `statistics`
  - `os`
  - `time`

You can install the necessary dependencies using the following command:

```bash
pip install paramiko

File Snapshot

[4.0K] /data/pocs/ea04fe208dfe4e04762b4e72410df2f0f076db24 ├── [2.2K] cve-2016-20012-script.py └── [1.9K] README.md 1 directory, 2 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.