Init. import
This commit is contained in:
19
ProcessHunter-Admin/solve/solve.sh
Normal file
19
ProcessHunter-Admin/solve/solve.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 1. Найти процесс, где в окружении есть KEY
|
||||
for pid in $(ps -e -o pid=); do
|
||||
if strings /proc/$pid/environ 2>/dev/null | grep -q 'KEY='; then
|
||||
KEY=$(strings /proc/$pid/environ 2>/dev/null | grep 'KEY=' | head -n1 | cut -d= -f2-)
|
||||
echo "Found KEY in PID $pid"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
[ -z "$KEY" ] && { echo "KEY not found"; exit 1; }
|
||||
|
||||
# 2. Расшифровать flag.enc
|
||||
openssl enc -aes-256-cbc -d -salt -pbkdf2 -iter 100000 \
|
||||
-in flag.enc -out decoded_flag.txt \
|
||||
-pass pass:"$KEY"
|
||||
|
||||
cat decoded_flag.txt
|
||||
Reference in New Issue
Block a user