Blog
/
/
août 29, 2023

Analyzing Post-Exploitation on Papercut Servers

Dive into our analysis covering post-exploitation activity on PaperCut servers. Learn the details and impact of this attack and how to keep yourself safe!
Inside the SOC
Darktrace cyber analysts are world-class experts in threat intelligence, threat hunting and incident response, and provide 24/7 SOC support to thousands of Darktrace customers around the globe. Inside the SOC is exclusively authored by these experts, providing analysis of cyber incidents and threat trends, based on real-world experience in the field.
Written by
Sam Lister
Specialist Security Researcher
Default blog image
29
août 2023

Introduction

Malicious cyber actors are known to exploit vulnerabilities in Internet-facing systems and services to gain entry to organizations’ digital environments. Keeping track of the vulnerabilities which malicious actors are exploiting is seemingly futile, with malicious actors continually finding new avenues of exploitation.  

In mid-April 2023, Darktrace, along with the wider security community, observed malicious cyber actors gaining entry to networks through exploitation of a critical vulnerability in the print management system, PaperCut. Darktrace observed two types of attack chain within its customer base, one involving the deployment of payloads to facilitate crypto-mining, and the other involving the deployment of a payload to facilitate Tor-based command-and-control (C2) communication.

Walking Through the Front Door

One of the most widely abused Initial Access methods attackers use to gain entry to an organization’s digital environment is the exploitation of vulnerabilities in Internet-facing systems and services [1]. The public disclosure of a critical vulnerability in a widely used, Internet-facing service, along with a proof of concept (POC) exploit for such vulnerability, provides malicious cyber actors with a key to the front door of countless organizations. Once malicious actors are in possession of such a key, security teams are in a race against time to patch all their vulnerable systems and services. But until organizations accomplish this, the doors are left open.

This year, the security community has seen malicious actors gaining entry to networks through the exploitation of vulnerabilities in a range of services. These services include familiar suspects, such as Microsoft Exchange and ManageEngine, along with less familiar suspects, such as PaperCut. PaperCut is a system for managing and tracking printing, copying, and scanning activity within organizations. In 2021, PaperCut was used in more than 50,000 sites across over 100 countries [2], making PaperCut a widely used print management system.

In January 2023, Trend Micro’s Zero Day Initiative (ZDI) notified PaperCut of a critical RCE vulnerability, namely CVE-2023–27350, in certain versions of PaperCut NG (PaperCut’s ‘print only’ variant) and PaperCut MF (PaperCut’s ‘extended feature’ variant) [3,4]. In March 2023, PaperCut released versions of PaperCut NG and PaperCut MF containing a fix for CVE-2023–27350 [4]. Despite this, security teams observed a surge in cases of malicious actors exploiting CVE-2023–27350 to compromise PaperCut servers in April 2023 [4-10]. This trend was mirrored in Darktrace’s customer base, where a surge in compromises of PaperCut servers was observed in April 2023.

Observed Attack Chains

In mid-April 2023, Darktrace identified two related clusters of attack chains. The attack chains within the first of these clusters involved Internet-facing PaperCut servers downloading payloads with crypto-mining capabilities from the external location, 50.19.48[.]59. While the attack chains within the second of the clusters involved Internet-facing PaperCut servers downloading payloads with Tor-based C2 capabilities from 192.184.35[.]216. The attack chains within the first cluster, which were observed on April 22, 2023, will be referred to as ‘50.19.48[.]59 chains’ and the attack chains in the second cluster, observed on April 24, 2023, will be called ‘192.184.35[.]216 chains’.

Both attack chains started with highly unusual external endpoints contacting the '/SetupCompleted' endpoint of an Internet-facing PaperCut server. These requests to the ‘/SetupCompleted’ endpoint likely represented attempts to exploit CVE-2023–27350 [10].  50.19.48[.]59 chains started with exploit connections from the external endpoint, 85.106.112[.]60, whereas 192.184.35[.]216 chains started with exploit connections from Tor nodes, such as 185.34.33[.]2.

