diff --git a/payloads/library/general/Bluetooth2/README.md b/payloads/library/general/Bluetooth2/README.md new file mode 100644 index 00000000..1f969c68 --- /dev/null +++ b/payloads/library/general/Bluetooth2/README.md @@ -0,0 +1,23 @@ +# BlueTooth2 + +BlueTooth2 is a program that scans for two bluetooth devices and depending on what one it finds it runs whatever. + +## What it Does and How its Different + +Unlike the standard WAIT_FOR_PRESENT that scans for one device and doesnt allow code after it to run until found. +This will do a scan and then check for two different devices names allowing for multiple remote triggers that +can do different things. + +## Note + +I imagine your looking at this code and wondering what idiot wrote it and I would very cool if you would +make it more efficient or even pretty. It worked when I tested it (I use BLE Tool) + +## LED + +| COLOR | DESCRIPTION | +|---------|-------------| +| White | Scan | +| Yellow | Checking | +| Green | Attack1 | +| Blue | Attack2 | diff --git a/payloads/library/general/Bluetooth2/payload.txt b/payloads/library/general/Bluetooth2/payload.txt new file mode 100644 index 00000000..04d30f0e --- /dev/null +++ b/payloads/library/general/Bluetooth2/payload.txt @@ -0,0 +1,76 @@ +#!/bin/bash +# +# Title: BlueTooth2 +# Description: multiple remote triggers +# Author: JustaProgrammer9 +# Category: General +# Target: Windows +# Attackmodes: HID +# Suggestion: Use BLE Tool if triggers take to long +# + +#--// Function \\--# +WAIT_FOR_BLUETOOTH() { + stty -F /dev/ttyS1 speed 115200 cs8 -cstopb -parenb -echo -ixon -icanon -opost + stty -F /dev/ttyS1 speed 115200 cs8 -cstopb -parenb -echo -ixon -icanon -opost + sleep 1 + echo -n -e "AT+ROLE=2" > /dev/ttyS1 + echo -n -e "AT+RESET" > /dev/ttyS1 + timeout 5s cat /dev/ttyS1 > /tmp/bt_observation +} +#------------------# + + +#--// Setup/Config \\--# +ATTACKMODE HID + +device="notepad" + +otherdevice="attack" +#----------------------# + + +#--// Check for devices \\--# +while true; do +LED W +WAIT_FOR_BLUETOOTH +LED Y + +if grep -qao $device /tmp/bt_observation; then +if1="true" +break + +sleep 1 + +elif grep -qao $otherdevice /tmp/bt_observation; then +if2="true" +break + +sleep 1 + +#add more if's for more bluetooth devices to look for + +fi +done +#---------------------------# + + +#--// Your attacks \\--# +if [ $if1 = "true" ]; then +LED G +Q GUI r +Q DELAY 100 +Q STRING "notepad" +Q ENTER +Q DELAY 200 +Q STRING "Hak5 rules" +Q ENTER + +elif [ $if2 = "true" ]; then +LED B +# do something cool here + +else +LED R + +fi