Join our Newsletter — 33% off our NHI Course

What happens when an attacker uses AWS services to maintain access or evade logging?

Once an attacker gains a foothold, they may use Lambda or IAM changes to create persistence, expand privileges, or open paths back into the environment. They may also try to stop or delete CloudTrail and related logs to hide their activity. That makes response harder, so defenders need least privilege and protected audit trails.

How AWS Persistence and Log Evasion Works

Cloud attackers usually do not need exotic tools to stay hidden. They can abuse ordinary AWS control-plane capabilities, especially identity changes, compute automation, and logging configuration, to make access harder to remove and activity harder to reconstruct. That is why persistence in AWS is often about control of permissions and audit visibility, not just one compromised host.

Common persistence paths include creating or modifying IAM users, roles, policies, access keys, or Lambda functions so the attacker can return after the initial entry point is closed. In practice, the goal is to keep a working path into the environment even if one secret is rotated or one instance is rebuilt.

CloudTrail evasion is the other half of the problem. Attackers may try to stop logging, delete trails, alter event selectors, change delivery destinations, or tamper with related configuration so defenders lose continuity across the timeline. AWS logs are only useful if they are protected as a security control, not treated as a convenience feature.

Why Identity and Logging Controls Matter More Than the First Foothold

Once an attacker can change IAM state or invoke AWS automation, the incident stops being a simple host compromise and becomes a control-plane problem. That shift matters because the attacker can move from one-time access to repeatable access, widen privileges, and create fallback paths that survive ordinary remediation.

Logging protection is equally important because response depends on trustworthy evidence. If audit trails can be disabled or redirected, defenders may still contain the compromise, but they lose the ability to understand scope, dwell time, and secondary activity with confidence.

Least privilege, separation of duties, and protected logging therefore work together. The weaker the identity boundary, the easier it is for an intruder to turn a single credential into durable access or to blind the defenders while doing it.

Common AWS Abuse Patterns Defenders Should Expect

Persistence and log evasion are often built from a small set of repeatable actions rather than a custom exploit. These include adding a new access key, attaching a broader policy, creating a role that can be assumed later, changing Lambda code or triggers, or using an existing automation path to blend in with normal cloud administration.

Attackers also look for weak spots around audit and detection. If CloudTrail is not centralized, if log buckets are writable from too many principals, or if alerts are not watching for trail changes, the attacker can reduce visibility without immediately breaking the workload. In cloud incidents, the absence of alarms is often a warning sign, not proof of safety.

Related abuse patterns are well documented in practitioner threat research and public guidance, including The 52 NHI Breaches Report, MITRE ATT&CK Enterprise Matrix, and CISA cyber threat advisories.

Risk and Threat Considerations

A compromised AWS account can be more durable than a compromised server because the attacker may control both access and the evidence trail. That creates exposure not only to privilege escalation and lateral movement, but also to delayed detection when logs are altered, removed, or fragmented.

Failure mechanism: The attacker abuses trusted AWS management paths, such as IAM and logging configuration, to create persistence while reducing the defender’s ability to reconstruct actions from audit data.

Impact: Response becomes slower and less certain, containment takes longer, and the organisation may miss additional access paths, data access, or follow-on activity that occurred before logging was protected.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK addresses the attack surface, CIS Controls v8 and NIST SP 800-53 Rev 5 set the technical controls, and ISO/IEC 27001:2022 defines the regulatory obligations.

Framework Control / Reference Relevance
MITRE ATT&CK T1098 — Account Manipulation AWS IAM changes are a common persistence and privilege-abuse path.
T1562 — Impair Defenses Stopping or deleting CloudTrail is defense impairment that hides attacker activity.
T1078 — Valid Accounts Attackers often maintain access by reusing legitimate AWS credentials or sessions.
Recommendation — Monitor and alert on IAM role, policy, and access-key changes that create durable access. Harden and monitor logging controls so attackers cannot disable or redirect audit evidence. Revoke compromised credentials and hunt for reuse of valid cloud accounts.
CIS Controls v8 CIS-5 — Account Management The subject is about account misuse, persistence, and privileged cloud access.
CIS-6 — Access Control Management Least privilege is central to preventing IAM expansion and log tampering.
CIS-8 — Audit Log Management CloudTrail protection and log integrity are core to this question.
Recommendation — Restrict and review cloud accounts and keys to reduce durable attacker access. Limit who can change IAM and logging settings, and remove unnecessary privileges. Centralize and protect audit logs so attackers cannot easily erase their trail.
NIST SP 800-53 Rev 5 AC-2 — Account Management AWS persistence commonly uses new or modified accounts and keys.
AC-6 — Least Privilege Privilege expansion through IAM changes is a primary abuse path.
AU-9 — Protection of Audit Information The attacker goal includes hiding activity by degrading audit integrity.
Recommendation — Review and disable unauthorized accounts, roles, and access keys quickly. Apply least privilege to limit who can alter permissions or logging. Protect audit data from deletion, tampering, and unauthorized access.
ISO/IEC 27001:2022 A.5.15 — Access control AWS persistence relies on excessive or weakly governed access rights.
Recommendation — Limit cloud permissions to the minimum needed for each role.

Practitioner Guidance

What to verify: Treat any change to IAM, Lambda, CloudTrail, S3 log destinations, or KMS protection for logs as a high-value event. If the environment allows a principal that can both act and hide those actions, the control design is too permissive.

What good looks like: Audit trails are centrally collected, write-protected, and monitored from an account or control boundary the attacker cannot easily change. Persistence attempts should stand out as identity changes, automation changes, or logging changes rather than blending into normal administration.

Practitioner takeaway: In AWS incidents, the priority is not just removing the intruder, it is restoring trustworthy visibility first, because without protected logs you cannot confidently prove what else the attacker touched.