# Man-in-the-Middle (MITM)

> What is a man-in-the-middle (MITM) attack, how is it carried out, and how do HTTPS and HSTS prevent it?

Canonical: https://www.internhack.in/learn/interview/web-security/security-man-in-the-middle
Last updated: 2026-11-28

Difficulty: Beginner

## Question

What is a man-in-the-middle (MITM) attack, how is it carried out, and how do HTTPS and HSTS prevent it?

*The full answer is for InternHack members. Open the page link above to read it.*

## Concepts covered

MITM, ARP Spoofing, SSL Stripping, HSTS, Certificate Validation

Previous: [DoS vs. DDoS](https://www.internhack.in/learn/interview/web-security/security-dos-vs-ddos) · Next: [Homograph Attack](https://www.internhack.in/learn/interview/web-security/security-homograph-attack) · [All of Web Security (OWASP, JWT, XSS, CSRF)](https://www.internhack.in/learn/interview/web-security)

## More Web Security (OWASP, JWT, XSS, CSRF) questions

- [The Purpose of Salt](https://www.internhack.in/learn/interview/web-security/security-salting-passwords)
- [Pepper vs. Salt](https://www.internhack.in/learn/interview/web-security/security-peppering-passwords)
- [Insecure Deserialization](https://www.internhack.in/learn/interview/web-security/security-insecure-deserialization)
- [JSON Poisoning](https://www.internhack.in/learn/interview/web-security/security-json-poisoning)
- [Directory Traversal](https://www.internhack.in/learn/interview/web-security/security-directory-traversal)
- [Principle of Least Privilege](https://www.internhack.in/learn/interview/web-security/security-least-privilege)

## Related

- [Learn](https://www.internhack.in/learn)
- [Interview Prep](https://www.internhack.in/learn/interview)
- [Web Security (OWASP, JWT, XSS, CSRF)](https://www.internhack.in/learn/interview/web-security)
