Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacyΒ© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
cve-2026-123158-openssh-musl-lab β€” Automated Terraform lab environment for OpenSSH on Linux with musl libc without PAM (CVE-2026-123158 research) | Kitploit
Tools/GitHubGitHub/lpizziniacofortinet/cve-2026-123158-openssh-musl-lab
Cloud Infrastructure SecurityContainer SecurityVulnerability AnalysisSecurity VirtualizationAuthenticationLearning & EducationLabs & Practice
GitHublpizziniacofortinet/cve-2026-123158-openssh-musl-lab

cve-2026-123158-openssh-musl-lab

Automated Terraform lab environment for OpenSSH on Linux with musl libc without PAM (CVE-2026-123158 research)

View Repository
13 days agoNot yet reviewed
Share

OpenSSH musl libc Lab Environment (CVE-2026-123158)

A self-contained Terraform lab environment for studying and researching OpenSSH authentication behaviors before version 10.6p2 when compiled against musl libc without PAM (UsePAM no).


πŸ—οΈ Architecture Overview

The lab deploys an Azure virtual machine with a dual-SSH port architecture to isolate administrative access from the target research environment:

                          Internet / Client
                            β”‚          β”‚
                 Port 2222  β”‚          β”‚  Port 22
          (Host Management) β”‚          β”‚  (Target Research Service)
                            β–Ό          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Azure Virtual Machine (Ubuntu 22.04 LTS)                 β”‚
β”‚                                                          β”‚
β”‚  β€’ Host OpenSSH Server (sshd listening on Port 2222)     β”‚
β”‚  β€’ Docker Engine & Cloud-Init Provisioning               β”‚
β”‚                                                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ Container: musl-sshd (Alpine 3.20 base)             β”‚  β”‚
β”‚  β”‚                                                    β”‚  β”‚
β”‚  β”‚  β€’ OpenSSH 9.8p1 built against musl libc           β”‚  β”‚
β”‚  β”‚  β€’ Built with --without-pam (UsePAM no)            β”‚  β”‚
β”‚  β”‚  β€’ Listens on Port 22                              β”‚  β”‚
β”‚  β”‚  β€’ User accounts: victim (*), testuser (*),        β”‚  β”‚
β”‚  β”‚    saltuser (password hash for salt retrieval)     β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  • Port 2222: Ubuntu 22.04 LTS host management SSH (secured with auto-generated SSH key).
  • Port 22: Alpine Linux 3.20 container running OpenSSH 9.8p1 compiled against musl libc without PAM (UsePAM no).

⚑ Key Features

  • 100% Automated via Terraform: No manual key generation, manual file permission changes, or out-of-band provisioning scripts required.
  • In-State SSH Key Management: Generates a 4096-bit RSA key pair automatically with tls_private_key and saves id_rsa locally with secure permissions (0600) using local_sensitive_file.
  • Cloud-Init Synchronization: Terraform's null_resource.wait_for_cloud_init automatically monitors cloud-init status --wait over SSH (port 2222) to guarantee that container compilation and setup are completely finished before terraform apply returns.
  • Isolated Target Accounts:
    • victim: Account with * in /etc/shadow (simulating key-only or passwordless accounts).
    • testuser: Additional test account with * in /etc/shadow.
    • saltuser: Account with a valid password hash (SaltUserValidPass123!) to supply salts for timing mitigation logic.

πŸ“‹ Prerequisites

  1. Terraform: >= 1.5.0
  2. Azure Account & Credentials: Active subscription and Service Principal or Azure CLI login with contributor permissions on the subscription.

πŸš€ Quickstart

1. Set Azure Credentials

Export your Azure credentials or source an environment file:

export ARM_CLIENT_ID="<your-client-id>"
export ARM_CLIENT_SECRET="<your-client-secret>"
export ARM_SUBSCRIPTION_ID="<your-subscription-id>"
export ARM_TENANT_ID="<your-tenant-id>"

2. Initialize Terraform

terraform init

3. Deploy the Lab

terraform apply

During apply, Terraform will:

  1. Generate the RSA 4096 key pair and write id_rsa and id_rsa.pub.
  2. Provision the Azure Resource Group, Virtual Network, Subnet, NSG, Public IP, and VM.
  3. Wait for cloud-init to compile OpenSSH on musl libc, start the container, and verify the service status.

πŸ’» Connecting to the Lab

Administrative Access (Host VM - Port 2222)

Connect to the Ubuntu host VM using the auto-generated private key:

# Direct command (from PowerShell or native Linux):
ssh -i ./id_rsa -p 2222 azureuser@<PUBLIC_IP>

# Note for WSL users accessing /mnt/c:
# If DrvFs prevents 0600 permission checks, copy to /tmp first:
install -m 600 id_rsa /tmp/id_rsa && ssh -i /tmp/id_rsa -p 2222 azureuser@<PUBLIC_IP>

Target Service Access (OpenSSH musl - Port 22)

Interact with the research daemon on port 22:

ssh victim@<PUBLIC_IP> -p 22

πŸ” Verification & Diagnostics

Once connected to the host via port 2222:

  1. Check Container Status:

    sudo docker ps
    
  2. Inspect OpenSSH Container Logs:

    sudo docker logs -f musl-sshd
    
  3. Check Cloud-Init Provisioning Logs:

    tail -n 100 /var/log/cloud-init-musl-ssh.log
    

βš™οΈ Configuration Variables

VariableDescriptionDefault
resource_group_nameName of the Azure Resource Grouprg-musl-sshd-lab
locationAzure Regionwesteurope
vm_nameName of the Virtual Machinevm-musl-sshd
vm_sizeAzure VM SKUStandard_B2s
admin_usernameAdministrative user for host OSazureuser
tagsTags applied to all resources(See variables.tf)

πŸ“€ Outputs

OutputDescription
public_ipPublic IP address assigned to the VM
host_admin_ssh_commandReady-to-use SSH command for host management (port 2222)
vulnerable_musl_ssh_commandSSH command for the musl daemon (port 22)
private_key_filePath to the auto-generated private key
resource_group_nameDeployed Resource Group name

🧹 Teardown

To destroy all deployed Azure resources and clean up local keys and state:

terraform destroy
Download Tool

Most Popular

View all β†’

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    1.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    593
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    371
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    336
  • 5

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    326
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurityβ€”where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    322

Explore all tools

Browse our collection of tools

View all tools β†’