Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
MalwareUsed by 2 actors

TruffleHog

TruffleHog is a legitimate open-source secret-scanning tool that threat actors repeatedly abused as part of npm software supply-chain malware campaigns, especially Shai-Hulud and Sha1-Hulud/Shai-Hulud 2.0. In the reported attacks, trojanized npm packages downloaded and executed TruffleHog during install-time malware execution to scan infected developer workstations and CI/CD environments for secrets, including GitHub tokens, npm tokens, AWS credentials, and other cloud or development-environment secrets. Reported execution patterns included commands such as "trufflehog filesystem / --json" and scans of the user home directory or entire filesystem; later variants also reused cached binaries from .truffler-cache directories. The harvested data was then exfiltrated to attacker-controlled infrastructure, including webhook.site endpoints and attacker-created GitHub repositories. The surrounding malware also used stolen credentials to access cloud-hosted repositories and storage, create malicious GitHub Actions workflows, republish additional trojanized npm packages, and self-propagate across maintainer accounts. Content also notes TruffleHog supports extraction of more than 800 credential types and was used by other actors, including Octo Tempest for plaintext key and secret discovery, and by a North Korean-linked npm RAT campaign as a downloaded module. High-confidence indicators directly mentioned include invocation of TruffleHog via child_process.exec("trufflehog filesystem / --json"), hidden execution of TruffleHog binaries from .truffler-cache, and malware artifacts or outputs associated with these campaigns such as truffleSecrets.json.

Share:
For your environment

Hunt this family in your stack

Mallory pivots from this family to the IOCs, detections, and named campaigns that touch your stack, and pages you when something new lands.

THREAT ACTORS

Groups observed using it

2 distinct threat actors attributed by public researchers. Open in Mallory to see the full evidence chain and overlapping campaigns.

View more details
TeamPCP

To maximize the yield, later variants executed hidden instances of the TruffleHog binary, harvested locally from .truffler-cache directories.

via osint team blogosintteam.blog
Contagious Interview

“...contained nine modules enabling keylogging, credential theft, browser and cryptocurrency exfiltration, TruffleHog secrets scanner downloads, and persistence.”

via scworldscworld.com
MITRE ATT&CK

Techniques & procedures

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

Reconnaissance

3 techniques
T1590Gather Victim Network InformationEvidence1

PentestMCP on port 8000 focuses on reconnaissance and crawling. Pentest-Recon on port 8001 expands this with secrets detection and historical URL mining using TruffleHog, GitLeaks, and the Wayback Machine.

T1593Search Open Websites/DomainsEvidence2

На практике разработчики часто оставляют эти ключи в открытом доступе: в публичных репозиториях GitHub, файлах .env, образах Docker, резервных копиях конфигураций или даже в общедоступных облачных хранилищах S3.

T1596.001DNS/Passive DNSEvidence1

yar is an OSINT tool for reconnaissance of repositories/users/organizations on Github. Yar clones repositories of users/organizations given to it and goes through the whole commit history in order of commit time, in search for secrets/tokens/passwords

Resource Development

1 technique
T1586Compromise AccountsEvidence1

Whenever yar finds a secret, it will print it out for you to further assess. Yar searches for secrets either by regex, entropy or both

Initial Access

3 techniques
T1078Valid AccountsEvidence3

During the 2025 Poland Wiper Attacks, the adversaries leveraged stolen credentials from on-premises environments to access cloud services.

T1078.004Cloud AccountsEvidence1

APT5 has accessed Microsoft M365 cloud environments using stolen credentials.

T1195.001Compromise Software Dependencies and Development ToolsEvidence1

A malicious update to @ctrl/tinycolor (2.2M weekly downloads) was detected on npm as part of a broader supply chain attack that impacted more than 40 packages spanning multiple maintainers.

Persistence

2 techniques
T1078Valid AccountsEvidence3

During the 2025 Poland Wiper Attacks, the adversaries leveraged stolen credentials from on-premises environments to access cloud services.

T1078.004Cloud AccountsEvidence1

APT5 has accessed Microsoft M365 cloud environments using stolen credentials.

Privilege Escalation

2 techniques
T1078Valid AccountsEvidence3

During the 2025 Poland Wiper Attacks, the adversaries leveraged stolen credentials from on-premises environments to access cloud services.

T1078.004Cloud AccountsEvidence1

APT5 has accessed Microsoft M365 cloud environments using stolen credentials.

Stealth

3 techniques
T1078Valid AccountsEvidence3

