Account Takeover: One Attack Followed Through the Logs
Skip to content

Account Takeover Response

Account takeover is when an attacker gains control of a legitimate user account and acts with that user’s access. In a business tenant, one staff account opens mail, files, chat, and every application connected to single sign-on.

This guide follows a single takeover from the first sign-in to cleanup, record by record. It shows what an investigator sees in the logs, what each record means, and where the attack could have been stopped.

Why Business Accounts Are Targeted

A business account is worth far more than a personal one, because the identity behind it is trusted by the HR system, the finance system, and every other application the organization has connected. An attacker who signs in once inherits all of it.

Attackers use that access in a few recognizable ways.

Fraud

The attacker reads mail to find a payment in progress, then redirects it. This is the most common goal against finance, sales, and executive accounts, and the business email compromise guide follows it stage by stage.

Data theft

Customer lists, contracts, and personal records are downloaded for resale or extortion.

A foothold

The account’s VPN or cloud access becomes the first step of a wider intrusion, including ransomware.

A launch point

Phishing sent from a trusted address reaches the victim’s customers and suppliers, which compromises the next organization.

Resale

The working session is sold to someone who will do any of the above. A quiet first sign-in followed days later by activity from a different network usually means the account was sold.

No role is exempt. Senior staff are targeted for authority, finance staff for payments, IT staff for privilege, and executive assistants because they hold delegated access to someone else’s mailbox. Junior staff are targeted because their account is a way to phish everyone else from inside.

How Accounts Are Taken Over

Every takeover begins with the attacker obtaining something the identity system accepts: a password, a session, an approval, or a new authentication method.

Phishing That Relays the Sign-In

The user signs in through a proxy page that passes everything to the real service and keeps the session cookie that comes back. The session hijacking guide walks through the relay step by step.

Reused and Guessed Passwords

Passwords leaked from other services are tried against the business account, or a handful of common passwords are tried against every account. Both succeed where an account has no second factor, and the password spraying and credential stuffing guide shows what each looks like in the logs.

Infostealer Malware

Malware on a computer the employee uses copies the passwords and sessions saved in the browser, and the attacker loads the session without ever seeing a prompt. The infostealer guide covers what is taken and how to respond.

Approval Under Pressure

With the password already in hand, the attacker triggers repeated multi-factor prompts until the user approves one. The MFA fatigue guide ranks the methods that resist it.

Help Desk Deception

The attacker phones the help desk as the user, claims a lost phone, and asks for a password reset or a new authenticator. Public information about the employee is often enough to pass basic checks.

Application Consent

The user is asked to approve an application that requests access to mail and files. Every screen is genuine. The application then reads the mailbox directly, with no sign-in by the attacker at all.

SIM Swapping

The attacker persuades a mobile carrier to move the user’s phone number to a new SIM card, and receives the codes sent by text message.

Each method leaves a different first record. The example that follows uses the relay route.

One Takeover, Record by Record

The account belongs to a sales manager at a mid-sized company using Microsoft 365. The sequence below is typical of takeovers that begin with a phishing link.

TimeWhat the record showsWhat it means
09:14An email from a known customer’s address arrives with a link to a shared proposal.The customer was compromised first. The message passes sender checks because it is genuine.
09:21The user clicks the link. A sign-in succeeds with multi-factor authentication, from a data center address in another country.The sign-in page was a relay. The user completed it, and the attacker’s server collected the session.
09:22The same session appears from a home broadband address in the user’s own city, with a different browser.The attacker moved to a proxy near the victim so location-based alerts stay quiet.
09:26Security information registered: a new authenticator app.Persistence. The attacker can now pass multi-factor authentication alone.
09:31A new inbox rule moves messages containing certain words to an unused folder.Concealment, before the user notices anything.
09:33 to 10:40Mail access across the inbox and sent items.Reading and searching for anything of value.
10:52340 files downloaded from the sales team site.Data theft. Price lists and customer contracts are useful for fraud and resale.
11:15The user’s account consents to a third-party application with offline access to mail.A second route in, independent of the password and the session.
13:05More than 600 messages sent to external contacts, each with a link.The account is now being used to compromise the user’s customers.
13:20Contacts reply asking whether the message is genuine.The first moment anyone notices. Four hours have passed.
13:40The help desk resets the password.The reset ends the sessions opened with the old password. The attacker’s authenticator, application grant, and inbox rule are still in place.
Next day, 08:10A self-service password reset is completed with the authenticator added at 09:26, followed by a sign-in from a hosting provider.The attacker sets a password of their own, and the takeover resumes.

