Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk6 min

How to Investigate and Recover From an AI Agent’s Unauthorized Cloud Actions

Learn how to preserve evidence, contain an AI agent’s credentials, trace its cloud API actions, check for persistence, and recover affected services.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If an AI agent has made cloud changes you did not approve, treat the event as both a cloud-identity incident and an agent-behavior incident. Preserve evidence, contain the credentials and runtime involved, trace the principal’s API activity across services and regions, check for persistence, then remove the unauthorized access path and recover from a known-good state.

1. Preserve the alert and the evidence

Before deleting resources, rotating credentials, or restoring data, record what triggered the response and preserve the records needed to understand what happened. Start with the agent or workload identity, associated service account or role, affected cloud account or project, approximate time window, and suspicious actions.

As an Amazon Associate I earn from qualifying purchases.

  • Save relevant audit, application, agent-runtime, and network records, including their time ranges and the systems they came from.
  • Record affected resource names, identifiers, configurations, and current state. Where practical, capture snapshots or other evidence before changing or removing a resource.
  • Keep a timeline of response actions, including who made each change and when. This helps distinguish the agent’s activity from containment and recovery work.

Google Cloud recommends backing up logs for affected resources for forensic analysis in its AI threat-finding response guidance. AWS likewise advises backing up resources that must remain available for investigation in its account-compromise guidance. Preserve evidence in a location and format that will not be overwritten by routine retention or cleanup.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. Contain the identity, credentials, and runtime

Identify which principal made the suspicious calls and which credentials or sessions it could use. Containment should stop further unauthorized actions without assuming that pausing the agent or disabling one account invalidates every credential it has already obtained.

#1 Best Overall
SecuX PUFido USB-C Security Key with PUF Technology, FIDO2/U2F Certified, Hardware-Rooted Unclonable Security for Passwordless Login and 2FA Authentication
  • A FIDO security key with PUF technology provides a unique, hardware-rooted trust anchor that resists tampering and cyber attacks, offering stronger security than conventional designs.
  • FIDO2 Certified Protection – Enjoy phishing-resistant security with FIDO2 certification, ensuring top-tier account safety across Windows, macOS, Linux, iOS iOS, Android and more.
  • Easy to use & Portable – Designed with a compact USB-C interface, Clife key fits easily on your keychain for secure access anywhere. Simply plug in and authenticate with ease.
  • Universal Compatibility – Works seamlessly with hundreds of FIDO2/U2F compliant services, including popular cloud, email, and social platforms.
  • Backup recommended – To ensure continuous access, register a backup Clife security key as a spare in case your primary key is lost.
  • Revoke, disable, or restrict the implicated credentials and principal using the provider’s current procedure. Check for both long-lived keys and short-lived tokens or sessions.
  • If feasible, stop or isolate the implicated agent runtime while you assess whether doing so will interrupt legitimate work.
  • Limit permissions for related identities when the evidence suggests they are part of the same access path.

Google’s guidance for compromised service accounts specifically calls for addressing both persistent key files and short-lived access tokens; revoking only one form may leave another usable. Follow the provider’s procedure for the identity type involved rather than assuming that a user suspension, agent shutdown, or key change has invalidated every credential: Google Cloud: Respond to compromised Google Cloud credentials.

Containment can disrupt legitimate workloads. Before deleting an identity or resource, determine whether services depend on it and, where time permits, prefer a reversible restriction while you establish scope.

3. Reconstruct what the agent did

