What Is A Man-In-The-Middle Attack(MITM): Definition, Types, And More?

What Is A Man-In-The-Middle Attack(MITM)

A highly specific type of attack in which the attacker stands between the two victims  (in this case, you and the server) is known as a man-in-the-middle attack (sometimes known as a monster-in-the-middle attack, or MITM attack).

Both parties are victims because they are duped into believing they are speaking directly to one another when, in reality, they are speaking through the attacker, a third party.

One common target for such an assault is the DNS system. The MITM would occur between you and the DNS server, having the same result as if you were communicating with a rogue or compromised service.

As DNS servers are not cryptographically signed, there is no way to verify whether they are delivering the proper IP address, making it likely that when you type in a website address, you could end up on the wrong server or the server of the attacker.

Of course, a man-in-the-middle attacker need not be a man, a monster, or even a single individual in actuality. Although it might be a group of people, it’s most likely just a malicious person or gang controlling some program.

What Is A Man-In-The-Middle Attack Or A MITM Attack??

A man-in-the-middle, monster-in-the-middle, machine-in-the-middle, meddler-in-the-middle, and manipulator-in-the-middle are terms used in cryptography and computer security. Person-in-the-middle (MITM) adversary-in-the-middle (PITM).

A (AiTM) attack is a cyberattack in which the attacker places oneself between two parties who believe they are directly speaking with each other, and then secretly relays and perhaps modifies their messages.

Any pertinent messages sent between the two victims must be intercepted by the attacker, who must then introduce fresh messages. In many cases, this is simple; for instance, a person within the reception range of an unsecured Wi-Fi access point could act as a man-in-the-middle attacker.

How Does MITM Attack Work?

Cybercriminals place themselves in the middle of data transfers or online conversations during MiTM attacks. The attacker easily acquires accessibility to the user’s web browser and the data it transmits and receives during transactions through the dissemination of malware.

The main targets of MiTM attacks are online banking and e-commerce sites since they demand safe authentication using a public key and a private key, which makes it possible for attackers to steal login credentials and other private information.

Data interception and decryption, a two-step procedure, are typically used to carry out these attacks. A data transfer between a client and a server may be intercepted by an attacker as part of data interception.

While intercepting the data, establishing a connection to the legitimate website, and acting as a proxy to read and insert bogus information into the communication, the attacker deceives the client and the server into thinking that they are exchanging information with each other.

How Does Using A VPN Help To Stop MITM Attack?

VPNs are able to conceal this personal data in order to guard against MITM attacks:

Browsing History

Your browsing history gives you information about your online activity, such as the searches you perform before making a purchase, the email program you use, the banks you use, and more.

The payments or purchases you make afterward can be manipulated if hackers gain these details.


When you use your desktop computer, laptop, tablet, or smartphone to access the internet, especially on a public WiFi network, these devices are great targets for hackers.

A VPN secures the information you send and receive on your devices, preventing hackers from taking control of them.

IP Address

Your location and internet search history are made public by your IP address. Your IP address is concealed since a VPN connects using one of its own.

This enables you to browse the web anonymously and retain your online privacy. Particularly if you’re using a public computer that is owned by a library, a school, or a place of business.

How To Prevent MITM Attack For Messaging?

MITM attack or man-in-the-middle attacks are not just found while browsing. Whenever encryption is employed, including in email and chat communications, they pose a concern.

The MITM attack approach is similar to that of web browsing in encrypted chat and email, but the protection is slightly different.

1. Use A good VPN

Your VPN software comes packed with its own certificate authority, so you don’t have to “trust” the encryption key of the server you are linking to for the first time.

Only servers that can display a signed certificate from the VPN provider will be able to establish a connection with your VPN.

2. Use OTR messaging

Off-the-record messaging is a way to communicate while maintaining your anonymity and security.

Encryption keys are traded between users when OTR communication starts. If an attacker stands between two users, they can create two separate encrypted chats with the victims, giving the impression that they are speaking directly to one another.