The attacker secured their access within five minutes, and nothing in the first four hours was visible to the user. The response that felt complete, a password reset, left the authenticator in place, and that one method was enough to undo the reset.

Reading a Sign-In Record

Most of the story above comes from sign-in records. Each one answers several questions, and the answers together separate an attacker from an employee.

Where from

The record gives the address, the country, and the network provider. A hosting company or anonymizing service is unusual for a person at work, and a consumer broadband provider in the right city can still be a proxy.

Which device

A registered or managed device carries an identifier and a compliance state. A blank device field, for a user who always works from a company laptop, is a finding.

Which client

The record names the browser and operating system. A user on a Windows laptop does not suddenly sign in from a Linux browser or an automation library.

Which application

The record shows what was being opened. Attackers favor the web portal and mail, and sign-ins to administration or scripting interfaces by ordinary users deserve attention.

How authentication was satisfied

The authentication details show whether the user completed multi-factor authentication in this sign-in or the requirement was met by a claim already in the token. The second case, from a new location, points to a reused session.

What policy decided

The record lists which access policies applied and whether each passed, failed, or did not apply.

Which session

A session identifier links every sign-in that grew from one authentication. One session seen from two networks is the signature of a stolen session.

Microsoft writes the same session identifier into Exchange Online, SharePoint, and Teams audit records. A mail read, a download, or a new inbox rule can be matched to the exact sign-in behind it, which separates the attacker’s actions from the real user’s during the same hours.

Interactive records show a person signing in, and non-interactive records show applications renewing tokens in the background. An attacker’s continued access appears mostly in the non-interactive log, which many teams never review.

Telling Takeover From Normal Work

Unfamiliar sign-ins happen every day. People travel, change phones, and work from cafes. The surrounding pattern decides which ones matter.

PatternUsual explanationWhat to check
New country, same registered deviceThe user is traveling.Calendar, and whether the device is the user’s managed laptop or phone.
New network provider, same city and deviceHome, mobile, or guest network.Whether the provider is a consumer network.
Hosting or VPN provider, unregistered deviceOften an attacker, sometimes a personal VPN.Whether the user runs a VPN, and what the session did next.
Two countries within an hourA stolen session or password in use elsewhere.Which of the two the user recognizes.
Success after many failuresPassword guessing that found the password.Whether failures came from the same source, and whether MFA was completed.
MFA satisfied with no prompt to the userA session token reused from another device.Where and when the session was first created.

Asking the user settles most ambiguous cases. The question goes through a channel other than email, since the mailbox may be in the attacker’s hands, and it names the place and time of the sign-in. A user who cannot be reached on a privileged or finance account is a reason to contain first and ask afterward.

Building Detection That Works

Most organizations already receive alerts about unfamiliar sign-ins and ignore them, because there are too many and most are harmless.

Start With Sequences

A single unfamiliar sign-in is weak evidence. The same sign-in followed within an hour by a new authentication method is strong. Detection should be written around pairs and sequences:

  • An unfamiliar sign-in, then security information registered.
  • An unfamiliar sign-in, then an inbox rule or forwarding address created.
  • An unfamiliar sign-in, then an application consent.
  • One session identifier seen from two network providers.
  • A help desk password reset, then a sign-in from a new country.
  • A self-service password reset from a network the user has never used.

Know What Normal Looks Like

For each user, a baseline of the usual countries, network providers, devices, and working hours turns a vague alert into a specific one. A sales director who travels weekly needs a different baseline from a payroll officer who has signed in from one office for three years.

Rank by Who the Account Is

The same signal deserves a different response depending on the account. Administrators, finance staff, executives, and their assistants should sit in a higher tier, with a lower threshold for action and faster containment.

Decide the Response in Advance

For each detection, agree what happens: who is told, whether sessions are revoked automatically, and at what point the account is blocked. Revoking a session costs the user one fresh sign-in, which makes it a good candidate for automatic action on the strongest signals.

