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

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

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

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
alpine-sshd-check — Read-only check for CVE-2026-123158: is your Alpine sshd affected by the password authentication bypass, fixed, or still running the old daemon? Tested on Alpine 3.21 to 3.24 and edge. | Kitploit
工具/GitHubGitHub/the-devops-daily/alpine-sshd-check
Defensive ToolsVulnerability ScannersContainer SecurityVulnerability AnalysisConfiguration AuditingAuthenticationIncident Response
GitHubthe-devops-daily/alpine-sshd-check

alpine-sshd-check

Read-only check for CVE-2026-123158: is your Alpine sshd affected by the password authentication bypass, fixed, or still running the old daemon? Tested on Alpine 3.21 to 3.24 and edge.

查看仓库
2026年11月5日尚未审核
分享
网站
内容在请求的语言中不可用。显示英文版本。

alpine-sshd-check

sudo sh check.sh            # on an Alpine host
sh check.sh --json          # machine-readable
docker exec -i <container> sh -s < check.sh    # inside a container, nothing is copied in
sh scan-containers.sh       # every running container on this Docker host

A read-only check for CVE-2026-123158, the Alpine Linux openssh-server password authentication bypass fixed on 2026-11-05 (Alpine advisory, OpenSSH 10.6p2 release notes, CVE record).

Write-up: https://devops-daily.com/posts/alpine-openssh-password-bypass

What it reads

  • /etc/alpine-release and /etc/apk/repositories, to find the branch, and /etc/apk/world for a repository pin, and the installed openssh-server (or openssh-server-pam) version from apk list -I.
  • sshd -T, for PasswordAuthentication, PermitRootLogin and UsePAM.
  • The TYPE of the password field in /etc/shadow: it counts fields that are exactly * and fields that start with $5$ or $6$ (a locked !$6$... field is counted too, to stay on the safe side). It never prints, stores or sends a hash or a user name.
  • /proc, for the running sshd: its start time, and whether it is still the same file (device and inode) as the sshd binary on disk. An upgrade writes a new file, so a daemon that was not restarted shows up as a different file.

It changes nothing, does not connect to sshd and does not try to log in. It needs root to read /etc/shadow and to run sshd -T.

Because it runs as root, it sets a fixed PATH and executes only /usr/sbin/sshd, /usr/sbin/sshd.pam or /usr/sbin/sshd.krb5, and only if the file is owned by root and not group- or world-writable. It counts only sshd processes that run as uid 0. If the running sshd is any other binary, it reports "cannot tell" (exit 3) and does not execute it. An earlier draft ran the path it read from /proc/<pid>/exe; in a test container, a root process started as /tmp/sshd got that file executed. That is fixed.

Mixed sources

A stable host can install openssh from edge. The check fails closed:

  • An untagged, uncommented /edge/ repository line: compared against the edge fixed version.
  • openssh pinned to a tag (openssh-server@edge in /etc/apk/world): compared against the edge fix if that tag points to an edge repository, otherwise "cannot tell".
  • An installed version newer than the branch fix but from another release series (and older than the edge fix): "cannot tell", never "not affected".
  • A tagged @edge line with nothing pinned to it does not change the branch.

The four conditions

A host is affected only if all four hold on a version older than the fixed one:

  1. sshd is built without PAM (openssh-server), or it is openssh-server-pam with UsePAM no.
  2. PasswordAuthentication yes (the default).
  3. An account that can use a password login has * in the password field. Root counts only with PermitRootLogin yes. If musl-nscd is installed, directory users have no shadow entry and count too, so the script reports "unknown". AllowUsers, DenyUsers and Match blocks are not evaluated, so this errs on the side of "yes".
  4. At least one local $5$ or $6$ hash exists.

Exit codes

CodeMeaning
0Not affected (fixed version, or a condition is false)
1Affected: vulnerable version and all four conditions hold
2Fixed package installed, but the running sshd is not the file on disk: rc-service sshd restart
3Cannot tell (not root, not Alpine, sshd -T failed, or a Match block may enable passwords)

scan-containers.sh exits 1 if any container is affected, else 2 if any needs a restart, else 3 if any could not be checked, else 0. It runs each container's own sh with docker exec, as root inside that container, so only scan containers whose images you trust.

Fixed versions (from the advisory)