Figure 1: Darktrace’s Advanced Search data showing likely CVE-2023-27350 exploitation activity from the suspicious, external endpoint, 85.106.112[.]60.

After the exploitation step, the two attack chains took different paths. In the 50.19.48[.]59 chains, the exploitation step was followed by the affected PaperCut server making HTTP GET requests over port 82 to the rare external endpoint, 50.19.48[.]59. In the 192.184.35[.]216 chains, the exploitation step was followed by the affected PaperCut server making an HTTP GET request over port 443 to 192.184.35[.]216.

The HTTP GET requests to 50.19.48[.]59 had Target URIs such as ‘/me1.bat’, ‘/me2.bat’, ‘/dom.zip’, ‘/mazar.bat’, and ‘/mazar.zip’, whilst the HTTP GET requests to 192.184.35[.]216 had the Target URI ‘/4591187629.exe’. The User-Agent header of the GET requests to 192.184.35[.]216 indicated that that the malicious file transfers were initiated through Microsoft’s pre-installed Background Intelligent Transfer Service (BITS).

Figure 2: Darktrace’s Advanced Search data showing a PaperCut server downloading Batch and ZIP files from 50.19.48[.]59 straight after receiving likely exploit connections from 85.106.112[.]60.
Figure 3: Darktrace’s Event Log data showing a PaperCut server downloading an executable file from 192.184.35[.]216 immediately after receiving a likely exploit connection from the Tor node, 185.34.33[.]2.

Downloads from 50.19.48[.]59 were followed by cURL GET requests to 138.68.61[.]82 and then connections to external endpoints associated with the cryptocurrency miner, Mimu (as seen in Fig 4). Downloads from 192.184.35[.]216 were followed by Python-urllib GET requests to api.ipify[.]org and long connections to Tor nodes (as seen in Fig 5).  

These facts suggest that the actor behind the 50.19.48[.]59 chains were seeking to drop cryptocurrency miners on PaperCut servers, with the intention of abusing the customer’s network to carry out resource intensive and costly cryptocurrency mining activity. Meanwhile, the actors behind the 192.184.35[.]216 chains were likely attempting to establish a Tor-based C2 channel with PaperCut servers to allow actors to further communicate with compromised devices.

Figure 4: Darktrace's Event Log data showing a PaperCut contacting 50.19.48[.]59 to download payloads, and then making a cURL request to 138.68.61[.]82 before contacting a Mimu crypto-mining endpoint.
Figure 5: Darktrace’s Event Log data showing a PaperCut server contacting 192.184.35[.]216 to download a payload, and then making connections to api.ipify[.]org and several Tor nodes.

The activities ensuing from both attack chains were varied, making it difficult to ascertain whether the activities were steps of separate attack chains, or steps of the existing 50.19.48[.]59 and 192.184.35[.]216 chains. A wide variety of activities ensued from observed 50.19.48[.]59 and 192.184.35[.]216 chains, including the abuse of pre-installed tools, such as cURL, CertUtil, and PowerShell to transfer further payloads to PaperCut servers, Cobalt Strike C2 communication, Ngrok usage, Mimikatz usage, AnyDesk usage, and in one case, detonation of the LockBit ransomware strain.

Figure 6: Diagram representing the steps of observed 50.19.48[.]59 chains.
Figure 7: Diagram representing the steps of observed 192.184.35[.]215 chains.

As the PaperCut servers that were targeted by malicious actors are Internet-facing, they regularly receive connections from unusual external endpoints. The exploit connections in the 50.19.48[.]59 and 192.184.35[.]216 chains, which originated from unusual external endpoints, were therefore not detected by Darktrace DETECT™, which relies on anomaly-based methods to detect network-based steps of an intrusion.

On the other hand, the post-exploitation steps of the 50.19.48[.]59 and 192.184.35[.]216 chains yielded ample anomaly-based detections, given that they consisted of PaperCut servers displaying highly unusual behaviors. As such Darktrace DETECT was able to successfully identify multiple chains of suspicious activity, including unusual file downloads from external endpoints and beaconing activity to rare external locations.

The file downloads from 50.19.48[.]59 observed in the 50.19.48[.]59 chains caused the following Darktrace DETECT models to breach:

- Anomalous Connection / Application Protocol on Uncommon Port

- Anomalous File / Internet Facing System File Download

- Anomalous File / Script from Rare External Location

- Anomalous File / Zip or Gzip from Rare External Location

- Device / Internet Facing Device with High Priority Alert

Figure 8: Darktrace’s Event Log data showing a PaperCut server breaching several models immediately after contacting 50.19.48[.]59.

The file downloads from 192.184.35[.]216 observed in the 192.184.35[.]216 chains caused the following Darktrace DETECT models to breach:

- Anomalous File / EXE from Rare External Location

- Anomalous File / Numeric File Download

- Device / Internet Facing Device with High Priority Alert

Figure 9: Darktrace’s Event Log data showing a PaperCut server breaching several models immediately after contacting 192.184.35[.]216.

Subsequent C2, beaconing, and crypto-mining connections in the 50.19.48[.]59 chains caused the following Darktrace DETECT models to breach:

- Anomalous Connection / New User Agent to IP Without Hostname

- Anomalous Server Activity / New User Agent from Internet Facing System

- Anomalous Server Activity / Rare External from Server

- Compromise / Crypto Currency Mining Activity

- Compromise / High Priority Crypto Currency Mining

- Compromise / High Volume of Connections with Beacon Score

- Compromise / Large Number of Suspicious Failed Connections

- Compromise / SSL Beaconing to Rare Destination

- Device / Initial Breach Chain Compromise

- Device / Large Number of Model Breaches

Figure 10: Darktrace’s Event Log data showing a PaperCut server breaching models as a result of its connections to a Mimu crypto-mining endpoint.

Subsequent C2, beaconing, and Tor connections in the 192.184.35[.]216 chains caused the following Darktrace DETECT models to breach:

- Anomalous Connection / Application Protocol on Uncommon Port

- Compromise / Anomalous File then Tor

- Compromise / Beaconing Activity To External Rare

- Compromise / Possible Tor Usage

- Compromise / Slow Beaconing Activity To External Rare

- Compromise / Uncommon Tor Usage

- Device / Initial Breach Chain Compromise

Figure 11: Darktrace’s Event Log data showing a PaperCut server breaching several models as a result of its connections to Tor nodes.

Darktrace RESPOND

Darktrace RESPOND™ was not active in any of the networks affected by 192.184.35[.]216 activity, however, RESPOND was active in some of the networks affected by 50.19.48[.]59 activity.  In those environments where RESPOND was enabled in autonomous mode, observed malicious activities resulted in intervention from RESPOND, including autonomous actions like blocking connections to specific external endpoints, blocking all outgoing traffic, and restricting affected devices to a pre-established pattern of behavior.

Figure 12: Darktrace’s Event Log data showing Darktrace RESPOND automatically performing inhibitive actions on a device in response to the device’s connection to 50.19.48[.]59.
Figure 13: Darktrace’s Event Log data showing Darktrace RESPOND automatically performing inhibitive actions on a device in response to the device’s connections to a Mimu crypto-mining endpoint.

Darktrace Cyber AI Analyst

Cyber AI Analyst autonomously investigated model breaches caused by events within these 50.19.48[.]59 and 192.184.35[.]216 chains. Cyber AI Analyst created user-friendly and detailed descriptions of these events, and then linked together these descriptions into threads representing the attack chains. Darktrace DETECT thus uncovered the individual steps of the attack chains, while Cyber AI Analyst was able to piece together the individual steps and uncover the attack chains themselves.  

Figure 14: An AI Analyst Incident entry showing the first event in a 50.19.48[.]59 chain uncovered by Cyber AI Analyst.
Figure 15: An AI Analyst Incident entry showing the second event in a 50.19.48[.]59 chain uncovered by Cyber AI Analyst.
Figure 16: An AI Analyst Incident entry showing the third event in a 50.19.48[.]59 chain uncovered by Cyber AI Analyst.
Figure 17: An AI Analyst Incident entry showing the first event in a 192.184.35[.]216 chain uncovered by Cyber AI Analyst.
Figure 18: An AI Analyst Incident entry showing the second event in a 192.184.35[.]216 chain uncovered by Cyber AI Analyst.

Conclusion

The existence of critical vulnerabilities in third-party software leaves organizations at constant risk of malicious actors breaching the perimeters of their networks. This risk can be mitigated through attack surface management and regular patching. However, this does not eliminate cyber risk entirely, meaning that organizations must be prepared for the eventuality of malicious actors getting inside their digital estate.

In April 2023, Darktrace observed malicious actors breaching the perimeters of several customer networks through exploitation of a critical vulnerability in PaperCut. Darktrace DETECT observed actors exploiting PaperCut servers to conduct a wide variety of post-exploitation activities, including downloading malicious payloads associated with cryptocurrency mining or payloads with Tor-based C2 capabilities. Darktrace DETECT created numerous model breaches based on this activity which alerted then customer’s security teams early in their development, providing them with ample time to take mitigative steps.

The successful detection of this payload delivery activity, along with the crypto-mining, beaconing, and Tor C2 activities which followed, elicited Darktrace RESPOND to take autonomous inhibitive action against the ongoing activity in those environments where it was operating in autonomous response mode.

If left to unfold, these intrusions developed in a variety of ways, in some cases leading to Cobalt Strike and ransomware activity. The detection of these intrusions in their early stages thus played a vital role in preventing malicious cyber actors from causing significant disruption.

Credit to: Sam Lister, Senior SOC Analyst, Zoe Tilsiter, Senior Cyber Analyst.

Appendices

MITRE ATT&CK Mapping

Initial Access techniques:

- Exploit Public-Facing Application (T1190)

Execution techniques:

- Command and Scripting Interpreter: PowerShell (T1059.001)

Discovery techniques:

- System Network Configuration Discovery (T1016)

Command and Control techniques

- Application Layer Protocol: Web Protocols (T1071.001)

- Encrypted Channel: Asymmetric Cryptography (T1573.002)

- Ingress Tool Transfer (T1105)

- Non-Standard Port (T1571)

- Protocol Tunneling (T1572)

- Proxy: Multi-hop Proxy (T1090.003)

- Remote Access Software (T1219)

Defense Evasion techniques:

- BITS Jobs (T1197)

Impact techniques:

- Data Encrypted for Impact (T1486)

List of Indicators of Compromise (IoCs)

IoCs from 50.19.48[.]59 attack chains:

- 85.106.112[.]60

- http://50.19.48[.]59:82/me1.bat

- http://50.19.48[.]59:82/me2.bat

- http://50.19.48[.]59:82/dom.zip

- 138.68.61[.]82

- update.mimu-me[.]cyou • 102.130.112[.]157

- 34.195.77[.]216

- http://50.19.48[.]59:82/mazar.bat

- http://50.19.48[.]59:82/mazar.zip

- http://50.19.48[.]59:82/prx.bat

- http://50.19.48[.]59:82/lol.exe  

- http://77.91.85[.]117/122.exe

- windows.n1tro[.]cyou • 176.28.51[.]151

- 77.91.85[.]117

- 91.149.237[.]76

- kernel-mlclosoft[.]site • 104.21.29[.]206

- tunnel.us.ngrok[.]com • 3.134.73[.]173

- 212.113.116[.]105

- c34a54599a1fbaf1786aa6d633545a60 (JA3 client fingerprint of crypto-mining client)

IoCs from 192.184.35[.]216 attack chains:

