Don’t let overlooked obligations become incidents. Learn how.
Utility navigation bar redirect icon
Portal LoginSupportContact
Search
Close search
Huntress Logo in Teal
  • Platform Overview
    Managed EDR

    Get full endpoint visibility, detection, and response.

    Managed EDR

    Get full endpoint visibility, detection, and response.

    Managed ITDR

    Protect your Microsoft 365 identities and email environments.

    Managed ITDR

    Protect your Microsoft 365 identities and email environments.

    Managed SIEM

    Managed threat response and robust compliance support at a predictable price.

    Managed SIEM

    Managed threat response and robust compliance support at a predictable price.

    Managed Security Awareness Training

    Empower your teams with science-backed security awareness training.

    Managed Security Awareness Training

    Empower your teams with science-backed security awareness training.

    Managed ISPM

    Continuous Microsoft 365 and identity hardening, managed and enforced by Huntress experts.

    Managed ISPM

    Continuous Microsoft 365 and identity hardening, managed and enforced by Huntress experts.

    Managed ESPM

    Proactively secure endpoints against attacks.

    Managed ESPM

    Proactively secure endpoints against attacks.

    Integrations
    Integrations
    Support Documentation
    Support Documentation
    See Huntress in Action

    Quickly deploy and manage real-time protection for endpoints, email, and employees - all from a single dashboard.

    Huntress Cybersecurity
    See Huntress in Action

    Quickly deploy and manage real-time protection for endpoints, email, and employees - all from a single dashboard.

    Huntress Cybersecurity
  • Threats We Stop
    Phishing
    Phishing
    Business Email Compromise
    Business Email Compromise
    Ransomware
    Ransomware
    Infostealers
    Infostealers
    View Allright arrowView Allright arrow
    Industries We Serve
    Education
    Education
    Financial Services
    Financial Services
    State and Local Government
    State and Local Government
    Healthcare
    Healthcare
    Law Firms
    Law Firms
    Manufacturing
    Manufacturing
    Utilities
    Utilities
    View Allright arrowView Allright arrow
    Tailored Solutions
    MSPs
    MSPs
    Resellers
    Resellers
    SMBs
    SMBs
    Compliance
    Compliance
    What Gets Overlooked Gets Exploited

    Most days, nothing happens. But one day, something will.

    Huntress Cybersecurity
    Cybercriminals Have Evolved

    Get the intel on today’s cybercriminal groups and learn how to protect yourself.

    Huntress Cybersecurity
  • Pricing
  • Community Series
    The Product Lab

    Shape the next big thing in cybersecurity together.

    The Product Lab

    Shape the next big thing in cybersecurity together.

    Fireside Chat

    Real people. Real perspectives. Better conversations.

    Fireside Chat

    Real people. Real perspectives. Better conversations.

    Tradecraft Tuesday

    No products, no pitches – just tradecraft.

    Tradecraft Tuesday

    No products, no pitches – just tradecraft.

    _declassified

    Exposing hidden truths in the world of cybersecurity.

    _declassified

    Exposing hidden truths in the world of cybersecurity.

    Resources
    Upcoming Events
    Upcoming Events
    Ebooks
    Ebooks
    On-Demand Webinars
    On-Demand Webinars
    Videos
    Videos
    Whitepapers
    Whitepapers
    Datasheets
    Datasheets
    Cybersecurity Education
    Cybersecurity 101
    Cybersecurity 101
    Cybersecurity Guides
    Cybersecurity Guides
    Threat Library
    Threat Library
    Real Tradecraft, Real Results
    Real Tradecraft, Real Results
    2026 Cyber Threat Report
    2026 Cyber Threat Report
    The Huntress Blog
    Huntress Lands on the Microsoft Marketplace
    Huntress Cybersecurity
    Huntress Lands on the Microsoft Marketplace
    Huntress Cybersecurity
    How Huntress & DEFCERT Are Streamlining CMMC Assessment Prep
    Huntress Cybersecurity
    How Huntress & DEFCERT Are Streamlining CMMC Assessment Prep
    Huntress Cybersecurity
    Live Hacking Into Microsoft 365 with Kyle Hanslovan
    Huntress Cybersecurity
    Live Hacking Into Microsoft 365 with Kyle Hanslovan
    Huntress Cybersecurity
  • Why Huntress

    Go beyond AI in the fight against today’s hackers with Huntress Managed EDR purpose-built for your needs

    Huntress Cybersecurity
    Why Huntress

    Go beyond AI in the fight against today’s hackers with Huntress Managed EDR purpose-built for your needs

    Huntress Cybersecurity
    The Huntress SOC

    24/7 Security Operations Center

    The Huntress SOC

    24/7 Security Operations Center

    Reviews

    Why businesses of all sizes trust Huntress to defend their assets

    Reviews

    Why businesses of all sizes trust Huntress to defend their assets

    Case Studies

    Learn directly from our partners how Huntress has helped them

    Case Studies

    Learn directly from our partners how Huntress has helped them

    Community

    Get in touch with the Huntress Community team

    Community

    Get in touch with the Huntress Community team

    Compare Huntress
    Bitdefender
    Bitdefender
    Blackpoint
    Blackpoint
    Breach Secure Now!
    Breach Secure Now!
    Crowdstrike
    Crowdstrike
    Datto
    Datto
    SentinelOne
    SentinelOne
    Sophos
    Sophos
    Compare Allright arrowCompare Allright arrow
  • HUNTRESS HUB

    Login to access top-notch marketing resources, tools, and training.

    Huntress Cybersecurity
    HUNTRESS HUB

    Login to access top-notch marketing resources, tools, and training.

    Huntress Cybersecurity
    Partners
    MSPs

    Join our partner community to deliver expert-led managed security.

    MSPs

    Join our partner community to deliver expert-led managed security.

    Resellers

    Partner program designed to grow your cybersecurity business.

    Resellers

    Partner program designed to grow your cybersecurity business.

    Tech Alliances

    Driving innovation through global technology Partnerships

    Tech Alliances

    Driving innovation through global technology Partnerships

    Microsoft Partnership

    A Level-Up for Your Business Security

    Microsoft Partnership

    A Level-Up for Your Business Security

  • Press Release
    Huntress Announces Collaboration with Microsoft to Strengthen Cybersecurity for Businesses of All Sizes
    Huntress Cybersecurity
    Press Release
    Huntress Announces Collaboration with Microsoft to Strengthen Cybersecurity for Businesses of All Sizes
    Huntress Cybersecurity
    Our Story

    We're on a mission to shatter the barriers to enterprise-level security.

    Our Story

    We're on a mission to shatter the barriers to enterprise-level security.

    Newsroom

    Explore press releases, news articles, media interviews and more.

    Newsroom

    Explore press releases, news articles, media interviews and more.

    Meet the Team

    Founded by former NSA Cyber Operators. Backed by security researchers.

    Meet the Team

    Founded by former NSA Cyber Operators. Backed by security researchers.

    Careers

    Ready to shake up the cybersecurity world? Join the hunt.

    Careers

    Ready to shake up the cybersecurity world? Join the hunt.

    Awards
    Awards
    Contact Us
    Contact Us
  • Portal Login
  • Support
  • Contact
  • Search
  • Get a Demo
  • Start for Free
