Trinitite
Techniques & procedures
24 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
3 techniques
Initial Access
The stolen material is encrypted and committed to public repositories using the victim's GitHub token. The malware can use recovered publishing access to modify and republish packages.
A new TeamPCP-like malware [is] hitting a popular npm package called @7nohe/openapi-react-query-codegen.
Attackers planted a self-spreading Shai-Hulud payload in releases of @7nohe/openapi-react-query-codegen, and the malware can use recovered publishing access to modify and republish packages.
Execution
4 techniques
Execution
The malicious releases can run while a developer installs dependencies or when npm processes a specially crafted build configuration file... Four later versions also added a preinstall hook.
The condition expression is a Python sandbox escape using the catch_warnings class... imports os, and calls os.system() to run the main payload with Node.
Four later versions also added a preinstall hook. The loader is heavily disguised and can download the Bun runtime if absent, decrypt the malware, and run it from a temporary location.
When npm install processes a package containing a binding.gyp, it invokes node-gyp... arbitrary Python expressions can be placed there and they will be executed during install, even without any preinstall script declared in package.json.
Persistence
5 techniques
Persistence
The stolen material is encrypted and committed to public repositories using the victim's GitHub token. The malware can use recovered publishing access to modify and republish packages.
macOS persistence ~/Library/LaunchAgents/com.user.systemd-detect-fash.plist, ~/Library/LaunchAgents/com.user.sysvinit-detect-fash.plist.
Researchers also found persistence components for Linux... ~/.config/systemd/user/systemd-detect-fash.service and ~/.config/systemd/user/sysvinit-detect-fash.service.
Any pull-request comment containing the exact release trigger could start a publishing job, which checked out the pull request and used GitHub Actions OpenID Connect (OIDC) to obtain a trusted publishing token.
macOS persistence ~/Library/LaunchAgents/com.user.systemd-detect-fash.plist [and] ~/Library/LaunchAgents/com.user.sysvinit-detect-fash.plist.
Privilege Escalation
5 techniques
Privilege Escalation
The stolen material is encrypted and committed to public repositories using the victim's GitHub token. The malware can use recovered publishing access to modify and republish packages.
macOS persistence ~/Library/LaunchAgents/com.user.systemd-detect-fash.plist, ~/Library/LaunchAgents/com.user.sysvinit-detect-fash.plist.
Researchers also found persistence components for Linux... ~/.config/systemd/user/systemd-detect-fash.service and ~/.config/systemd/user/sysvinit-detect-fash.service.
Any pull-request comment containing the exact release trigger could start a publishing job, which checked out the pull request and used GitHub Actions OpenID Connect (OIDC) to obtain a trusted publishing token.
macOS persistence ~/Library/LaunchAgents/com.user.systemd-detect-fash.plist [and] ~/Library/LaunchAgents/com.user.sysvinit-detect-fash.plist.
Stealth
4 techniques
Stealth
The loader is heavily disguised. It can download the Bun runtime if absent, decrypt the malware, run it from a temporary location, and remove that file afterward.
The loader... run[s] it from a temporary location, and remove[s] that file afterward... If it detects that a token has been revoked, it can trigger a destructive cleanup routine.
The stolen material is encrypted and committed to public repositories using the victim's GitHub token. The malware can use recovered publishing access to modify and republish packages.
Before doing anything, the payload checks several conditions and exits silently... CrowdStrike, SentinelOne, or CarbonBlack directories are present... known fake credential prefixes used by security scanners... [or] the StepSecurity harden-runner tool is active.
Credential Access
5 techniques
Credential Access
On GitHub Actions runners it also requests an OIDC token via ACTIONS_ID_TOKEN_REQUEST_TOKEN and ACTIONS_ID_TOKEN_REQUEST_URL.
Once active, Trinitite searches for credentials linked to GitHub, npm, PyPI, RubyGems, cloud services, HashiCorp Vault, and Kubernetes. It also targets CI secrets and data in AI development-tool locations.
Trinitite searches for credentials linked to GitHub, npm, PyPI, RubyGems, cloud services, HashiCorp Vault, and Kubernetes. It also targets CI secrets and data in AI development-tool locations.
All SSH private keys: ~/.ssh/id_rsa, ~/.ssh/id_ed25519, ~/.ssh/id_ecdsa, ~/.ssh/id_dsa, ~/.ssh/id*.
EC2 Instance Metadata Service at 169[.]254[.]169[.]254, trying IMDSv2 first... Azure IMDS managed identity endpoint... GCP metadata server at metadata[.]google[.]internal.
Discovery
2 techniques
Discovery
Before doing anything, the payload checks several conditions and exits silently... CrowdStrike, SentinelOne, or CarbonBlack directories are present... known fake credential prefixes used by security scanners... [or] the StepSecurity harden-runner tool is active.
The system locale is Russian (checks Intl.DateTimeFormat, LC_ALL, LC_MESSAGES, LANGUAGE, LANG).
Command and Control
1 technique
Command and Control
It can download the Bun runtime if absent, decrypt the malware, run it from a temporary location, and remove that file afterward.
Exfiltration
3 techniques
Exfiltration
The stolen material is encrypted and committed to public repositories using the victim's GitHub token.
The malware calls itself 'Trinitite: Sponsored by Preview 2 Effects,' which is the description it sets on GitHub repositories it creates to exfiltrate stolen data.
The stolen material is encrypted and committed to public repositories using the victim's GitHub token.
Observables
5 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
3 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.