Man in the Middle Attack

Man In The Middle Attack Definition, Examples, and Ways of Protection




As the Internet keeps progressing and more websites keep arising day by day, there’s more chance for hackers to develop the most advanced kinds of cyberthreats.

Due to the lack of adequate encryption and a website’s security measures, a user’s confidential data is at risk of being exposed and brought to the hands of hackers. One of the most common attacks that takes advantage of a site’s poor security is a man-in-the-middle attack (MITM), which is based on eavesdropping on the communication between two parties.



The main goal of a MITM is to steal a visitor’s credentials that hackers can later use for executing malicious activities. It’s mostly performed using a wireless access point (Wi-Fi), where hackers install a spoofing tool that helps them monitor the traffic of the users connected to it.

The following article will provide a broader explanation of a man in the middle attack, including its real-life examples and ways of prevention.

What is Man In The Middle Attack?

Man in the middle, also known as a MITM attack, is a form of a cyber threat that’s based on eavesdropping on the communication between two entities.



Hackers often execute the attack by setting up an open Wi-Fi access point, which contains a spoofing tool that monitors a user’s online activity. It consists of three parties – a victim, the entity with which a victim wants to communicate, and a “man in the middle,” who’s trying to intercept their conversation. In most cases, a victim isn’t aware of the attacker’s presence.

How is MITM Attack Deployed?

Man in the middle may take advantage of different aspects that contain vulnerabilities. The most common situation includes websites that don’t use an SSL (Secure Sockets Layer) certificate, which encrypts the communication between a web browser and a web server.

The URL of the sites that use SSL starts with HTTPS instead of HTTP, and Google marks them as the secure ones. Have a look at the following example of websites that have/haven’t implemented the SSL certificate.

what is man in the middle attack
man in the middle attack prevention

The second example represents one of the most common ways of deploying a MITM attack. Since such sites don’t use encryption, all the information a user enters could become visible to hackers.

Google Chrome and other browsers will advise you not to enter any information on pages that are considered unsecured since they may open the door to many risks.

When a site uses HTTP, a man in the middle can get your login credentials and use them for malicious acts. While spoofing, they will get this:

how to detect man in the middle attack

The lack of encryption allows hackers to see your actual login information, while the SSL certificate may make the above-mentioned example of credentials look like this:

how to prevent man in the middle attack

Therefore, never trust the HTTP sites.

Have a look at one man in the middle attack real life example:

After a hard day at work, you are coming to a café to have a coffee and search the Internet to find a perfect gift for your friend. You notice that you’ve spent your mobile data, but luckily, the café offers a free Wi-Fi connection you can use while enjoying your after-work coffee.

Meanwhile, a man sitting at the table next to you is thinking about how he can spend the rest of his free time. The idea of hacking crosses his mind as soon as he notices that you’re entering an HTTP website. Then he makes his next move.

A hacker sets up an open Wi-Fi hotspot, using the name similar to the one used by a café. He made sure he installed a spoofing tool to his Wi-Fi. Since the man is sitting next to you, his connection is much stronger than the one you’ve been using, which is why you decide to switch to his connection, without knowing that it’s not secure.

man in the middle attack example

Once you’ve connected to a hacker’s Wi-Fi, he starts to monitor your connection, which allows him to see your credentials he can later use to buy things from your credit card or log in to sites that contain your vital data.

When you enter a site that requires your login information, including a card number, a hacker sitting next to you can easily see them on his computer. Once he’s got all that he needed, your connection dropped, and you noticed that there’s no money left on your card. This is a man in the middle attack example that explains its modus operandi.

What are the Most Common Types of MITM Attack?

There are many ways of implementing a man in the middle attack, and they consist of interception and decryption.

Interception is the most common way of implementing the attack, which is done through monitoring a user’s network and intercepting the client-server and person-to-person communication.

Hackers who deploy interception may launch some of the following attacks:

  • IP spoofing: It’s an attack that involves a hacker’s intention to create a false source IP address to impersonate another computing system. By spoofing the IP address, an attacker may trick you into entering a website that seems legitimate and make you leave the critical information you’d not usually share.
  • ARP spoofing: This type of spoofing consists of linking an attacker’s MAC address with the IP of a legitimate user on a local area network. That way, all the traffic sent by a user will go through the attacker’s gateway instead of a router.
man in the middle attack real life example
  • DNS spoofing: This form of MITM attack is also known as “DNS poisoning,” and it includes infiltrating a DNS server and modifying a site’s address record. Therefore, users who’re trying to access the website will be sent to the attacker’s site.
  • Email hijacking: Hackers often target email accounts of banks and other financial institutions trying to gain access and monitor transactions between banks and their customers. Once they gain access, attackers send emails to customers, asking them to follow their instructions; that way, some clients may end up giving the money to the wrong hands.
  • Stealing browser cookies: Websites use cookies to store a user’s personal information in order to provide a better user experience. However, if hackers gain access to those cookies, they may get your passwords, address, and other critical information.