Portal LoginSupportContact
Search
Close search
Get a Demo
Start for Free
HomeBlog
Unmasking the Central Villain: Inside Adversary-in-the-Middle Attacks
Published:
October 15, 2024

Unmasking the Central Villain: Inside Adversary-in-the-Middle Attacks

By:
Matt Kiely
James O’Leary
Share icon
Glitch effectGlitch effectGlitch effect

In classic martial arts movies, there’s always that one scene where the hero singlehandedly takes on a gang of oversized, overconfident goons. One by one, they come at him, and one by one, they hit the ground. Then, as all the bad guys are writhing in pain, a final challenger appears on screen—he’s small, quiet, and unassuming. Our hero smirks, preparing for another easy fight. And that’s when the real battle begins. But, as you might’ve guessed, that little guy has the deadliest skills—he’s fast, ferocious, and unforgiving. By the time our hero realizes he needs a new strategy, it’s too late. That little guy you never saw coming was in full control the entire time. 

Adversary-in-the-Middle (AiTM) is that guy. While more infamous cyberattacks—think ransomware or phishing—are the big thugs we’re all fixated on, AiTM lurks just off camera, silently intercepting your data, redirecting traffic, and hijacking sessions without drawing much attention. It’s often underestimated, but when it finally strikes, the damage can be brutal.

What Is an AiTM Attack? 

In an AiTM attack, an adversary sneaks in between you and whatever you’re trying to connect with—be it a website, an app, or a service. They intercept the information flowing back and forth, all while staying completely under the radar.

