Skip to content
KitploitKITPLOIT
ツールエクスプロイトブログ
Log in
提出
ツールエクスプロイトブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

フィードお問い合わせプライバシー© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
ツール/GitHubGitHub/lamambakukun/hack-the-box-sherlock-sshole-
Indicator of Compromise (IOC) ManagementVulnerability AnalysisForensicsDigital ForensicsCTFAuthenticationPapers & ResearchLearning & EducationIncident ResponseLog AnalysisLabs & Practice
4日前未レビュー
共有
GitHub
lamambakukun/hack-the-box-sherlock-sshole-

Hack-The-Box-Sherlock-SSHole-

Análisis de Vulnerabilidad sshole (CVE-2026-123158) y Resolución Forense — Sherlock: SSHole

リポジトリを見る
要求された言語のコンテンツは利用できません。英語版を表示しています。

sshole Vulnerability Analysis (CVE-2026-123158) and Forensic Resolution — Sherlock: SSHole

Role: SOC Analyst / DFIR

Plataforma: Hack The Box (Sherlock: SSHole)

Part 1: Development of Theoretical Questions

1. Architecture and Dependencies

Question: What specific combination of components at the operating system and network services level (libc, authentication manager, and SSH daemon) is strictly necessary for an environment to be vulnerable to sshole, and why are traditional glibc-based systems with PAM support exempt from this flaw?

For an environment to be vulnerable to sshole (CVE-2026-123158), it must strictly meet the following combination of components at the operating system and network services level:

  • Standard C library (libc): The operating system must be compiled against musl libc (characteristic of lightweight distributions such as Alpine Linux frequently used in containers).

  • SSH daemon: A vulnerable version of OpenSSH (sshd) compiled and dynamically linked against musl.

  • Authentication manager: The SSH service must run without PAM support (Pluggable Authentication Modules, i.e., UsePAM no or compiled without the --with-pam flag), delegating credential verification directly to reading /etc/shadow and to the crypt() function of musl.

By contrast, traditional glibc-based systems (Debian, Ubuntu, RHEL) with PAM support are exempt for two technical reasons:

  1. Error return in glibc: When faced with invalid passwords or passwords that exceed the allowed limits, the crypt() function of glibc returns NULL or specific failure strings (*0 or *1), preventing any accidental match with the status characters stored in /etc/shadow.

  2. Isolation through PAM: By delegating authentication to PAM (UsePAM yes), modules such as pam_unix.so explicitly check whether an account is locked (* or !) before evaluating hashes and apply strict controls on the length of input strings.

2. Mechanics of the Collision

Question: Explain in detail how a very long password, cryptographic salt handling in OpenSSH, and error handling of the crypt() function in musl interact to generate a false authentication positive.

The exploitation occurs due to a logic flaw in the credential validation chain when I send a password longer than 256 characters to an account with no password assigned or a locked account:

  1. Extraction of the stored salt / hash: When attempting to authenticate with an account with no password assigned on Alpine Linux, sshd queries /etc/shadow, extracts the locked-account marker (*), and passes it as the salt parameter to the crypt(password, salt) function.

  2. Error handling in musl crypt(): The implementation of crypt() in musl libc imposes an internal limit of 256 characters for the plaintext password. Upon receiving a string that exceeds this threshold, musl aborts the cryptographic computation and literally returns the standardized string "*" as an error code.

  3. False positive in the comparison: OpenSSH receives the result of crypt() ("*") and compares it via strcmp() against the hash originally stored in /etc/shadow ("*"). When an exact match occurs ("*" == "*"), sshd interprets the validation as successful and grants immediate interactive access without having verified any real password.

3. Mitigation and Hardening

Question: Apart from applying the official OpenSSH package update patch, mention and instrument at least two defense-in-depth mitigation measures at the configuration level that drastically reduce the exposure surface to this attack vector.

In addition to applying the official OpenSSH package update patch, I implemented the following defense-in-depth measures in /etc/ssh/sshd_config to drastically reduce the exposure surface:

  • Completely disable password authentication (PasswordAuthentication no): By restricting access exclusively to the use of asymmetric cryptographic keys (PubkeyAuthentication yes), the SSH daemon is prevented from invoking the /etc/shadow reading routines and the crypt() function.

    PasswordAuthentication no
    ChallengeResponseAuthentication no
    PubkeyAuthentication yes
    
  • Block direct root access and define allowlists (PermitRootLogin no / AllowUsers): Since system and service accounts usually have the * marker in /etc/shadow, prohibiting root login and restricting access only to explicit users prevents the exploitation of administrative or service accounts.

    PermitRootLogin no
    AllowUsers adminsvc
    

Part 2: Practical Activity — Incident Forensic Analysis (Sherlock Challenge: sshole)

Prompt (4. Incident Forensic Analysis): Simulating the role of a SOC/DFIR analyst facing an intrusion in a containerized environment based on this vulnerability, investigate the log artifacts provided in the Sherlock-type forensic lab (sshole) and add images of the result.

1. Initial Triage and Evidence Inventory

After downloading and extracting the artifacts from the SSHole forensic lab on my Windows analysis workstation, I performed an initial inspection of the directory structure recovered from the compromised container (dev-jumpbox). I identified the critical Linux filesystem paths: etc, home, root, and var.

Root structure of the artifacts

Figure 1: Root structure of the filesystem extracted from the compromised container (etc, home, root, var).

2. Verification of the Vulnerable Architecture (musl + Locked Accounts)

To confirm that the system met the architectural requirements of CVE-2026-123158, I located the /etc/os-release file inside the etc folder and inspected its contents. I confirmed that the environment corresponded to an Alpine Linux distribution (built on musl libc).

Location of os-release

Figure 2: Location of the operating system identification file at \etc\os-release.

Contents of os-release

Figure 3: Contents of /etc/os-release confirming the lightweight distribution based on musl libc.

Subsequently, I located the /etc/shadow file and used PowerShell (Get-Content .\shadow | Select-String ":\*:") to filter the accounts that had the * character in the password field, corroborating that the target account had the hash configured with the marker susceptible to the collision.

Location of shadow

Figure 4: Location of the /etc/shadow file in the extracted artifacts.

Filtering of locked accounts in shadow

Figure 5: PowerShell filtering (Select-String ":\*:") on shadow confirming the accounts with the * lock marker.

3. Detection of the Authentication Bypass in the SSH Logs

Once the environment's vulnerability was confirmed, I navigated to \var\log\ to inspect the messages file (the main syslog record in Alpine Linux).

ツールをダウンロード

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

  • 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

    ShadowserverレポートをMongoDBに取り込み、インタラクティブなマップ、分析、調査結果、アドバイザリ、エグゼクティブダッシュボードとして再生するCSIRTプラットフォーム。

    381
  • 4

    ARTEX

    baarai/artex

    プランナー/ワーカーエージェント、資産グラフと探索グラフ、MITMトラフィック記録、脆弱性の再テストを備えたLLMマルチエージェント自律ペネトレーションテストプラットフォーム。

    321
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    AIネイティブなサイバーセキュリティのためのアクションシステム。意図がガバナンスされた実行に変わり、証拠が運用記憶となり、すべての操作が次の操作を改善する。

    316
  • 6

    redforge

    cybersecurity91/redforge

    ブラウザ側のレッドチームツールキット。偵察、ペイロード生成、認証情報攻撃、暗号、エンコーディング、エンゲージメントレポート向けの102のオフラインツールを備えています。

    305

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →