Back to blog
Threat Intel
Phishing Forensics

When AWS Sends the Phish: Triaging Shared Cloud IPs

Attackers love spinning up ephemeral cloud compute to send BEC payloads because the IP reputation starts clean. Here is how you burn their infrastructure down.

MailSleuth Research
Email Security Team
August 31, 20268 min read
A dark server room with a single glowing, malicious server blade standing out from the rest.

The security operations queue ticks up by one. The alert is for a reported phishing email targeting your finance department, and the payload is a classic vendor compromise lure urging a change in ACH payment details. You pull the raw headers to trace the transit path, expecting to see a known bulletproof host or an obscure foreign autonomous system. Instead, the originating IP belongs to AS16509. Amazon Web Services. You cannot simply blacklist the entire AWS compute space without breaking half the internet, and the attacker knows it.

Dealing with these ephemeral threats requires a fundamental shift in how we analyze sender reputation. The days of relying entirely on static blacklists are over. Effective aws ip phishing triage demands that analysts look past the primary authentication verbs and dig into secondary metadata. You have to synthesize geographic anomalies, host types, and neighboring network space to separate legitimate enterprise traffic from synthetic attacker infrastructure.

Why Threat Actors Love a Fresh Compute Instance

Attackers flock to public cloud providers for the exact same reasons legitimate businesses do. Infrastructure as code allows them to spin up, scale out, and tear down operations in minutes. When a threat actor wants to launch a highly targeted business email compromise campaign, they rarely bother compromising an existing, high-reputation mail server. The effort required to maintain persistence on a hacked Exchange server is high. Instead, they simply rent a virtual machine in AWS, Azure, or Google Cloud using a stolen credit card or a synthetic identity.

By provisioning a raw compute instance, the attacker immediately inherits the overarching reputation of the provider. Traditional spam filters and legacy reputation engines often assign a default level of trust to traffic originating from major tech giants. The attackers hide in this massive volume of legitimate enterprise traffic. They know your secure email gateway is configured to fail open when evaluating major cloud providers, because doing otherwise causes unacceptable business disruption.

Breaking Down the ASN Trust Fall

Blocking AS16509 for AWS or AS8075 for Microsoft is a career-limiting move for a security engineer. If you implement a hard block on these autonomous systems, you will inadvertently drop legitimate partner communications, automated API notifications, and daily operational reports. The attacker relies on this exact operational paralysis. They abuse the shared reputation model, operating out of a fresh IP address that has no historical association with malware or spam. To counter this, defenders must move beyond network-layer blocks and evaluate the specific context of the transmission.

Moving Past Basic Reputation Checks for Cloud Senders

The immediate instinct of a junior analyst triaging a suspicious email is to query a real-time blackhole list. They check Spamhaus, SURBL, or dynamic reputation engines, and the cloud IP invariably returns a clean verdict. This happens because cloud IPs rotate at incredible speed. An IP address that was serving a legitimate web application on Monday could be released back to the AWS allocation pool on Tuesday, only to be assigned to an attacker's EC2 instance on Wednesday. Blacklists rely on historical spam traps and user reports, creating a massive time lag that attackers explicitly exploit.

Because you cannot trust the IP reputation, you have to look at the raw headers. The pointer record in the Received line often betrays the underlying infrastructure. An unmanaged EC2 instance will typically retain its default reverse DNS name, resolving to the specific cloud region and availability zone. This raw data is your first pivot point for establishing context.

Received: from ec2-198-51-100-88.sa-east-1.compute.amazonaws.com (ec2-198-51-100-88.sa-east-1.compute.amazonaws.com [198.51.100.88]) by mx.target-org.com with ESMTPS id z9x8c7v6 for finance@target-org.com; Tue, 24 Oct 2023 09:14:22 -0400

Correlating Geographic Anomalies with Business Logic

The header excerpt above contains a massive structural anomaly if you know how to read it. If your organization is a regional logistics firm in Ohio, and you are receiving an urgent invoice from a vendor supposedly based in Chicago, the originating compute node should not be located in the sa-east-1 region in São Paulo, Brazil. Your business logic circuit breaker should trip immediately. The geographic origin of the unmanaged compute node directly contradicts the expected origin and identity of the sender. Attackers frequently provision infrastructure in cheaper, less monitored regions, ignoring the geographic context of their lures.

Mapping the CIDR Block for Noisy Neighbors

