Skip to content
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

Set Tor Bridge #676

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions payloads/library/execution/Set_Tor_Bridge_In_Windows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Set Tor Bridge in Windows

Introducing the "Set Tor Bridge in Windows" payload a DuckyScript payload designed for Bash Bunny. This versatile payload empowers users to manually configure Tor bridges, enabling the selection of any bridge of their choice. With the ease of customization, users can redefine their Tor experience by setting bridges in a way that suits their preferences. This payload not only provides flexibility but also enhances user control over their Tor network settings.

> In Tor, a "bridge" is a server used as an intermediary to help users connect to the Tor network more securely and bypass any restrictions or censorship on accessing Tor. Bridges are often employed when direct access to Tor is blocked or monitored by a firewall or censorship system.
>
> Essentially, when using a bridge, the initial connection is made through the bridge instead of through a standard Tor entry node. This makes it more challenging for censors to identify and block Tor traffic, as the traffic through the bridge appears like regular, non-Tor traffic.
>
> Bridges can be manually configured in the Tor client settings, allowing users to overcome restrictions and access the Tor network in situations where it might otherwise be prevented.

***Source**: What is a bridge\[[1](#sources)]*

**Category**: Execution

## Index

- [Set Tor Bridge in Windows](#set-tor-bridge-in-windows)
- [Payload Description](#payload-description)
- [Note](#note)
- [Sources](#sources)
- [Credits](#credits)

## Payload Description

The following DuckyScript payload is designed to execute a series of commands using the TorBrowser. It requires Tor to be installed before running. Here's a description of the payload's behavior:

1. Opens the Start menu by pressing the GUI (*Windows*) key.
2. Types "*TorBrowser*" and presses Enter to launch the TorBrowser.
3. Executes a sequence of key presses to navigate in the browser:

a. Presses ALT

b. Then 2 times the Left Arrow to position yourself on the "Tools" item

c. Presses ENTER to open the menu

d. Up Arrow and ENTER to open the settings page

e. Write the contstant "Add a new Bridge" to search the bridge section

f. Now the ALT TAB command combination is repeated 12 times. It is seemingly counterintuitive to go backwards, but this strategy allows the use of this payload to be generalized in that it does not change whether other active bridges are already present.

h. Presses Enter to open the Manual Bridge area.
5. Moves the cursor to the text area (*TAB*).
6. Writes the contents of the variables $BRIDGE, $BRIDGE-N, multiple bridges can be entered (*see note 4*).
7. Saves the new settings and closes
8. Closes the TorBrowser using the ALT F4 key combination.

## Note

1) The payload is designed to run on a Windows system and requires Tor to be installed.
2) The variable $BRIDGE is defined at the beginning of the payload to allow the user to specify their own bridge.
3) Ensure that the key sequences are adapted to the specific version of the TorBrowser in use.
4) If you want to add more nodes, you need to enter a new BRIDGE-N variable at the beginning and the STRING + ENTER command when writing nodes. An example below...

```plaintext
[22] BRIDGE1="<an-another-one-bridge>"
...
[55] QUACK STRING $BRIDGE1
[56] QUACK ENTER
```

## Sources

1. What is a bridge? - https://support.torproject.org/censorship/censorship-7/

## Credits

<h2 align="center">Aleff</h2>
<div align=center>
<table>
<tr>
<td align="center" width="96">
<a href="https://github.com/aleff-github">
<img src=https://github.com/aleff-github/aleff-github/blob/main/img/github.png?raw=true width="48" height="48" />
</a>
<br>Github
</td>
<td align="center" width="96">
<a href="https://www.linkedin.com/in/alessandro-greco-aka-aleff/">
<img src=https://github.com/aleff-github/aleff-github/blob/main/img/linkedin.png?raw=true width="48" height="48" />
</a>
<br>Linkedin
</td>
</tr>
</table>
</div>
60 changes: 60 additions & 0 deletions payloads/library/execution/Set_Tor_Bridge_In_Windows/payload.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
QUACK REM ###################################
QUACK REM # #
QUACK REM # Title : Set Tor Bridge #
QUACK REM # Author : Aleff #
QUACK REM # Version : 1.0 #
QUACK REM # Category : Execution #
QUACK REM # Target : Windows 10/11 #
QUACK REM # #
QUACK REM ###################################

ATTACKMODE HID

QUACK REM REQUIREMENTS:
QUACK REM - Tor installed

QUACK REM NOTE:
QUACK REM - Payload tested using TorBrowser 13.0.8 based on Mozilla Firefoz 115.6.0esr ENG

QUACK REM VARIABLES:
QUACK REM Set your own bridge here replacing 'here'
BRIDGE='here'
QUACK REM BRIDGE1='Another one...'
QUACK REM BRIDGEN='... and so on.'

QUACK DELAY 2000
QUACK GUI
QUACK DELAY 500
QUACK STRING tor browser
QUACK ENTER
QUACK DELAY 1000
QUACK ALT
QUACK LEFTARROW
QUACK LEFTARROW
QUACK ENTER
QUACK UPARROW
QUACK ENTER
QUACK DELAY 500
QUACK STRING Add a new Bridge
QUACK ALT TAB
QUACK ALT TAB
QUACK ALT TAB
QUACK ALT TAB
QUACK ALT TAB
QUACK ALT TAB
QUACK ALT TAB
QUACK ALT TAB
QUACK ALT TAB
QUACK ALT TAB
QUACK ALT TAB
QUACK ALT TAB
QUACK ENTER
QUACK TAB
QUACK STRING $BRIDGE
QUACK ENTER
QUACK REM STRING $BRIDGE-N
QUACK REM ENTER
QUACK TAB
QUACK ENTER
QUACK DELAY 500
QUACK ALT F4