-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add BlueBunny #670
Open
90N45-d3v
wants to merge
1
commit into
hak5:master
Choose a base branch
from
90N45-d3v:BlueBunny
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add BlueBunny #670
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# BlueBunny | ||
* Author: 90N45 | ||
* Version: 1.0 | ||
* Category: Remote | ||
* Attackmodes: NONE (Custom) | ||
|
||
### Description | ||
Command & Control (C2) solution that communicates directly over Bluetooth-Low-Energy with your Bash Bunny Mark II. | ||
Send your Bash Bunny all the instructions it needs on-demand over the air. | ||
|
||
### Setup | ||
This payload makes your Bash Bunny usable for the BlueBunny C2 server. For installing the C2 server and controlling your Bash Bunny remotly from it you can follow the instructions form the [BlueBunny GitHub repository](https://github.com/90N45-d3v/BlueBunny) | ||
|
||
### Status | ||
| LED | State | | ||
| --- | --- | | ||
| Magenta solid (SETUP) | Configuring BLE | | ||
| Green 1000ms VERYFAST blink followed by SOLID (FINISH) | Bash Bunny can be connected to BlueBunny C2 | | ||
|
||
*Average runtime: 13 seconds* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/bin/bash | ||
# | ||
# Title: BlueBunny | ||
# Description: BLE based C2 server for the Bash Bunny Mark II | ||
# Author: 90N45 | ||
# Version: 1.0 | ||
# Category: Remote | ||
# Attackmodes: NONE (Custom) | ||
|
||
LED SETUP | ||
|
||
# Enable serial BLE module | ||
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 | ||
|
||
# Configure BLE module as slave | ||
echo -n -e "AT+ROLE=0" > /dev/ttyS1 | ||
echo -n -e "AT+NAME=BlueBunny" > /dev/ttyS1 | ||
echo -n -e "AT+ADV=1" > /dev/ttyS1 | ||
echo -n -e "AT+RESET" > /dev/ttyS1 | ||
|
||
LED FINISH | ||
|
||
while [[ true ]]; do | ||
# Get incomming data from serial port | ||
data=$(head -1 /dev/ttyS1) | ||
|
||
# Decode base64 encoded data | ||
data=$(echo ${data} | base64 -d) | ||
|
||
# Echo data for debugging | ||
echo "Debugger: ${data}" | ||
|
||
# Single command | ||
if [[ $data =~ "<CMD>" ]]; then | ||
# Extract command | ||
command=${data#*<CMD>} | ||
command=${command%%<CMD>*} | ||
|
||
# Run recieved command | ||
eval "${command}" | ||
fi | ||
|
||
# Payload file | ||
if [[ $data =~ "<PAYLOAD>" ]]; then | ||
# Set payload file name | ||
file="BlueBunnyPayload-${RANDOM}.txt" | ||
|
||
# Extract file content | ||
content=${data#*<PAYLOAD>} | ||
content=${content%%<PAYLOAD>*} | ||
|
||
# Write content to file | ||
printf "${content}" > "${file}"; | ||
|
||
# Run payload | ||
bash $file | ||
|
||
# Remove payload file | ||
rm $file | ||
fi | ||
done |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please either include the BlueBunny source code inside this repository with the instructions for set up or preferably add that repo as a git sub module in this directory. This is so users have everything that is required from the official repo.
Similar to our policy on the USB Rubber Ducky repo: