Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Einreichen
ToolsExploitsBlog
Einreichen

Hacking-, PenTest- und Cybersicherheits-Tools für Ihr Sicherheitsarsenal!

Kitploit ist ein Verzeichnis von Hacking-, Cybersicherheits- und Pentesting-Tools. Entdecken Sie die neuesten Projekt-Updates, um Schwachstellen zu finden, Systeme zu analysieren, Tests zu automatisieren und Ihre Sicherheit zu stärken.

FeedsKontaktDatenschutz© 2026 Kitploit

Tool-Verzeichnis

Kategorien

Alle Kategorien anzeigen
Loading categories
Hack-The-Box-Sherlock-SSHole- — Análisis de Vulnerabilidad sshole (CVE-2026-123158) y Resolución Forense — Sherlock: SSHole | Kitploit
Tools/GitHubGitHub/lamambakukun/hack-the-box-sherlock-sshole-
Indicator of Compromise (IOC) ManagementVulnerability AnalysisForensicsDigital ForensicsCTFAuthenticationPapers & ResearchLearning & EducationIncident ResponseLog AnalysisLabs & Practice
vor 4 TagenNoch nicht geprüft
Teilen
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

Repository anzeigen
Inhalt in der angeforderten Sprache nicht verfügbar. Englische Version wird angezeigt.

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).

Tool herunterladen

Beliebteste

Alle anzeigen →

Entdecken Sie die meistgenutzten Tools unserer Community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 Das ultimative OSINT-Toolkit: Untersuchungsgraph, Konfidenzbewertung, Alias-Familien, Karte, Zeitleiste und Berichte. 49 Module, 400+ Websites, keine API-Schlüssel erforderlich.

    1.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    593
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT-Plattform, die Shadowserver-Berichte in MongoDB einliest und sie als interaktive Karten, Analysen, Findings, Advisories und Executive-Dashboards wiedergibt.

    371
  • 4

    redforge

    cybersecurity91/redforge

    Browser-seitiges Red-Team-Toolkit mit 102 Offline-Tools für Recon, Payload-Generierung, Credential-Angriffe, Krypto, Encoding und Engagement-Reporting.

    336
  • 5

    ARTEX

    baarai/artex

    LLM-basierte Multi-Agenten-Plattform für autonome Penetrationstests mit Planer-/Worker-Agenten, Asset- und Explorationsgraphen, MITM-Verkehrsaufzeichnung und Schwachstellen-Retesting.

    326
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    Das System der Handlung für KI-native Cybersicherheit – wo Absicht zu gesteuerter Ausführung wird, Beweise zu operativem Gedächtnis werden und jeder Einsatz den nächsten verbessert.

    322

Alle Tools erkunden

Durchsuchen Sie unsere Tool-Sammlung

Alle Tools anzeigen →