Shai-Hulud Workflow File Creation or Modification
Description
Detects creation or deletion of malicious GitHub Actions workflow files associated with Shai-Hulud worm variants on Linux or Windows endpoints. This includes the original shai-hulud-workflow.yml, the 2.0 backdoor discussion.yaml (enables command injection via GitHub Discussions on self-hosted runners named SHA1HULUD), and the secrets exfiltration workflow formatter_*.yml pattern. These files are used to exfiltrate credentials and propagate across repositories.
Query · spl
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Filesystem where Filesystem.file_path IN ( "*/.github/workflows/discussion.yaml", "*/.github/workflows/discussion.yml", "*/.github/workflows/formatter_*.yaml", "*/.github/workflows/formatter_*.yml", "*/.github/workflows/shai-hulud-workflow.yaml", "*/.github/workflows/shai-hulud-workflow.yml", "*/.github/workflows/shai-hulud.yaml", "*/.github/workflows/shai-hulud.yml", "*\\.github\\workflows\\discussion.yaml", "*\\.github\\workflows\\discussion.yml", "*\\.github\\workflows\\formatter_*.yaml", "*\\.github\\workflows\\formatter_*.yml", "*\\.github\\workflows\\shai-hulud-workflow.yaml", "*\\.github\\workflows\\shai-hulud-workflow.yml", "*\\.github\\workflows\\shai-hulud.yaml", "*\\.github\\workflows\\shai-hulud.yml" ) by Filesystem.action Filesystem.dest Filesystem.file_access_time Filesystem.file_create_time Filesystem.file_hash Filesystem.file_modify_time Filesystem.file_name Filesystem.file_path Filesystem.file_acl Filesystem.file_size Filesystem.process_guid Filesystem.process_id Filesystem.user Filesystem.vendor_product | `drop_dm_object_name(Filesystem)` | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `shai_hulud_workflow_file_creation_or_modification_filter`
Implementation guide
The detection is based on data that originates from Endpoint Detection
and Response (EDR) agents. These agents are designed to provide security-related
telemetry from the endpoints where the agent is installed. To implement this search,
you must ingest logs that contain filesystem events, specifically file creation
and deletion events. These logs must be processed using the appropriate Splunk
Technology Add-ons that are specific to the EDR product. The logs must also be
mapped to the Filesystem node of the Endpoint data model. Use the Splunk Common
Information Model (CIM) to normalize the field names and speed up the data modeling
process.
Known false positives
- Very low. Legitimate usage of a file with this exact name is unlikely; validate with repository owners.
Analyst notes
Known false positives: Very low. Legitimate usage of a file with this exact name is unlikely; validate with repository owners.