For instance, a common AiTM attack involves hijacking session tokens, those temporary identifiers that keep you logged into a site after you’ve entered your username and password. Once a threat actor steals your token, they’re no longer just monitoring you—they’ve become you. In other words, they’ve gained complete control over your session. And all the login credentials, financial transactions, and sensitive data that come with it.

Adversary-in-the-Middle attack
Figure 1: Simple depiction of an AiTM attack

How Do AiTM Attacks Work?

Modern websites want to be easy to use. If they’re annoying to use, that’s bad for business. And bad for business means bad for the bottom line. But modern websites also need to authenticate their users and prevent unauthorized access. ”Easy to use” and “highly secure” are often diametrically opposed.

To meet both goals, websites use an authentication system based on sessions. You log in once with your username, password, and multi-factor authentication (MFA) code. In return, the site authenticates you and provides you with a token to store in your browser. This token is used in lieu of your username, password, and MFA code. For a time period after the first authentication, the token will allow you to access resources without inputting your credentials over and over.

(Psst! We did a Tradecraft Tuesday episode exploring how identity attacks work. Check it out.)

Huntress Tradecraft Tuesday on AitM
Figure 2: Screenshot taken from Tradecraft Tuesday. See the author speak more about AiTM here 

The Risk of Token Theft

Here’s the problem: if that token falls into the wrong hands, it allows the user who found or stole it to authenticate themselves as the original user. A token is a whole set of credentials wrapped up into one package. So, while tokens are generated after multiple factors are used, the token itself is single-factor authentication.

Exploitation of this system is simple. Steal that token, and you become that user—no username, password, or MFA required.

Active vs. Passive Token Theft

Token theft tactics can be classified into two types: active and passive. Active token theft occurs when a hacker directly interacts with a victim to steal their token. In contrast, passive token theft involves obtaining tokens by scouring data breaches, credential dumps, or shady forums. Internally at Huntress, we refer to these methods as "pickpocketing" for active theft and "dumpster diving" for passive theft.

Active token theft includes AiTM attacks, where an attacker deceives a victim into authenticating through a transparent proxy that relays the authentication process to the legitimate Microsoft 365 service. Evilginx is the best-known AiTM toolkit, but many Phishing-as-a-Service (PhaaS) platforms, such as NakedPages and Evilproxy, carry out similar attacks daily against small and medium-sized businesses (SMBs).

Why are AiTM Attacks Dangerous?

Let’s do a little experiment. Take a look at Figures 3 and 4. The two images are screenshots of Microsoft 365 login pages. Can you tell which is an AiTM page and which is legitimate?

Figure 3: Screenshot of Microsoft 365 login page

Figure 4: Another Microsoft 365 login page that looks nearly identical to Figure 3

Sorry, it's a trick question: there isn’t enough information to tell because you can’t see the URL in either of those screenshots. 

AiTM pages are generally indistinguishable from the legitimate website’s login page. This is because an AiTM site isn’t a clone or copy of the actual login page. When a victim clicks on a link and lands on an AiTM site page, they’re brought to an attacker-controlled proxy. The proxy brokers the login transaction between the victim and the legitimate login page. When the victim completes the authentication, the attacker can see their username, password, and session token in plain text. This means that the victim is seeing the real login page of the service, but their entire interaction is proxied through attacker-controlled infrastructure.

Terminal output of a successful Evilginx attack
Figure 5: The terminal output of a successful Evilginx attack.

Defend Against AiTM Attacks

AiTM attacks aren’t universally effective against all types of MFA. There is such a thing as phishing-resistant MFA, which will prevent token reuse by binding a session to a physical device. However, the adoption rate for phishing-resistant MFA is low, especially in the SMB. 

Awareness is critical for all other identities that use non-phishing-resistant MFA. Be politely suspicious of links, and if you think you’ve fallen victim to a token theft attack, inform someone who can invalidate your session and rotate your credentials immediately.

Security Awareness Training: A Crucial Key to Preventing AiTM Attacks  

AiTM attacks are prevalent, but fear not because they’re also preventable. One of the best ways to protect yourself from AiTM attacks is through a layered security approach. Having protection tools like endpoint detection and response (EDR) and identity threat detection and response (ITDR) are incredibly helpful in catching these attacks after a threat actor has snuck in. But why let them get that far in the first place? You can also mitigate your risk before they gain initial access with a robust security awareness training (SAT) program.

Since the Huntress Security Operations Center (SOC) has seen so many AiTM attacks, it’s clearly an important topic. That’s why we’re making sure our partners and customers can train their end users to identify and prevent AiTM from happening in the first place. With that said, we’re happy to share the release of our newest Huntress Managed SAT episode: Adversary in the Middle.

