Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
sshole_scanner-CVE-2026-123158 — Scans SSH hosts for the musl libc crypt() authentication bypass (CVE-2026-123158) with single-host checks, CIDR sweeps, and a Docker test lab. | Kitploit
工具/GitHubGitHub/criticalwombat/sshole_scanner-cve-2026-123158
Defensive ToolsVulnerability ScannersExploitationScripting & AutomationNetwork SecurityPenetration TestingAuthenticationLabs & Practice
GitHubcriticalwombat/sshole_scanner-cve-2026-123158

sshole_scanner-CVE-2026-123158

Scans SSH hosts for the musl libc crypt() authentication bypass (CVE-2026-123158) with single-host checks, CIDR sweeps, and a Docker test lab.

14天前尚未审核
分享
查看仓库
内容在请求的语言中不可用。显示英文版本。

README.md

CVE-2026-123158 ("sshhole") — test lab and scanner

Disclosed 2026-11-05. CVSS 3.1: 8.1 (High).

What the bug is

On Linux systems where sshd is built against musl libc without PAM (the default on Alpine Linux, and common on minimal/embedded images), an attacker can authenticate to certain accounts with no valid password at all by sending an oversized password.

Who is affected: Alpine-based systems and containers, and anything else running musl + non-PAM OpenSSH. Debian, Ubuntu, RHEL, and anything using glibc + PAM (the vast majority of servers) are not affected.

Mechanism, in order:

  1. A target account's password field in /etc/shadow is * (meaning "no password — this account should never authenticate with one"). * is only 1 byte, too short for OpenSSH to use as its own salt, so sys_auth_passwd() falls back to pick_salt() — a function from a 2016 OpenSSH fix (CVE-2016-6210) meant to stop username enumeration. pick_salt() borrows the salt from the first real password hash it finds anywhere else on the system (e.g. another user's $6$...$ hash).
  2. musl's crypt() has a bug: given a password over 256 bytes, it returns the literal string "*" instead of a real hash or an error — regardless of which salt was used.
  3. OpenSSH compares that "*" against the target account's stored field, which is also "*". They match. Login succeeds.
  4. Known quirk: the first oversized-password attempt on a connection typically fails (a getspnam() buffer-reuse artifact); the second attempt on the same connection succeeds. Both this lab's test scripts rely on exactly this: one connection, the oversized password sent twice.

Fixed upstream in OpenSSH 10.6p2 (2026-11-05). Alpine has shipped patched packages for all currently supported branches. If you're running Alpine or another musl-based image with password auth enabled, update now: apk upgrade -U -a && rc-service sshd restart (restart is required — updating the package alone does not replace the running process).

What's in this directory

FilePurpose
DockerfileBuilds the deliberately-vulnerable test container. Compiles OpenSSH from source at the pre-fix tag V_9_7_P1 with --without-pam — not apk add openssh-server, because Alpine's own package already carries the fix as of 2026-11-05, so that approach silently produces a non-vulnerable container.
compose.yamlRuns the container bound to 127.0.0.1:2222 only (itself — never the LAN or WAN), on its own private Docker network, isolated from every other container on the host.
check_musl_crypt_bypass.pySingle-host, single-account detailed test. Use this against the lab container, or any one host/account you want to check closely.
scan_musl_crypt_bypass.pySubnet scanner. Sweeps a CIDR range, tests a list of usernames against every host with SSH open, and writes a report. Use this one for infrastructure sweeps.

The lab container

Two accounts:

  • baseline — a real password, proves the container works and isn't vulnerable to "any long password gets in."
  • victim — password field is * in /etc/shadow. This is the vulnerable account.

Start/rebuild it:

cd ~/sshhole-lab
docker compose up -d --build

It's reachable only from the host itself, at 127.0.0.1:2222.

Running the scripts

Both need paramiko. A venv is recommended python3 -m venv sshole-lab. Activate the venv source sshole-lab/bin/activate Install paramiko into the virtual environment pip install paramiko

Single host/account test

python3 check_musl_crypt_bypass.py <host> <port> <username>

Example, against the lab container from the host itself:

python3 check_musl_crypt_bypass.py 127.0.0.1 2222 victim