When it comes to decryption, it’s usually performed by attempting to decrypt any two-way SSL traffic without alerting the user or application. The most common ways of such a deployment include:

  • HTTPS spoofing: Hackers use this method to send a fraudulent certificate to the victim’s browser once they made an initial connection request to a secure site. Accordingly, a hacker is able to access a user’s data.
  • SSL BEAST (Browser Exploit Against SSL/TLS): This attack is aimed at a TLS (Transport Layer Security) vulnerability found in SSL. It infects a victim’s computer with malicious JavaScript that intercepts encrypted cookies sent by a web app. It affects the app’s cipher block chaining (CBC), which allows the decryption of cookies and authentication tokens.
how to prevent man in the middle attack

How to Detect Man in the Middle Attack?

Users aren’t usually aware of the possibility that someone may be trying to spoof their network intending to steal confidential information. Hackers we know today can easily duplicate a network’s SSID (wireless network name) and trick users into connecting to a wrong network, without making them realize what they’ve done.

Have a look at some of the signs that may imply the presence of a third person:

  • Suspicious SSIDs: If you notice that there are two different SSIDs in the same location, that may mean that one of them is fake. For example, McDonaldsFreeWiFi and McDonaldsWiFi_Join. If you’re not sure which one is correct, ask an employee about it.
  • Frequent popups: The sign that someone might be intercepting your network may be constant popups that are asking for your credentials.
  • Suspicious login pages: You may notice illegitimate login pages that consistently appear on your device.
  • Fake software update popups: This is something that commonly appears due to a MITM attack. Therefore, you’re advised not to download such “updates.”
  • Certificate error messages: If you’re constantly getting messages that indicate the problem with your website’s security certificate, that may be the signal that someone’s trying to execute the attack.

5 Man In The Middle Attack Prevention Tips

MITM attacks can be fatal for both business and home users that use the Internet recklessly. Hackers can penetrate your network without you even noticing and steal your data before you can do anything to stop them.

To make sure no man in the middle can spy on your network, pay attention to the following tips:

1.      Don’t Enter HTTP Sites

As mentioned earlier, don’t enter the sites that have no “S” at the end. Hackers often target such pages because they don’t encrypt the traffic and make a visitor’s information potentially visible.

Your web browser will warn you not to log in to the sites whose URL starts with HTTP, and it’s strongly recommended to listen to it.

2.      Don’t Open the Attachments that Come from Untrusted Sources

Hackers have always used emails as a tool that can help them execute different kinds of cyberattacks. They are exceptionally convenient for implementing phishing attacks, but men in the middle can also achieve their goals by using the same strategy.

Attackers may compose emails that seem as if they were coming from credible sources (PayPal, Amazon, Apple, etc.). Such emails are used to trick you into clicking to a malicious URL that’s often included in an email and leaving your personal data there.

Although they might not seem suspicious, such emails often contain grammatical errors and typos, which can help you recognize them as scum. Besides, no legitimate company will ever ask for your confidential data via email!

3.      Use VPN When Connecting to a Public Network

Most people connect to public Wi-Fi without thinking about potential inconveniences that might arise. MITM attacks often target public and open wireless connections in cafés, airports, or bus stations, where lots of people use their devices for different purposes.

When you have no other choice but log in to your accounts while connected to a public network, make sure you use a VPN (a virtual private network), which will encrypt your connection and prevent it from being spied by anyone. That way, no one can access our critical data, including usernames, passwords, card details, etc.

4.      Install an Adequate Antivirus Solution

Man in the middle attacks can also be executed by using malware. If your device is not adequately protected, you’re at risk of being exposed to cybercriminals, which can jeopardize your privacy and reputation.

There are many different antivirus solutions you can install based on your needs and purposes. Such programs will detect and prevent any suspicious activity from executing on your system, making sure you’re never at risk of being infected.

You’re not ready to get paid programs yet? Check out the 5 Best Free Antivirus Solutions for Home Users.

5.      Update Your Home Wi-Fi Network

Your home router needs to be highly protected, as well, which means that you need to update all default usernames and passwords on it.

Never leave the name and a password that come together with the router but assign them new titles. Make sure your password is strong and uncrackable and change it from time to time.

Verdict: Can Anyone Become a Victim of a Man in the Middle Attack?

Now that technology has almost replaced paperwork and going to the bank, we can say that cybercrime is at its highest level. Therefore, everyone can become a victim of different cyberattacks.

MITM attacks can be targeted at both corporate and non-business users that tend to use open Wi-Fi connections to make transactions or just log in to their Facebook accounts. The best way to prevent such attacks is not to use public connections without a VPN and not to trust emails or pages that don’t seem credible.

Cybercrime is a crime, which means that it can leave harsh consequences unless you’re armed with necessary tools and careful while roaming through the jungle called the Internet.

Pin It on Pinterest