How to remove backdoor accounts created during a credential theft

A stolen password is often the beginning of an intrusion rather than the entire breach. After using the compromised credential, an attacker may register a second authentication method, change recovery details, approve an OAuth application or create a new account with privileged access. Changing the original password can therefore leave the attacker inside while appearing to resolve the incident.

Backdoor accounts are particularly difficult to detect because they may use plausible names and initially have limited permissions. The intruder can gradually assign roles, delegate mailbox access, generate API credentials and wait for the legitimate user or administrator to trigger malicious rules. Removing these artefacts requires a controlled identity review rather than a series of password resets.

This risk is relevant to Australian organisations with hybrid teams in Sydney, Melbourne, Brisbane and other growing business centres. Staff commonly check email and management systems from phones during commutes, while cafés, co-working spaces and home offices provide convenient access to corporate applications. Encrypted public Wi-Fi does not directly expose traffic, but fake portals, phishing messages and stolen credentials can exploit those everyday habits.

The local security market also shapes the response. Many Australian small and medium-sized businesses use Microsoft 365 or Google Workspace alongside managed service providers, which means one compromised identity can affect cloud applications, email rules, customer data and connected systems. A coordinated approach is essential when identity, endpoint, network and third-party evidence must be assessed together.

Recognise the hidden access

Start by comparing every identity with its expected configuration rather than only investigating the account whose password was stolen. Identity-provider audit logs can reveal newly registered MFA methods, unfamiliar devices, suspicious consent grants, role assignments, password changes and recovery-detail amendments. These signals often show the route used to establish persistence before any destructive action is taken.

Administrators should also search for accounts created during the relevant exposure window, including service and guest accounts that do not appear in routine staff directories. Naming conventions alone are unreliable: an attacker may name an account after a contractor, create a cloud-only identity, or modify an existing dormant account. Each identity should be checked against join dates, managers, device registrations, application activity and authorised access requests.

Look for combinations that indicate deliberate persistence, such as an account with no HR record but access to finance, a legitimate user gaining a new administrator role, or an OAuth grant assigned shortly after a suspicious sign-in. A single unusual event may have a benign explanation, while several small changes can reveal how the intruder intended to regain access.

Preserve evidence and cut off sessions

Capture the current state before removing anything. Export relevant sign-in and audit logs, MFA registrations, mailbox rules, application consents, role assignments, device enrolments and recovery settings. Record who made each change and preserve the original identifiers of suspicious accounts. Screenshots alone are inadequate when structured logs and configuration exports are available.

Containment can then proceed from a known-clean administrative device. Revoke active sessions, refresh tokens and remembered browser sessions for affected users, and temporarily restrict suspicious accounts where necessary. Blocking access before the investigation is complete may interrupt an active attack, but it should be coordinated with the incident lead so that evidence is not lost or an intruder is alerted to the response.

Do not begin by deleting the backdoor account or changing its password. The attacker may control its recovery address, enrolled device or delegated application and could use those actions to conceal activity. An organisation should first establish what the account can reach, which other identities depend on it and what data it may already have accessed.

Map persistence beyond the account

A backdoor can survive through several connected mechanisms. Resetting one password does not revoke an OAuth token, remove a forwarding rule, invalidate a personal access token or eliminate an application’s client secret. The review must cover the identity, its authentication factors, its delegated permissions and the resources attached to it.

The main persistence paths and their required responses are shown below. Administrators should adapt these checks to the identity provider and applications in use rather than assuming every platform exposes the same settings or audit history.

Persistence path Why a password reset may miss it Removal or verification step
MFA and recovery methods An attacker may retain a registered authenticator, recovery phone or alternate email Remove unknown enrolments, re-register approved factors and confirm recovery details
OAuth applications Consent can allow an application to act without the user’s password Revoke unauthorised grants, review scopes and remove unnecessary applications
Mailbox rules and delegates Rules can forward, redirect or automatically process messages Delete hostile rules, delegates and transport configurations, then test mail flow
Privileged roles A user or new identity may gain permissions through a group or role assignment Remove unauthorised role and group membership, then review the effective access
API keys and service credentials Tokens and secrets can operate independently of interactive sign-ins Revoke tokens, rotate affected secrets and certificates, and review usage records

Treat this map as a dependency graph. An application trusted by one suspicious identity may have access to another service, while a shared mailbox can connect several users and systems. The goal is to identify the shortest path back into the environment and invalidate it completely without disrupting legitimate business operations.

Remove access without destroying proof

Password recovery should occur from a clean device after sessions, recovery details and MFA factors have been reviewed. Use a unique password generated and stored through an approved password manager. Re-register MFA only from devices and channels known to belong to the affected person, and check for fraudulent passkeys, security keys, phone numbers and email addresses added without authorisation.

Next, revoke unauthorised OAuth consents, delegated mailbox permissions, application registrations, service-principal credentials and personal access tokens. Review privileged group memberships and role assignments against documented approval records. Any shared secret used by automation should be rotated if there is a possibility that an attacker saw, changed or reused it, including database passwords, SSH keys and certificate credentials.

Suspicious identities can then be disabled or removed according to the incident-response and legal strategy. Before deletion, preserve their identifiers, attributes, activity and relationships. Clean associated artefacts such as inbox rules, calendar entries, contacts, browser profiles, synced files and registered devices. Deleting the login alone does not delete copies of data, active tokens or persistence held by an authorised application.

Coordinate response and Australian obligations

A material credential breach often requires several parties to work from the same timeline. Internal security, IT, legal, privacy, communications, the managed service provider and external incident responders may all hold relevant information. Establish one incident lead, a shared evidence location and a log of containment actions so that duplicate changes do not remove evidence or restore access.

Australian notification duties must be assessed alongside containment. Where the Privacy Act 1988 applies, the Office of the Australian Information Commissioner may need notification of an eligible data breach if it is likely to cause substantial harm and the organisation cannot reasonably prevent or mitigate it. State and territory privacy legislation may also apply to organisations outside the federal scheme’s coverage. Insurers, regulators, law enforcement and affected customers may have separate reporting requirements.

The Australian Signals Directorate’s Essential Eight provides a useful control benchmark, particularly for MFA, patching, logging, backups and application control. The Australian Signals Directorate and Australian Cyber Security Centre also offer guidance on credential theft and coordinated incident response. Reporting through established channels can help a disrupted organisation access specialist support, but the response should remain focused on verified facts rather than speculative attribution.

Actions that make recovery durable

Recovery should be tested from a new session using only approved devices. Confirm that old sessions fail, unknown MFA methods are gone, mailbox rules no longer operate, delegated access has ended and privileged roles match approved entitlements. Review identity and application logs again for renewed sign-ins, newly created accounts or permission changes before declaring containment complete.

The following priorities are particularly important for Australian security teams:

The control that should remain in the reader’s memory is that removing a backdoor account is not the same as removing the backdoor. Password resets establish only one boundary; durable containment requires evidence preservation, coordinated revocation, removal of every persistence route and sustained verification of the identity environment.