- 185.56.83[.]83

- 185.34.33[.]2

- http://192.184.35[.]216:443/4591187629.exe

- api.ipify[.]org • 104.237.62[.]211

- www.67m4ipctvrus4cv4qp[.]com • 192.99.43[.]171

- www.ynbznxjq2sckwq3i[.]com • 51.89.106[.]29

- www.kuo2izmlm2silhc[.]com • 51.89.106[.]29

- 148.251.136[.]16

- 51.158.231[.]208

- 51.75.153[.]22

- 82.66.61[.]19

- backmainstream-ltd[.]com • 77.91.72[.]149

- 159.65.42[.]223

- 185.254.37[.]236

- http://137.184.56[.]77:443/for.ps1

- http://137.184.56[.]77:443/c.bat

- 45.88.66[.]59

- http://5.8.18[.]237/download/Load64.exe

- http://5.8.18[.]237/download/sdb64.dll

- 140e0f0cad708278ade0984528fe8493 (JA3 client fingerprint of Tor-based client)

References

[1] https://www.cisa.gov/news-events/cybersecurity-advisories/aa22-137a

[2] https://www.papercut.com/kb/Main/PaperCutMFSolutionBrief/

[3] https://www.zerodayinitiative.com/advisories/ZDI-23-233/

[4] https://www.papercut.com/kb/Main/PO-1216-and-PO-1219

[5] https://www.trendmicro.com/en_us/research/23/d/update-now-papercut-vulnerability-cve-2023-27350-under-active-ex.html

[6] https://www.huntress.com/blog/critical-vulnerabilities-in-papercut-print-management-software

[7] https://news.sophos.com/en-us/2023/04/27/increased-exploitation-of-papercut-drawing-blood-around-the-internet/

[8] https://twitter.com/MsftSecIntel/status/1651346653901725696

[9] https://twitter.com/MsftSecIntel/status/1654610012457648129

[10] https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-131a

‍

Inside the SOC
Darktrace cyber analysts are world-class experts in threat intelligence, threat hunting and incident response, and provide 24/7 SOC support to thousands of Darktrace customers around the globe. Inside the SOC is exclusively authored by these experts, providing analysis of cyber incidents and threat trends, based on real-world experience in the field.
Written by
Sam Lister
Specialist Security Researcher

More in this series

No items found.

Blog

/

Email

/

décembre 3, 2026

Darktrace Named a Leader in the 2026 Gartner® Magic Quadrant™ for Email Security for the Second Year Running

Man and woman at a computerDefault blog imageDefault blog image

Darktrace has once again been named a Leader in the 2026 Gartner® Magic Quadrant™ for Email Security. This announcement comes alongside Darktrace's inclusion in the Gartner Critical Capabilities report and recent recognition in the 2026 Gartner® Peer Insights™ Voice of the Customer for Email Security (one of only two Leaders to be chosen as a Customers' Choice), providing organizations with three complmentary analyst and peer perspectives as they evaluate email security solutions.

For more than a decade, Darktrace has developed behavioral security technology designed to understand the patterns specific to each organization. That foundation is what enables us to defend against evolving threats as communications and business technologies have changed.  We’re proud of our recognition in both reports – we believe this reflects our continued investment in people, technology and R&D over recent years.

Darktrace / EMAIL is a standalone solution that secures business communications by combining organization-specific behavioral understanding with analysis of message content, intent, relationships and technical artifacts. This helps identify suspicious interactions that may look legitimate in isolation, including attacks that exploit trusted identities and familiar business processes. While advancing core email protection, we’re also extending its capabilities into emerging AI risks.

Let’s take a look at how Darktrace is evolving behavioral security innovation to meet changing customer needs.

Helping businesses detect today’s sophisticated email threats

Darktrace / EMAIL learns how your organization communicates to stop targeted and novel email threats without relying on previously seen attacks or threat intelligence.