Keep the Background Sign-Ins

Non-interactive sign-ins and application sign-ins are separate log categories, and each has to be selected for export. Collected and kept beyond the default retention, they are the difference between seeing a takeover and reconstructing one weeks later.

The Same Evidence in Google Workspace

The investigation is the same in Google Workspace. The records have different names and live in the Admin console’s audit and investigation tool.

QuestionMicrosoft 365Google Workspace
Who signed in, from where?Entra ID sign-in logs.User log events.
Were authentication methods changed?Entra ID audit log.User log events and Admin log events.
What mail was accessed or sent?Microsoft 365 audit log and message trace.Gmail log events and email log search.
Which files were opened, downloaded, or shared?Microsoft 365 audit log.Drive log events.
Which applications were granted access?Entra ID audit log and enterprise applications.OAuth log events and the app access list.
What did an administrator change?Entra ID and Microsoft 365 audit logs.Admin log events.

Containment in the Right Order

Each containment step removes one thing the attacker holds, and the order decides whether a gap is left between steps.

1
Block sign-in first where the risk is highIf the attacker is active or the account is privileged, disable sign-in before anything else and keep it disabled until the review is done.
2
Reset the passwordThe new password goes to the user through a trusted channel, never to the mailbox. Resetting first means the attacker cannot sign in again with the password once sessions are revoked.
3
Revoke sessionsRevocation ends the refresh tokens and browser sessions already issued, including the one the attacker stole. Access tokens already issued can keep working for up to about an hour.
4
Remove what the attacker addedRecord each item, then delete it: unfamiliar authentication methods, inbox rules, forwarding, mailbox delegation, application grants, and registered devices. The record shows what the attacker was interested in.
5
Confirm in the sign-in logsCheck the next day that nothing from the attacker’s sources succeeds, and that no new method, rule, or grant has appeared.

The session hijacking guide sets out what each of these actions ends and what it leaves in place.

Working Out What Was Exposed

The exposure window runs from the attacker’s first sign-in to the moment the last foothold was removed. In the example, that is from 09:21 until the authenticator was deleted, a day or more after the password reset.

Within the window, separate what was touched, what was copied, and what was reachable.

What the attacker touched

Audit records list the messages opened, the files downloaded, and the items sent.

What the attacker copied wholesale

A mailbox or folder synchronized to a client counts as taken in full.

What the attacker could reach

Shared mailboxes, team sites, and applications behind single sign-on were open to the session. Where logs are thin, the assessment has to consider reach as well as recorded activity.

Then widen the search. Look for other accounts signed in from the same sources, colleagues who received the same phishing message, and recipients of anything the account sent. One takeover is usually part of a campaign.

Prevention Matched to the Attack

Each step in the example has a control that breaks it.

Step in the attackControl that breaks it
Relay phishing page collects the sessionPhishing-resistant authentication such as passkeys or security keys, which fail on a relay.
Session replayed from the attacker’s machineA policy requiring a managed, compliant device.
Sign-in from a hosting providerRisk-based policies that block or challenge unfamiliar and anonymous sources.
Attacker registers an authenticatorRequiring a compliant device or recent strong authentication to register security information, and an alert on every new method.
Inbox rule and forwardingExternal forwarding disabled, and alerts on rule creation.
Application consentUser consent restricted to approved or verified applications.
Mass downloadAlerts on unusual download volume per account.
Mass phishing from the accountOutbound sending limits and alerts.
Self-service reset with the attacker’s methodUnfamiliar methods removed at the time of the reset, and an alert on self-service resets from new networks.

The strongest pairing is phishing-resistant authentication with a device requirement, backed by monitoring that connects a risky sign-in to what happens in the hour after it. The MFA fatigue guide gives a rollout order for passkeys and security keys.

Questions Management Will Ask

After any takeover, the people responsible for the business want answers in plain terms.

How did they get in?

The answer names the method and says whether the same route is open for other staff.

How long did they have access?

The answer is the exposure window, with both ends dated.

What did they see or take?

The answer lists specific mail, files, and systems, with an honest statement of what could not be determined.

Did they send anything in our name?