Exit code 10 = vulnerable, 0 = not, 2 = inconclusive (connection error, or the account doesn't behave as expected for this test).

Subnet scan

python3 scan_musl_crypt_bypass.py <cidr> [options]

Examples:

# Default: just tries "root" against everything with SSH open on the subnet
python3 scan_musl_crypt_bypass.py 10.27.99.0/24

# Try a specific set of usernames you know exist on your devices
python3 scan_musl_crypt_bypass.py 10.27.99.0/24 --users root,admin,pi,ubuntu,deploy

# Non-standard SSH port, lower concurrency, write a CSV too
python3 scan_musl_crypt_bypass.py 10.27.99.0/24 --port 2222 --workers 10 --csv report.csv

Options:

FlagDefaultMeaning
cidr—required; a subnet (10.27.99.0/24) or single IP
--port22SSH port to test
--usersrootcomma-separated usernames to try per host
--workers20concurrent hosts probed at once
--timeout4.0per-connection timeout, seconds
--reportmusl_crypt_report.jsonJSON report path
--csv(none)optional CSV report path

Exit code 10 if anything came back vulnerable, 0 otherwise — safe to use in a script/cron check.

Important — you must know the usernames. This bug only shows up against an account that actually exists on the target and is already password-locked (* in shadow) or has a hash pick_salt() can borrow around. A username the scanner doesn't try is a username it says nothing about. Default root alone is a weak sweep — add any service or device-default account names you know are in use (pi, ubuntu, admin, deploy, etc).

Reading results per host/username:

StatusMeaning
VULNERABLEOversized password authenticated on attempt 2 — matches this CVE exactly. Patch this host.
NOT VULNERABLEThis specific attack didn't work for this username on this host. Does not confirm the username exists — OpenSSH deliberately makes "no such account" and "account exists and is safe" look identical over the wire (same 2016 anti-enumeration design that causes this bug elsewhere).
WEAK PASSWORD (different issue)The oversized password was accepted on attempt 1. Real exploitation of this CVE only ever succeeds on attempt 2 — an attempt-1 accept means this account has no real password check at all. Different, separate problem. Fix it too.
ERRORConnection dropped/timed out mid-test. Inconclusive — not evidence either way.

Operational notes

  • fail2ban/sshguard: each username tested costs exactly 2 SSH login attempts (one connection, the oversized password sent at most twice). On hosts running fail2ban, scanning several usernames across many hosts will generate failed-login log entries and can get the scanning machine's IP temporarily banned. Keep --users and --workers modest on networks you're actively monitoring with such tools, and expect to see your own scans in those logs.
  • Authorization: only ever point the scanner at infrastructure you own or are explicitly authorized to test. It only ever attempts SSH logins — it never reads or modifies anything else on a target.

If you find something vulnerable

  1. Update the OS/image: on Alpine, apk upgrade -U -a (fixed packages have been available since the 2026-11-05 disclosure).
  2. Restart sshd — updating the package alone doesn't replace the already-running process: rc-service sshd restart (or restart the container/service, however that host runs it).
  3. If you can't patch immediately, set PasswordAuthentication no in sshd_config as a stop-gap (key-only auth isn't affected) and restart sshd.
  4. Re-run the single-host check against that account afterward to confirm it's closed.
下载工具

最受欢迎

查看全部 →

发现我们社区最常用的工具。

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 终极 OSINT 工具包:调查图谱、置信度评分、别名家族、地图、时间线和报告。49 个模块、400+ 个站点,无需 API 密钥。

    1.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock 一键执行应用(CVE-2026-43499)

    593
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT 平台,可将 Shadowserver 报告导入 MongoDB,并将其重放为交互式地图、分析、发现、公告和高管仪表板。

    371
  • 4

    redforge

    cybersecurity91/redforge

    浏览器端红队工具包,包含 102 个离线工具,用于侦察、载荷生成、凭据攻击、加密、编码和交战报告。

    336
  • 5

    ARTEX

    baarai/artex

    基于LLM的多智能体自主渗透测试平台,具备规划器/执行器智能体、资产与探索图谱、MITM流量记录以及漏洞复测功能。

    326
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    AI原生网络安全的行动系统——在这里,意图转化为受治理的执行,证据沉淀为运营记忆,每一次操作都让下一次更出色。

    322

探索所有工具

浏览我们的工具集合

查看所有工具 →