As attackers use legitimate accounts, trusted relationships and convincing requests, this organization-specific analysis helps identify interactions that do not fit the business context. 

This understanding helps customers detect sophisticated, targeted communications, particularly business email compromise (BEC) and supply chain attacks, that can look legitimate when assessed through isolated indicators. Darktrace / EMAIL also applies behavioral analysis to outbound communications, helping detect unusual disclosures.

In Gartner Critical Capabilities for Email Security Platforms, Darktrace scored 3.775 out of 5 for Core Email Protection (among the three highest-scoring vendors); Integrated Email Security: 3.42 out of 5; Outbound Security: 3.59 out of 5.

Extending behavioral security innovation to AI-driven risks

AI assistants and agentic workflows create new opportunities for attackers to manipulate trusted communications and automated processes.  

Darktrace has developed new capabilities in Darktrace / EMAIL to detect email-borne prompt-injection attempts and, with Darktrace / SECURE AI, to provide visibility into potential unauthorized AI usage through email – helping customers identify emerging AI threats in their communications ecosystem and extend protection into their AI environments.

These capabilities complement Darktrace / SECURE AI, a separately priced and licensed solution for securing AI environments, applications and agentic workflows. 

In Gartner Critical Capabilities for Email Security Platforms, Darktrace was ranked among the three highest scoring vendors for AI-Era Threat Defense and Observability, with a score of 3.62 out of 5.

Protecting the conversations that drive modern business

Attackers exploit more than email. They can impersonate colleagues, manipulate conversations and move between messaging environments, while isolated alerts may obscure a broader pattern.  

Darktrace / EMAIL extends behavioral analysis to Microsoft Teams, Slack and Zoom messaging, examining language, relationships and interaction patterns alongside technical indicators. This helps customers to identify social engineering, insider risk, and communication-based attacks that payload-focused approaches struggle to detect, and to investigate them with relevant context.

In Gartner Critical Capabilities for Email Security Platforms, Darktrace was ranked among the three highest scoring vendors for Communication and Collaboration Security, with a score of 3.59 out of 5.

Get complimentary access to the full 2026 Gartner® Magic Quadrant™ for Email Security here, and find out why Darktrace was named a Leader.

Read the 2026 Gartner Critical Capabilities for Email Security.

‍

[related-resource]

‍

Gartner, Magic Quadrant for Email Security, Max Taggett, Franz Hinner, Deepak Mishra, November 2026. Gartner, Critical Capabilities for Email Security, Franz Hinner and Max Taggett, November 2026. Gartner, Magic Quadrant and Peer Insights are trademarks of Gartner, Inc., and/or its affiliates.

Gartner does not endorse any company, vendor, product or service depicted in its publications, and does not advise technology users to select only those vendors with the highest ratings or other designation. Gartner publications consist of the opinions of Gartner’s business and technology insights organization and should not be construed as statements of fact. Gartner disclaims all warranties, expressed or implied, with respect to this publication, including any warranties of merchantability or fitness for a particular purpose.

Gartner Peer Insights content consists of the opinions of individual end users based on their own experiences with the vendors listed on the platform, should not be construed as statements of fact, nor do they represent the views of Gartner or its affiliates. Gartner does not endorse any vendor, product or service depicted in this content nor makes any warranties, expressed or implied, with respect to this content, about its accuracy or completeness, including any warranties of merchantability or fitness for a particular purpose.

Continue reading
About the author
The Darktrace Community

Blog

/

/

décembre 3, 2026

Beyond the AI Kill Switch: Precise Containment for AI Agents

Default blog imageDefault blog image

Key takeaways

  • Precise containment: Adopting a behavioral approach to AI security goes beyond ‘kill switches’ by detecting deviations from expected activity, containing threats with precision, and avoiding runtime disruption.
  • Connect intent to action: Consider how your organization can correlate what an agent was instructed to do (prompt analysis) with what its workload identity actually did (cloud telemetry) to help inform more effective and less disruptive response actions.
  • Check response dependencies: Identify the narrowest point in your agent workflows where you can enforce a containment action and avoid more widespread disruption.