The answer says to whom, and whether those recipients have been warned.

Is anyone else affected?

The answer covers the other accounts caught by the same campaign.

Do we have to tell anyone?

Regulators, customers, or individuals may need notice, depending on the data involved.

Could it happen again tomorrow?

The answer names the control that would have stopped it and the date that control will be in place.

A written answer to each, with the evidence behind it, is the record that insurers, auditors, and regulators later ask for.

Account Takeover Response With ThreatDefence

ThreatDefence triages a suspicious sign-in the way this guide reads one: the network it came from, the user agent, the authentication steps, and what the session went on to do. AI agents assemble that record for every identity alert, analysts confirm the verdict, and a confirmed takeover is contained under agreed authority.

For a takeover found late, our responders rebuild the timeline across Microsoft 365, Entra ID, and Google Workspace. They confirm that every foothold is gone, including authentication methods, mailbox rules, and application grants.

Response actions in the ThreatDefence portal: revoke sessions, reset password, isolate endpoint and block address, each with its operating mode, status and rollback

Experiencing a breach?

Our incident response team answers 24x7, with or without a retainer.

Talk to Our Experts

Ask about a free Microsoft 365 forensic review, covering six months of activity in your tenant.

    I'm an MSP, MSSP, or reseller

    By submitting this form, you accept the terms in our privacy policy.

    Frequently Asked Questions

    What is corporate account takeover?

    Corporate account takeover is the compromise of a business user or service account, where an attacker signs in as that identity and uses its access. In banking the same term has a narrower meaning: fraud against a company’s online banking account, usually ending in unauthorized wire or payroll transfers. Both start the same way, with credentials or a session taken from an employee.

    Does resetting the password remove the attacker?

    No. In Microsoft Entra ID an administrator’s reset ends the sessions that were opened with the old password, but it leaves authentication methods the attacker registered, application grants, inbox rules, and forwarding. With a method of their own on the account, an attacker can complete a self-service password reset and return. The reset has to be followed by session revocation and removal of everything that was added.

    Should a compromised account be disabled or reset?

    Disable sign-in first when the account is privileged or the attacker is still active, and keep it disabled until the review is finished. For a standard account with no live activity, a password reset followed by session revocation is the starting point. Disabling has one blind spot: mail still arrives at a disabled mailbox and its forwarding rules still run, so rules and forwarding are removed either way.

    Can we tell which files an attacker opened?

    For downloads and synchronization, yes. The Microsoft 365 audit log and Google Workspace Drive log events record downloads, sync activity, and sharing changes by account, time, and address. Files previewed in a browser leave thinner records. Where the session identifier is recorded, each file event can be matched to the attacker’s session. Data the account could reach that shows no events is reported as accessible, with the reason stated.

    How long are sign-in logs kept in Microsoft 365?

    Entra ID keeps sign-in logs for 30 days with paid licenses and 7 days on the free tier. The Microsoft 365 audit log, which holds mail, file, and inbox rule activity, keeps records for 180 days by default. Google Workspace keeps most audit and investigation log events for six months. Anything older exists only where logs were forwarded to a SIEM or an archive.

    Is an account takeover a notifiable data breach?

    It becomes one when personal information was accessed, or is likely to have been, and the law that applies treats that as notifiable. The assessment starts from what the account could reach and what the audit records show was opened or downloaded. In Australia, the Privacy Act expects an assessment of a suspected eligible data breach within 30 days. In the United States, each state has its own notification law. Involve legal counsel from the day the takeover is confirmed.

    What is the difference between account takeover and business email compromise?

    Account takeover is the compromise of the account itself, whatever the attacker does next. Business email compromise is a payment fraud that often uses a taken-over mailbox, though some cases rely only on a lookalike domain and never touch the victim’s tenant. A takeover can equally end in data theft, internal phishing, or a network intrusion with no payment fraud involved.

    How do attackers get past multi-factor authentication?

    The most common route is a phishing page that relays the sign-in and keeps the session issued after the second factor. Others are prompts sent repeatedly until one is approved, session cookies copied by malware, device code and consent requests on genuine Microsoft pages, a help desk talked into registering a new method, and SIM swaps against text message codes. Passkeys and security keys close the relay and prompt routes.