Build the timeline from provider audit events tied to the relevant principal and session. Look beyond the first alert: trace actions before and after it, and expand the search across services and regions. An agent’s cloud activity is usually established through the identities and APIs it used; a conversation transcript alone does not show the full set of cloud-side effects.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
GoTrust Idem Key A USB Security Key NFC FIDO2 L2 Certified
  • Protect accounts with USB-A & NFC 2FA security key. Hardware-based authentication blocks phishing, credential theft & unauthorized access across cloud, enterprise & personal platforms.
  • FIDO2 Level 2 certified Security Key. TAA compliant and supports Apple ID, Microsoft Azure/Entra ID, AWS, Google, Facebook, Salesforce, DUO & more. Works with Chrome, Safari & Edge across major OS.
  • Plug & play USB-A Security Key with NFC tap login. No software, drivers or batteries required. Works with Windows PC, MacBook, iPhone, Android & Chromebook for fast, secure authentication.
  • Built with FIPS 140-2 Level 3 secure element for advanced encryption. Trusted by IT teams, healthcare, education & government for secure authentication and identity protection.
  • IP68 waterproof, dustproof & crush-resistant design. Supports FIDO2, U2F, OTP, PIV, Mini Driver & smart card login. Durable USB security key for long-term enterprise and daily use.
  • Search for resource reads as well as changes, creation, and deletion. Note the affected service, resource, action, timestamp, principal, and session where available.
  • Correlate audit-event times with network-flow and application logs. Use agent or model-invocation records when they were enabled and are available.
  • Check whether identity or access policy changed during the window. Those changes may explain how the agent gained access or how access persisted.
  • Keep confirmed events separate from hypotheses. External content the agent processed, such as documents or logs, may be worth investigating as a possible prompt-injection route, but its presence does not prove that it caused the activity.

AWS recommends searching CloudTrail across regions and services for activity associated with the implicated role session, then correlating event times with VPC Flow Logs and application records in its CloudTrail investigation guidance. If prompt-and-response logging was not enabled, that source cannot supply content that was never recorded; missing conversation data is not evidence that no cloud activity occurred.

4. Establish the scope and look for persistence

Use the principal and timeline as starting points, not as the boundary of the investigation. Determine which data and resources the identity could reach, what it actually accessed, and whether another identity or resource was created or altered to preserve access.

  • Look for unfamiliar agent instances, sessions, service accounts, agent identities, roles, policies, and access keys.
  • Review compute resources, applications, storage, snapshots, and other changes associated with the principal or time window.
  • Check whether logs are complete and trustworthy: consider whether logging was enabled for the relevant service and region, whether retention covers the period, and whether permissions or log settings changed.
  • Record what remains uncertain because telemetry was unavailable, disabled, or outside retention.

Google Cloud’s AI-agent finding guidance points investigators to audit records for service-account creation, IAM policy changes, and calls associated with the principal under review: Discovery: AI Agent Service Account Self-Investigation. Its broader AI threat guidance also recommends checking for unfamiliar Agent Runtime instances, sessions, service accounts, and agent identities: Respond to AI threat findings.

Rank #3
GoTrust Idem Key C USB Security Key NFC FIDO2 L2 Certified
  • Protect accounts with USB-C & NFC 2FA security key. Hardware-based authentication blocks phishing, credential theft & unauthorized access across cloud, enterprise & personal platforms.
  • FIDO2 Level 2 certified Security Key. Works with Apple ID, Microsoft Azure/Entra ID, AWS, Google, Facebook, Salesforce, DUO & more. Compatible with Chrome, Safari & Edge on all major OS.
  • Plug & play USB-C Security Key with NFC tap login. No software, drivers or batteries required. Works with Windows PC, MacBook, iPhone, Android & Chromebook for fast, secure authentication.
  • Built with FIPS 140-2 Level 3 secure element for advanced encryption. Trusted by IT teams, healthcare, education & government for secure authentication & identity protection.
  • IP68 waterproof, dustproof & crush-resistant design. Supports FIDO2, U2F, OTP, PIV, Mini Driver & smart card login. Durable USB security key for long-term enterprise & daily use.

5. Remove the unauthorized path and recover

Once you have enough evidence to understand the access path and its operational impact, remove unauthorized permissions, credentials, and resources. Fix the agent, application, or integration path that allowed the actions; deleting the visible resource alone will not prevent a repeat if the underlying access remains.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Remove or correct unauthorized policy grants, keys, identities, and resources identified during scoping.
  2. Constrain the agent’s permissions to the cloud actions and resources its task actually requires.
  3. Restore affected services or data from a known-good source, rather than from a state that may contain unauthorized changes.
  4. Validate that the restored service behaves as expected and that its required legitimate identities still work.
  5. Continue monitoring the relevant principals, services, and resources for renewed use or new changes.

