Skip to main content
Mallory
Malware

Legion

Tracked since Dec 4, 2025 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
Vulns0Associated
Actors0Associated
ATT&CK5Techniques
IOCs2Tracked
Type
Infostealer
Capabilities
Credential theftReconnaissanceScanning
Platforms
Cloud

Legion is a cloud-focused infostealer and multipurpose cybercrime toolkit used to harvest service credentials and support account compromise and spam operations. It integrates with Shodan’s API to locate vulnerable SMTP servers and uses regular expressions to extract credentials for cloud providers and payment services, including Stripe and PayPal. Legion shares AndroxGh0st-derived credential-scraping code with other cloud attack toolsets. Updated versions expand its targeting to SSH servers and AWS credentials associated with DynamoDB and CloudWatch. Its focus is on cloud accounts, exposed server-side secrets, and email infrastructure rather than a specific industry.

Is this in your environment?See whether this family's indicators match your telemetry and which of your assets are exposed to the CVEs associated with it.
Check your exposure
MITRE ATT&CK

Techniques & procedures

5 distinct techniques documented for this family, organized by ATT&CK tactic.

Resource Development

1 technique
T1586.003Cloud AccountsEvidence1

FBot has three functions dedicated to AWS account attacks. The first is an AWS API Key Generator, handled by function aws_generator, which generates a random AWS access key ID by appending 16 randomly selected alphabetic characters to the standard AKIA prefix. Then, it generates a secret key from 40 randomly selected alphabetic characters.

Initial Access

2 techniques
T1078Valid AccountsEvidence1

If these features were fully implemented, the attacker could use them to perform the following when they have valid AWS account credentials: Check for all email accounts in an AWS SES environment. Check send quotas. Create a new account, assign administrative privileges, and delete the old account.

T1190Exploit Public-Facing ApplicationEvidence1

The Hidden Config Scanner feature takes a URL as input and crafts an HTTP GET request to several PHP, Laravel, and AWS-related URIs where configuration values may be stored, including: _profiler/phpinfo config.js .env config/aws.yml .env.bak info.php aws.yml phpinfo aws/credentials phpinfo.php

Persistence

1 technique
T1078Valid AccountsEvidence1

If these features were fully implemented, the attacker could use them to perform the following when they have valid AWS account credentials: Check for all email accounts in an AWS SES environment. Check send quotas. Create a new account, assign administrative privileges, and delete the old account.

Privilege Escalation

1 technique
T1078Valid AccountsEvidence1

If these features were fully implemented, the attacker could use them to perform the following when they have valid AWS account credentials: Check for all email accounts in an AWS SES environment. Check send quotas. Create a new account, assign administrative privileges, and delete the old account.

Stealth

1 technique
T1078Valid AccountsEvidence1

If these features were fully implemented, the attacker could use them to perform the following when they have valid AWS account credentials: Check for all email accounts in an AWS SES environment. Check send quotas. Create a new account, assign administrative privileges, and delete the old account.

Credential Access

1 technique
T1552Unsecured CredentialsEvidence1

The response is parsed for keys and secrets related to the following services and the result is written to a text file: AWS ... Office365 ... Sendgrid ... Twilio ... Mailgun | FBot is primarily designed for actors to hijack cloud, SaaS, and web services. There is a secondary focus on obtaining accounts to conduct spamming attacks. Actors can use the credential harvesting features to obtain initial access, which they can sell to other parties.

Discovery

1 technique
T1526Cloud Service DiscoveryEvidence1

Predator has features that can be used to attack many popular web services and technologies, including... Amazon Web Services (AWS) Simple Email Service (SES)... Twilio... Stripe... Telnyx... Predator’s web application attacks look for common weaknesses, misconfigurations or vulnerabilities...

Indicators of compromise

Observables

2 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.

View all in app →
Indicator values are available in Mallory. Pivot on every hash, domain, URL, and IP, or pipe them straight into your SIEM.View all in Mallory
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets match these IOCs, which detections are missing, which campaigns to expect next, and what to do in the next 30 minutes.
IOC matching2Match every observed IP, domain, and hash against your live telemetry.
Associated threat actorsGroups linked to this family, with evidence pinned to each claim.
Associated vulnerabilitiesCVEs linked to this family, with the reporting behind each link.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
MITRE ATT&CK mapping5Every documented technique, ranked by evidence weight.
Researcher chatterReddit, Mastodon, and CTI community discussion around this family.