Response playbooks, investigation guides, and Atomic Red Team tests are Pro-only. Upgrade to unlock the full detection package for THREAT-CodeRepo-GistExfil.

Upgrade to Pro
THREAT-CodeRepo-GistExfil CrowdStrike LogScale · LogScale

Detect Data Exfiltration via GitHub Gists and Private Code Repositories in CrowdStrike LogScale

Adversaries and malicious insiders increasingly use code-hosting platforms (GitHub, GitLab, Bitbucket) as covert exfiltration channels because traffic to these domains is rarely blocked by web proxies and blends with routine developer activity. Two distinct abuse patterns are observed: (1) anonymous or throwaway-account Gist/paste creation used as a low-friction dead drop for small stolen artifacts (credentials, config files, session tokens) — documented in Turla dead-drop resolver infrastructure and multiple commodity loader families that stage stolen data via the GitHub Gist API before onward retrieval; and (2) bulk exfiltration via `git push` or GitHub API PUT/POST calls to a personal or attacker-controlled repository, seen in APT41 intrusions abusing developer tooling and in Lazarus Group operations staging stolen source code and credentials on GitHub/GitLab ahead of retrieval. The same channel is a leading insider-threat vector: departing employees push proprietary source code or customer data to a personal GitHub account under the cover of routine commits. Detection must distinguish these from the overwhelming volume of legitimate CI/CD and developer git traffic, so the strongest signals are (a) git remotes that do not match the organisation's registered GitHub/GitLab organisation, (b) anonymous Gist creation (no owning account, effectively unlisted/unattributable), and (c) API calls using PUT/POST verbs against content endpoints from processes other than the organisation's recognised CI/CD runners.

MITRE ATT&CK

Tactic
Exfiltration

LogScale Detection Query

CrowdStrike LogScale (LogScale)
cql
#event_simpleName=ProcessRollup2
| ImageFileName=/(?i)git(\.exe)?$/ AND CommandLine=/(?i)push/ AND CommandLine=/(?i)(github\.com|gitlab\.com|bitbucket\.org)/
  OR (ImageFileName=/(?i)(curl|powershell|pwsh|python)(\.exe)?$/ AND CommandLine=/(?i)api\.github\.com\/gists/)
  OR (ImageFileName=/(?i)(curl|powershell|pwsh|python)(\.exe)?$/
      AND CommandLine=/(?i)(api\.github\.com|api\.gitlab\.com|api\.bitbucket\.org)/
      AND CommandLine=/(?i)(\/contents\/|\/repos\/)/)
| Signal := case {
    CommandLine=/(?i)push/ => "GitPushNonCorpRemote";
    CommandLine=/(?i)gists/ => "AnonGistCreate";
    * => "ContentsApiUpload"
  }
| groupBy(
    [ComputerName, UserName, ImageFileName, Signal],
    function=[count(as=EventCount), collect(CommandLine, limit=10)]
  )
| sort(field=EventCount, order=desc)
high severity medium confidence

CrowdStrike LogScale (Falcon) detection query using ProcessRollup2 endpoint telemetry to identify exfiltration to code repositories. Matches git push to GitHub/GitLab/Bitbucket remotes, scripting-engine calls to the Gist API, and direct Contents/Repos API uploads. Aggregates by host, user, and signal type, surfacing up to 10 distinct command lines per group for analyst review.

Data Sources

CrowdStrike Falcon Endpoint ProtectionCrowdStrike LogScaleFalcon ProcessRollup2 Telemetry

Required Tables

ProcessRollup2

False Positives & Tuning

  • Open-source contribution pushes to external forks by authorised engineers — tag approved hosts/users with a Falcon group and exclude via a NOT filter before the groupBy
  • DevRel/security research Gist publishing accounts — exclude by UserName against an approved-accounts reference list

Other platforms for THREAT-CodeRepo-GistExfil


Testing Methodology

Validate this detection against 2 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Simulate Exfiltration via Anonymous GitHub Gist

    Expected signal: Sysmon Event ID 1: curl.exe process creation with command line referencing api.github.com/gists and a POST body.

  2. Test 2Simulate Exfiltration via Git Push to Non-Corporate Remote

    Expected signal: Process creation events for git with 'push' in the command line and a remote URL not matching the corporate org.

Unlock playbooks & atomic tests with Pro

Get the full detection package for THREAT-CodeRepo-GistExfil — response playbook and atomic red team tests, plus investigation guidance and hunting queries.

df00tech Pro — £29/user/month

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections