Exploit databaseDownload repository ZIP
GH-fe45a0a486d27c36aa80e2c232873fd2
khoatran107/cve-2025-21756
Sources for CVE-2025-21756
4 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files7
khoatran107/cve-2025-21756Revision 13a3614dbba0
- ↑..Parent directory
- compress.sh
- done_06_04.c
- done_cleanup_06_05.c
- done_edit_06_10.c
- run_with_gdb.sh
- sol_run_with_gdb.sh
- test copy.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
backups/sol_run_with_gdb.sh
Shell · 980 bytes#!/bin/bash
kill -9 `pidof qemu-system-x86_64`
TARGET_UID=1000
# Check if an argument is provided
if [[ $# -ne 1 ]]; then
TARGET_UID=0
fi
# Update inittab file with the specified TARGET_UID
INITTAB_FILE="./initramfs/etc/inittab"
if [[ ! -f "$INITTAB_FILE" ]]; then
echo "Error: $INITTAB_FILE not found"
exit 1
fi
# Replace the TARGET_UID in the setuidgid command
sed -i "s/setuidgid [0-9]\+/setuidgid $TARGET_UID/" "$INITTAB_FILE"
if [[ $? -ne 0 ]]; then
echo "Error: Failed to update $INITTAB_FILE"
exit 1
fi
# Run compress.sh with test.c
if [[ ! -f "./compress.sh" ]]; then
echo "Error: compress.sh not found"
exit 1
fi
if [[ ! -f "./test.c" ]]; then
echo "Error: test.c not found"
exit 1
fi
./compress.sh ./solution.c
if [[ $? -ne 0 ]]; then
echo "Error: compress.sh failed"
exit 1
fi
tmux splitw -h "gdb -x ./script.gdb"
# Run run.sh
if [[ ! -f "./run.sh" ]]; then
echo "Error: run.sh not found"
exit 1
fi
./run.sh