As chat apps lack Certificate Authorities, the two users must manually verify their keys to confirm that they are truly speaking to one another.

They can accomplish this by publishing their keys on their website, or business card, or by sending them through any other secure route that an attacker would be unable to access.

3. Encrypted Chat Apps Should be used

Applications like chat that enable encrypted communication between users demand a method to guard against MITM.

For each chat in Signal, for instance, you may view a long list of numbers by clicking on your contacts and choosing “Display Safety Number.” Your key’s fingerprint is on one half, and your contact’s fingerprint is on the other.

4. Set Up PGP

The industry standard for encryption is PGP, short for Pretty Good Privacy. It’s employed to encrypt files, emails, and text. Also, it may be used to check the accuracy of any form of data.

A PGP key may be generated by anybody, therefore an attacker could simply disseminate a key in the name of the target. All attempts to contact the victim are now actually made to contact the attacker, who will then relay the messages to the victim.

Both sides believe they are secure because they are using PGP, yet they are actually openly sharing their messages with the attacker.

PGP keys are frequently posted to keyservers where they are made available to the public. Key signing is a feature that PGP utilizes to protect users from fake keys. Many of your coworkers and close friends must sign your key for it to work.

Based on the idea that everyone on the internet is connected by no more than four individuals, it is probably true that a stranger’s key has been signed by a person you trust.

However, keys are not frequently signed in practice, so you will still need to rely on personally verifying your chat buddy.

How To Prevent MITM Attack For Web Browsing?

1. Visit only HTTPS Websites

The two things that HTTPS (Hypertext Transfer Protocol Secure) does are It authenticates that the website you are visiting is actually the one you intended to visit while encrypting the traffic between you and the website you are viewing. If a website employs HTTPS, a lock icon will show up in your browser’s address bar.

In the case of DNS, HTTPS is the answer to the MITM issue.

The site’s owner must verify their encryption keys with a Certificate Authority in order to accomplish this (CA). In order to prevent certificates from being issued improperly, which regularly happens to Google, the keys and registrations are publicly disclosed.

Using Google’s online transparency tool, you can look up anyone’s CA certifications. Just enter their URL into your browser.

We are therefore mostly protected from these MITM attacks as long as every website utilizes HTTPS and as long as we verify that each site we visit has the lock in the browser bar.

1.1. HTTPS Everywhere for your browser

A brilliant application called HTTPS Everywhere from the Electronic Frontier Foundation compels your browser to only use the protocol https while allowing you to define rules for all the websites you visit. This greatly reduces the likelihood that you may unintentionally miss a MITM attack.

Your browser has an extension called HTTPS Everywhere. Even better, you can create a rule that disables all HTTP connections, but regrettably, this renders many websites inaccessible.

The Chrome, Firefox, and Edge browser extensions from ExpressVPN integrate HTTPS Everywhere.

2. Use Browsers That Support HSTS

An HSTS website directs your browser to only connect using HTTPS going forward and to never connect using any unencrypted method when you first access the website.

However, this only works if you are not already under assault when you initially connect to the website.

If properly implemented, HSTS makes sure that all upcoming connections are both encrypted and authenticated using the same key, ensuring that even in the unlikely event that an attacker could deceive a browser into initiating an encrypted connection, such a connection would be unsuccessful.

To ensure that even a first connection is established over an encrypted channel, certain well-known, high-profile websites have succeeded in convincing the designers of popular browsers to add a unique rule to their software.

Common Types of MITM Attacks

MITM attack often falls under one of seven categories. The interception and deciphering of the traffic are the two stages that they normally go through.


The MITM attacker’s act of intercepting a client-to-server data transfer is referred to as the interception phase. These MITM attacks frequently occur during the interception phase.

DNS Spoofing

Your computer looks for the IP address of any website in a global database called DNS, which functions as a phone book for websites when you type expressvpn.com into the address bar of your browser.