During the 2025 Poland Wiper Attacks, the adversaries leveraged stolen credentials from on-premises environments to access cloud services.

T1078.004Cloud AccountsEvidence1

APT5 has accessed Microsoft M365 cloud environments using stolen credentials.

T1140Deobfuscate/Decode Files or InformationEvidence1

схема работы всегда одинакова: декомпиляция, например в JADX, и поиск по регуляркам.

Credential Access

5 techniques
T1528Steal Application Access TokenEvidence5

The compromise likely began with a credential harvesting campaign, where a postinstall script led to the execution of a malicious bundle.js file... to harvest credentials stored as environment variables or secrets used by continuous integration and continuous delivery (CI/CD) platforms such as GitHub Actions, GitLab CI, Jenkins, and others.

T1552Unsecured CredentialsEvidence4

After you identify files that potentially contain credentials, you can go through them manually to find useful ones.

T1552.001Credentials In FilesEvidence5

This module spawns TruffleHog via child_process.exec('trufflehog filesystem / --json') to scan the entire filesystem. It parses the output for high-entropy matches, such as AWS keys found in ~/.aws/credentials.

T1552.004Private KeysEvidence1

CISA still hadn’t invalidated an RSA private key exposed in the Private-CISA repo that granted access to a GitHub app which is owned by the CISA enterprise account and installed on the CISA-IT GitHub organization with full access to all code repositories.

T1555Credentials from Password StoresEvidence6

Once a version of one of the malicious packages is installed, the included payload uses the TruffleHog secret scanning tool to identify secrets, in addition to harvesting environment variables and IMDS-exposed cloud keys when available.

Discovery

4 techniques
T1069Permission Groups DiscoveryEvidence1

The attacker then enumerated IAM users, roles, Lambda functions, DynamoDB tables, CloudFormation stacks, and scanned every S3 bucket's ACL and public access configuration.

T1083File and Directory DiscoveryEvidence2

Downloads and executes Trufflehog, a legitimate security tool, to scan the entire home directory for API keys, passwords, and other secrets hidden in configuration files, source code, or git history

T1518Software DiscoveryEvidence3

Before downloading anything, it checks its cache for an existing TruffleHog binary; if none is found, it fetches the latest release info from GitHub, downloads the correct binary for the system, extracts it, and makes it executable.

T1526Cloud Service DiscoveryEvidence3

TruffleHog has used stolen credentials to log into cloud services to access cloud hosted repositories and other cloud storage solutions to discover sensitive data to include API Keys, tokens and credentials.

Collection

3 techniques
T1005Data from Local SystemEvidence1

The content repeatedly describes threat actors and malware collecting, stealing, identifying, copying, or staging files, documents, credentials, logs, databases, and other information from compromised hosts or local systems.

T1119Automated CollectionEvidence3

The malicious JavaScript code ("bundle.js") injected into each of the trojanized package is designed to download and run TruffleHog, a legitimate secret scanning tool, using it to scan the host for tokens and cloud credentials, such as GITHUB_TOKEN, NPM_TOKEN, AWS_ACCESS_KEY_ID, and AWS_SECRET_ACCESS_KEY.

T1213Data from Information RepositoriesEvidence2

Shai-Hulud has leveraged compromised accounts to log into cloud services to access cloud hosted repositories.

Command and Control

1 technique
T1105Ingress Tool TransferEvidence3

The bundle.js script downloads and executes TruffleHog, a legitimate secret scanner... It profiles the platform, fetches a matching TruffleHog binary

INDICATORS OF COMPROMISE

IOCs tracked for this family

5 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Full values are available in Mallory.

View more in app
Network
5 tracked

IPs, domains, and DNS infrastructure linked to this family.

TypeValueLatest sighting
ip.v4●●●●●●●●●●●●View more in app3 months ago
ip.v4●●●●●●●●●●●●View more in app3 months ago
ip.v4●●●●●●●●●●●●View more in app3 months ago
ip.v4●●●●●●●●●●●●View more in app3 months ago
ip.v4●●●●●●●●●●●●View more in app3 months ago
What this page doesn’t show

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 matching5

Match every observed IP, domain, and hash against your live telemetry.

Threat actor attribution2

Named campaigns wielding this family, with evidence pinned to each claim.

Exploited vulnerabilities

CVEs this family uses for access and lateral movement.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

MITRE ATT&CK mapping21

Every documented technique, ranked by evidence weight.

Researcher chatter

Reddit, Mastodon, and CTI community discussion around this family.