BranchFixed openssh
edge10.6_p2-r0
3.2410.3_p1-r2
3.2310.2_p1-r1
3.2210.0_p1-r11
3.219.9_p2-r1
3.209.7_p1-r6
3.199.6_p1-r3
3.189.3_p2-r4
3.179.1_p1-r7
3.169.0_p1-r6

Results

measure.sh records the check on throwaway containers: alpine:3.21, 3.22, 3.23, 3.24 and edge after apk add openssh-server, plus two 3.24 variants (PasswordAuthentication no, and a key-only user plus a user with a random password). The install step has network access; sshd then runs with --network none, so no port is published and nothing can connect to it. Output is in results/, recorded 2026-11-05 on Docker 29.9.3 (aarch64, see results/environment.txt). measure.sh is the measurement harness, not the check: it creates, changes and removes its own containers and images.

ContainerInstalledExitNotes
3.21.109.9_p2-r10fixed
3.22.810.0_p1-r110fixed
3.23.810.2_p1-r10fixed
3.24.410.3_p1-r20fixed
edge (3.25.0_alpha20260805)10.6_p2-r00fixed
3.24.4, PasswordAuthentication no10.3_p1-r20condition 2 false
3.24.4, key-only user + password user10.3_p1-r20all four conditions true, fixed version

Two things the run found:

  • adduser -D on 3.24 wrote ! (locked), not *. A locked account is not affected, but it also cannot log in with a key. The key-only user was then set to *, the state the advisory describes for key-only users.
  • OpenSSH 10.6 prints sshd -T keywords in mixed case (PasswordAuthentication yes), older versions in lower case. The first version of this script matched only lower case and reported "unknown" on edge. Match it case-insensitively (grep -i).

Exit code tests

test-exit-codes.sh records results/exit-code-tests.txt. No vulnerable package exists any more, so exit 1 and 2 are simulations, labelled as such:

  • Exit 1: all four conditions true, with a temporary copy of the script whose 3.24 fixed version is raised to 10.3_p1-r3.
  • Exit 2: the same sshd binary copied and renamed over /usr/sbin/sshd while sshd runs, which is what an upgrade does to the file.
  • Exit 3: a root process running /tmp/sshd (not executed by the check), a world-writable /usr/sbin/sshd, and a non-root run.
  • Mixed sources: a tagged @edge line with nothing pinned (exit 0), an untagged edge line on 3.24 (exit 1, fails closed), a real apk add openssh-server@edge on 3.24 (10.6_p2-r0, exit 0), and the same container with the pin removed and the edge fix raised in a temporary copy (exit 3).

Not tested

  • No vulnerable package and no real upgrade: Alpine replaced the packages on every branch the same day, so every fresh install got the fixed version.
  • openssh-server-pam, musl-nscd users, tiny-cloud images and branches 3.16 to 3.20 were not measured.

License

MIT

下载工具

相关工具

  • wazuh

    开源XDR和SIEM平台,用于跨端点和云工作负载的威胁检测、日志分析、文件完整性监控、漏洞评估和合规管理。

  • suricata

    用于实时流量检测、入侵检测与防御、协议分析以及基于规则的威胁狩猎的开源网络 IDS/IPS/NSM 引擎。

  • zeek

    Zeek 是一个强大的网络分析框架,与你可能知道的典型 IDS 有很大不同。

最受欢迎

查看全部 →

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

  • 1

    Callisto

    jetp1ane/callisto

    自动化二进制漏洞分析工具,通过Ghidra反编译可执行文件,使用Semgrep扫描伪C代码,并利用GPT-3.5-Turbo验证发现以减少误报。

    2.3k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    针对 CVE-2026-43499 的一键式 Android 内核漏洞利用应用,通过内核模块加载实现权限提升,并提供偏移提取与设备端分析工具。

    828
  • 3

    DFRoot

    a2333c/dfroot

    Android root tool for Samsung Galaxy S25 Ultra (SM-S938B) that chains DirtyFrag CVE-2026-43284 and CVE-2026-43499 to gain root automatically at boot via KernelSU.

    450
  • 4

    ARTEX

    baarai/artex

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

    390
  • 5

    faraday

    infobyte/faraday

    面向攻击性安全、漏洞管理和自主渗透测试的开源及AI驱动的网络安全工具。由拉丁美洲的黑客构建,供全球使用。

    344
  • 6

    OsintHunter

    letox4/osinthunter

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

    339

探索所有工具

浏览我们的工具集合

查看所有工具 →