DNS spoofing involves the attacker changing the DNS records to direct victims to a different website than the one they intended to visit. DNS poisoning is another name for DNS spoofing. This form of DNS hijacking is typical.

ARP spoofing

Attackers who use ARP spoofing exploit the protocol that links a media access (MAC) address that is fixed to an ever-changing IP address. It utilizes a local area network to transmit forged ARP messages.

When its MAC address is connected to a legitimate IP address of a computer or server on a network, the attacker accesses any data that is intended for that IP address.

IP spoofing

In IP spoofing, the attacker alters the IP headers of TCP packets sent back and forth between two devices, rerouting the traffic to a false website, for example. It is the approach that is most frequently used to enter a target’s network.


Attackers exploit the data they have previously intercepted to their advantage by decrypting it in the decryption step.

SSL Stripping

An attacker that uses SSL stripping lowers the level of protection in between the user as well as the website to one that isn’t encrypted. In other words, it converts an HTTPS-safe connection to an encrypted HTTP connection, which is less secure.

SSL Hijacking

An attacker intercepts a connection in an SSL hijacking and creates phony SSL/TLS certificates for the website you are visiting. The victim is tricked into thinking they are on a secure HTTPS website.

HTTPS spoofing

The goal of HTTPS spoofing is to trick the target into visiting a false website with an identical domain to a legitimate one.

To do this, special characters that resemble the English alphabet are used. For instance, the Latin “a” and the Cyrillic “a” have the same appearance.


SSL BEAST, also known as Browser Exploit against SSL/TLS, takes advantage of a hole in the TLS 1.0 and earlier SSL protocols. It enables attackers to steal authentication tokens and compromise encrypted HTTPS client-server sessions.

Well-Known Examples Of MITM Attacks


Belkin’s wireless routers were discovered to have a number of vulnerabilities in 2015. Attackers may fake DNS answers to direct targets to attacker-controlled hosts or unintentionally send requests to the web server.

The Babington Post

Long before computers were created, in 1586, the Babington Plan served as a prime example of a MITM attack.

A third party intercepted communication between Mary Stuart, Queen of Scots, and her followers on a plot to assassinate Queen Elizabeth I.

It was translated and discovered that she had supported the murder of Elizabeth, which had resulted in her own death.


The Finnish IT company decrypted user data that was transmitted via secure HTTPS connections on some of its phones in 2013, committing a MITM attack. It stated that its purpose was to expedite web page loading and compress data.


In 2017, there was a data breach at Equifax. They then launched a website named equifaxsecurity2017.com to provide affected clients with information and resources.

Due to a flaw in the website, attackers were able to redirect viewers to a phony website by using DNS and SSL spoofing.


Attackers from Iran broke into the DigiNotar servers in 2011 and launched a MITM attack on Google. DigiNotar was taken over and shut down by the Dutch government a month later.


How can you detect MITM Attacks?

Many methods exist for identifying a man-in-the-middle attack. When a service you’re using is continuously disconnected, it may be a symptom of a MITM attack because this is when attackers try to intercept your account and password. Check the domain of the website you’re on as well.

How common are mITM attacks?

Man-in-the-middle or MITMĀ attacks account for 35% of all exploits, according to estimates.

What are some common Tools for Man-In-The-middle Attacks?

The man-in-the-middle assault uses a variety of methods. For instance, software like PacketCreator, Ettercap, and dSniff are used to eavesdrop on host-to-host communication. Additionally used to modify HTTP protocol are proxy tools like OWASP WebScarab.


The only reliable security against man-in-the-middle attacks is to ensure that the websites you visit employ enough encryption.

The HTTPS Everywhere extension will ensure that every time you connect to a site you frequently visit, it is over an encrypted connection. This protects you from being duped into providing information to a server that is only an impostor of the server you meant to connect to.

Under no situation should you provide any sensitive information, including email addresses or passwords, if the green lock is absent. If there isn’t a green lock visible, try again later, use a VPN, or get in touch with the website owner.