In this episode, Bot-Head is scheming to attend Curriculaville Comic-Con with an epic Mech suit. But there’s one big problem—her wages from Major’s Fried Chicken just aren’t enough to cover that pricey costume. So, she plans an AiTM attack on Cannoli Bros. Construction to score stolen credentials and solicit money from their customers.

By following Bot-Head’s scheme, you and your learners will get to know more about AiTM tactics, how to spot them, and, most importantly, what to do when a real attack comes knocking.

Stay Ahead of the Sneaky Stuff

The most dangerous threats aren’t the loudest or biggest. They’re the ones you didn’t even see coming. AiTM may not have the reputation of more notorious threats like ransomware or phishing, but their stealth is what makes them so scary. Adversaries quietly slide between you and another party, leaving you vulnerable before you even know something’s gone wrong.

But you don’t have to be vulnerable. Huntress has your back. We’re all about helping you stay one step ahead, and that means giving you the tools, knowledge, and insights to spot and stop these sneaky attacks before they get too close. We want this to be about more than just defense. It’s about helping you take the power back from the craftiest threat actors.   

Categories
Cybersecurity Education
Summarize this postClose Speech Bubble
ChatGPTClaudePerplexityGoogle AI

See Huntress in action

Our platform combines a suite of powerful managed detection and response tools for endpoints and Microsoft 365 identities, science-backed security awareness training, and the expertise of our 24/7 Security Operations Center (SOC).

Book a Demo
Share
Facebook iconTwitter X iconLinkedin iconDownload icon
Glitch effect

You Might Also Like

  • To MFA or Not to MFA: How Multi-Factor Authentication Saves the SMB

    MFA could be the thing that stops your payroll money from disappearing in a wire transaction. So why do we treat it as an optional inconvenience?
  • Smuggler’s Gambit: Uncovering HTML Smuggling Adversary in the Middle Tradecraft

    Blowing the lid off of interesting adversary-in-the-middle tradecraft observed in the Huntress partner identities.
  • Evicting the Adversary

    This blog shows how to catch an adversary moving from machine to machine, how to terminate this movement and how to evict the adversary from your network.
  • Demystifying Multi-Factor Authentication for Businesses

    MFA for business isn’t a silver bullet. But it’s close! Learn the benefits, MFA methods, and how to make it work without the usual headaches.
  • Identities Are the New Perimeter: Endpoints Are Only the Beginning

    Threat actors are now exploiting both endpoints and identities in the latest cyberattacks. Learn about the rise of identity-based threats and why a combined EDR and ITDR approach is crucial for your cybersecurity.
  • What Is Single Sign-On?

    Learn what single sign-on (SSO) login is, how it’s used in role management and cybersecurity, and how to set it up at your organization.
  • Are Biometrics the Unsung Hero or the Ultimate Villain in Cybersecurity?

    Biometrics: the hero and villain of cybersecurity. Discover how this cutting-edge tech boosts security while posing serious risks. Is it a game-changer or a ticking time bomb? Let’s break it down.
  • Prevent Business Email Compromise Attacks

    Learn how to prevent business email compromise attacks and learn how to communicate this emerging cyber threat to your employees.

Sign Up for Huntress Updates

Get insider access to Huntress tradecraft, killer events, and the freshest blog updates.
Privacy • Terms
By submitting this form, you accept our Terms of Service & Privacy Policy
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Huntress Managed Security PlatformManaged EDRManaged EDR for macOSManaged EDR for LinuxManaged ITDRManaged SIEMManaged Security Awareness TrainingManaged ISPMManaged ESPMBook a Demo
PhishingComplianceBusiness Email CompromiseEducationFinanceHealthcareManufacturingState & Local Government
Managed Service ProvidersResellersIT & Security Teams24/7 SOCCase Studies
BlogResource CenterCybersecurity 101Upcoming EventsSupport Documentation
Our CompanyLeadershipNews & PressCareersContact Us
Huntress white logo

Protecting 215k+ customers like you with enterprise-grade protection.

Privacy PolicyCookie PolicyTerms of UseCookie Consent
Linkedin iconTwitter X iconYouTube iconInstagram icon
© 2025 Huntress All Rights Reserved.

Join the Hunt

Get insider access to Huntress tradecraft, killer events, and the freshest blog updates.

By submitting this form, you accept our Terms of Service & Privacy Policy