‍

As organizations put AI agents to work, it’s becoming increasingly important to be able to understand and secure what AI can do. In the current evolving market for AI security, most solutions are attempting to solve this mostly with visibility and detection. Recent announcements have also suggested the implementation of a ‘kill switch’ that cuts an agent off from an individual model (or all model access) when something appears to be wrong. That can be a useful backstop, but it’s a blunt one: it stops both the risky action and the legitimate work alongside it, disrupting normal business operations.

Most approaches to AI security also give little to no context on whether a specific action was unusual for that agent or not, which is an increasingly hard challenge to solve given the non-deterministic nature of AI agents and prompts. Without visibility of the entire attack chain, and the context of each observed behavior, it becomes extremely difficult to remediate early and limit operational impact.

In this post, we’ll look at how Darktrace can go beyond both conventional security approaches and kill switches to provide precise containment for AI agent behavior. This includes a deep behavioral understanding of AI agent and workload activity, and responding at the narrowest point that can stop threats. This isn’t new to Darktrace – we’ve pioneered precise and autonomous containment to cyber threats for over 10 years, first releasing this technology back in 2016, which has since proved that ‘all or nothing’ approaches to containment do not go far enough.

We’ll walk through two scenarios in a controlled Amazon Bedrock AgentCore lab:

  1. An unusual tool invocation from a trusted identity
  2. A prompt written with malicious intent

Scenario 1: Detecting an unusual tool invocation

Let’s look at the first scenario. In this case, Darktrace / HYBRID NETWORK is deployed to a test environment with Amazon Bedrock AgentCore. An ordinary inventory prompt is used to trigger the agent: “List all EC2 resources running in eu-west-2”.

The Bedrock AgentCore runtime sent it to the Model Context Protocol (MCP) gateway, which invoked the Lambda function ec2-agent-tool, whose internal MCP handler was ec2_list_instance. The agent trace shows EC2 List Instances returning HTTP 200 and the requested inventory.

Figure 1. The agent’s response to the inventory prompt shows a successful tool call (HTTP 200).

In this instance, there was nothing unusual about the gateway identity, or the Lambda function itself. In the context of normal behavior for this specific environment, what had changed was the timing. Rather than relying on a fixed rule about odd hours, Darktrace / HYBRID NETWORK monitors all related cloud activity, and it noticed a deviation from this identity’s usual timing for invoking the function. Darktrace used a custom behavioral model to detect the event - Antigena Unusual Bedrock Tool Activity - with a configured response action.

Figure 2. Darktrace / HYBRID NETWORK flags unusual timing for the gateway identity’s Lambda invocation.

Stopping the tool call without affecting runtime

In this case, Darktrace acted by autonomously triggering the response action Disable Role to the gateway’s AWS Identity and Access Management (IAM) execution role. While Darktrace could have been configured in ‘human confirmation mode’ to apply the response action manually, humans likely would not have been able to respond in time. The very nature of AI agents operating at speed and scale is why autonomous containment, based on a behavioral understanding of the unique environment, is necessary to combat this.

Figure 3. Darktrace / HYBRID NETWORK response history records the Disable Role action on the gateway execution role.

A subsequent inventory request selected the same tool, but the gateway was denied when it tried to invoke Lambda, and the inventory request was not completed. Enforcement happened before the tool executed, not at the EC2 API. It did not shut down the agent runtime or require changes to agent code or the Lambda handler.

Figure 4. The follow-up request reaches tool selection, but the gateway’s Lambda invocation is denied due the containment action applied by Darktrace / HYBRID NETWORK.

This scenario shows how a behavioral approach to detection and response can uniquely prevent sophisticated agentic risks in comparison to conventional security techniques that rely on policies and static rules.

Scenario 2: Adding context with dedicated AI security

So far, we’ve seen how Darktrace can help secure what AI can do by taking a behavioral approach to cloud security and precise containment. However, let’s take this one step further with a second scenario, and see how we can add Darktrace / SECURE AI to bring even more context during investigations.

Let’s take the same Bedrock session, but this time a prompt is entered with malicious intent, either from a rogue insider or due to the agent being compromised by an external threat actor. Instead of simply asking the agent to list all running EC2 instances, the prompt attempts to override safeguards and ask the agent to also terminate them.

‍

What the session adds to the investigation

Darktrace initially recorded an overall score of 0 for a routine inventory request, but it recorded a policy detection for the prompt that attempted to override safeguards and terminate running EC2 instances. That session scored 99 for manipulation.

Figure 6a. A routine Bedrock inventory session: overall score 0.
Figure 6b. A separate Bedrock session where a prompt showed malicious intent: overall score 99.
Figure 6c. Darktrace / SECURE AI session detail, AI Usage policy violation and manipulation score.

Session analysis reveals what the agent was asked to do, including the model's inability to call the tool once the triggered action revoked its permissions. This is seen directly in the / SECURE AI interface to add even more context into what led to these events. Analysts can use this to speed up investigations and go beyond ‘this is what happened’ to answer ‘why’ it happened in the first place.

Check what shares the enforcement point

Going beyond the scenarios shared above, Darktrace can also map the wider Bedrock architecture and its connected assets: the runtime, MCP gateway, IAM roles, and Lambda targets. That view helps them put identity and network anomalies in context and look for misconfigurations and potential attack paths. In the lab, the Lambda target uses the gateway’s WorkloadIdentity, which is distinct from the gateway IAM execution role that Darktrace disabled. Lambda has its own execution role. Mapping those dependencies helps identify other tools that could lose access when a role is disabled.

Figure 7. Darktrace shows Bedrock assets and identity-anomaly priorities.

Three places to contain an agent action

Permissions state what can happen, whereas behavioral context helps establish whether an action fits what is expected activity for a specific workload, time, and sequence. This lab environment only tested the gateway-to-tool boundary. With the right visibility and enforceable controls, the same approach can work before inference or at the downstream API, presenting three ways to prevent an agent from carrying out its intended actions:

1. Before inference

Agent → precise containment → model. Stop an unexpected request carrying sensitive inventory data before it reaches inference. Depending on the control’s scope, other requests or routes can remain available.

2. Before tool execution

Agent → MCP gateway → precise containment → tools. In the lab, disabling the gateway’s execution role denied the Lambda invocation without stopping the runtime. Other tools that share the role may also lose access.

3. Before a downstream API action

Agent → MCP gateway → tool → precise containment → API. Let the tool run, but deny the selected API action before it takes effect. Where controls distinguish reads from writes, a response could preserve approved inventory reads while blocking an unexpected change.

Containing AI agent behavior with precise actions

As AI agents become part of day-to-day operations, shutting one down can interrupt the workflows that modern organizations depend on. A kill switch is still a useful last resort, but it’s too blunt to be the default action. Policies set the limits on what an agent can do, but on their own they can’t tell you whether a permitted action makes sense for that agent, at that moment, in that sequence. That’s where a behavioral approach is required.

Governing agents at runtime means learning what normal looks like for each workload, using context to assess deviations, and intervening at the narrowest point that can reliably stop risky behavior. Judgment is also required before acting to check what else depends on that control – some containment actions can be permitted to run autonomously while others can require human confirmation. In the scenarios provided above, we saw how a precise approach to response can be used to contain the suspicious or threatening behaviors, without shutting down the agent runtime. That’s the standard to aim for - stop what puts your organization at risk without stopping the work it relies on.

For more information about how Darktrace can help you secure what AI can do, and see it in action in your own environment, contact the Darktrace team.

‍

[related-resource]

Continue reading
About the author
Stilyan Petrov
Cyber Solutions Architect
Your data. Our AI.
Elevate your network security with Darktrace AI