When a single IP looks suspicious but lacks definitive indicators of compromise, you must widen the aperture of your investigation. Attackers rarely purchase just one IP address. They often acquire blocks of contiguous space within a cloud provider to rotate through as their campaigns are slowly burned by defenders. You can take the suspicious IP, determine its surrounding /24 subnet, and plug that network range into external intelligence tools like Shodan or Censys.

You are actively hunting for noisy neighbors. If the IP in question is completely clean, query the rest of the adjacent block. Are there dozens of other recently registered, typo-squatted domains hosted on neighboring IPs? Do you see open directories exposing phishing kits, or SSH banners that match known bulletproof hosting configurations? Infrastructure clustering is a major tactical weakness for threat actors.

Even if the specific IP sending your mail has zero malicious history, a high concentration of malicious activity in the immediate neighborhood is a structural red flag. Attackers script their deployments using Terraform or Ansible, meaning their infrastructure naturally clusters together. Identifying this cluster allows you to block the entire micro-allocation rather than playing an endless game of whack-a-mole with individual IPs.

The Authentication Paradox of Attacker Infrastructure

The most confusing scenario for analysts is when the suspicious email passes all cryptographic authentication checks. The attacker registers a fresh lookalike domain, points the MX records to a cheap host, and sets up their EC2 instance to send outbound mail. Unlike legitimate forwarding scenarios that break SPF or aggressive mail transfer agent rewrites that cause DKIM body hash mismatches, the attacker's infrastructure is perfectly pristine.

They publish a strict SPF record in accordance with RFC 7208. They generate a private key, configure their mailer to sign outbound messages, and publish the corresponding public key as a TXT record, perfectly satisfying RFC 6376 for DKIM. Finally, they tie it together with a DMARC policy in accordance with RFC 7489. When this payload hits your environment, the Authentication-Results header glows green. The gateway sees a perfectly authenticated email.

This is the authentication paradox. Authentication mechanisms only prove that the sender controls the domain they are sending from. They do not prove that the domain itself is not fundamentally malicious. You have to separate technical authentication from business authorization. The email is mathematically verified, but a newly registered domain sending from a freshly provisioned, unmanaged AWS IP is not authorized to request wire transfers from your finance team. You combine the passing DMARC verdict with the domain age and the cloud hosting context to make the hard block decision. In these cases, you block the domain at the gateway, not the underlying cloud IP.

Evicting the Actor from the Cloud Provider

Triaging the threat and protecting your users is only half the job. You have an operational responsibility to burn down the attacker's infrastructure. You cannot rely on automated systems to do this for you. Cloud providers have dedicated trust and safety teams, but they process thousands of automated, malformed reports every single day. If you want AWS, Azure, or GCP to actually take action and suspend the tenant account, you have to provide actionable, indisputable forensic evidence.

Cloud providers utilize massive Carrier Grade NAT and dynamic IP assignments internally. Providing them with just an IP address is entirely useless. You must include the exact timestamp in UTC, the source IP, and crucially, the source port if it was captured in your network logs. You must also attach the full raw email headers or the original EML file.

Never forward the malicious email to an abuse address. Forwarding rewrites the transit headers and destroys the cryptographic signatures the provider needs to verify your claim. Always attach the raw forensic file.

When you provide exact timestamps and raw headers, cloud abuse teams can map that specific outbound traffic back to the internal billing account that generated it. This allows them to bypass the NAT layer, identify the synthetic identity or stolen credit card, and terminate the instance. Doing this consistently forces the attacker to rebuild their infrastructure from scratch, imposing real financial and temporal costs on their operation.

The takeaway

Investigating cloud-sourced threats forces security analysts to act like forensic detectives rather than binary algorithms. You cannot trust an IP simply because it belongs to a trillion-dollar tech company, nor can you blindly block it without risking massive operational collateral damage. You have to synthesize disparate data points across authentication protocols, geographic logic, and infrastructure neighborhoods to find the truth.

Master the art of dissecting these ephemeral environments. Read the headers, map the subnets, and report the abuse with surgical precision. When you need to scale this process across a massive alert queue, MailSleuth.AI automatically parses these complex headers, enriches the cloud ASN data, and flags geographic anomalies instantly, giving your security operations team the context they need to make the right call before the wire transfer leaves the building.

#aws#incident-response#email-forensics#bec#threat-hunting
MailSleuth Research
Email Security Team

We dissect phishing campaigns and email infrastructure so you don't have to.