Provider procedures differ, and removing credentials or resources can affect dependent workloads. Google’s compromised-credential guidance includes restoring service and reviewing resource access after credential response; AWS’s account-compromise guidance advises checking resources across regions. Use those provider-specific procedures for the affected environment rather than applying a single cross-cloud command sequence.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Where to look in each cloud environment

AWS

For generative-AI workloads, AWS names CloudTrail, CloudWatch, VPC Flow Logs, S3 data events, and Amazon Bedrock model-invocation logs (when the application uses Bedrock) as relevant investigation sources. The goal is to establish which resources were accessed, modified, created, or deleted: AWS methodology for incident response on generative AI workloads.

Rank #4
FEITIAN K39 USB Security Key - Two Factor Authenticator - USB-C with FIDO2 - Help Prevent Account Takeovers
  • FIDO2 + FIDO U2F certified and supported USB security key
  • Supports Computers, Laptops, Tablets, and Mobile Devices with a USB-C port
  • Works without downloading any drivers. Supported OS: Android, Chrome OS, Windows, MacOS, Linux
  • Durable design made to last for a long time with everyday use. Water-resistant (IP67)
  • Helps protect your accounts from phishing and other cyber-attacks. Prevents your devices from unauthorized use.

For account-compromise checks, AWS also recommends examining CloudTrail Event history for unsanctioned creation of access keys, policies, roles, or temporary credentials, checking resources across regions, and preserving resources needed for investigation: Resolve issues with unauthorized activity in AWS accounts.

Google Cloud

Use Cloud Logging and Security Command Center findings to investigate the relevant principal and resources. Confirm that the responders have the roles needed to view the audit and Data Access logs they need; incomplete access to logs can leave important activity out of view. Google’s response guidance covers service-account keys, unexpected resources such as VMs, applications, service accounts, and storage buckets, and post-containment access review: Respond to compromised Google Cloud credentials.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Google’s instruction for AI threat findings is: “Before you take any action, you should investigate the findings; assess the information that you gather; and decide how to respond.” See Respond to AI threat findings.

Best Value
Swissbit iShield Key 2 FIDO2 USB-C Security Key with NFC – FIDO Certified, Passwordless Authentication, Passkey & U2F, Phishing-Resistant Security for Enterprise
  • SECURITY KEY FOR ENTERPRISE ACCESS: Supports FIDO2 passkeys and U2F for secure authentication across enterprise IT systems.
  • PHISHING-RESISTANT AUTHENTICATION: Enables passwordless login with secure on-device credential storage and PIN-based user verification.
  • COMPATIBLE WITH ENTERPRISE SYSTEMS: Works with FIDO2, WebAuthn, and U2F across enterprise, cloud, and modern IT environments.
  • DRIVERLESS FIDO2 AUTHENTICATION: FIDO2 works natively with modern browsers and platforms. No drivers required.
  • USB AND NFC CONNECTIVITY: Supports authentication via USB-C and NFC. No batteries required.

Microsoft Entra agent identities

When the investigation involves an Entra agent identity, review risk-detection details, sign-in logs, and audit logs. Agent identity creation can appear in audit activity such as “Create user” or “Create service principal.” These records help investigate the identity; if Azure resources were changed, also consult the applicable resource logs. See Microsoft’s Manage agent identities in your organization.

Document what is known—and what is not

Close the response record with a timeline of confirmed actions, affected identities and resources, containment and recovery changes, and the validation performed. Mark hypotheses as hypotheses. State plainly which logs were unavailable, not enabled, or no longer retained, and which questions therefore remain unresolved. A gap in telemetry limits what can be concluded; it does not establish that the agent took no other action.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.