Back to Intelligence

Hackers Compromise 4,837 GitHub Accounts in 'wfx-loot' Campaign to Steal Cloud Credentials — Detection and Remediation Guide

SA
Security Arsenal Team
November 13, 2026
6 min read

Introduction

A sophisticated supply chain attack has compromised 4,837 GitHub accounts in a campaign dubbed 'wfx-loot'. Threat actors leveraged these compromised accounts to probe 61,764 repositories, open malicious pull requests, and push secrets-stealing malware. This is not a theoretical threat — this is active, widespread exploitation targeting cloud credentials. Organizations using GitHub for source code management must treat this as a critical incident. The scale of this attack — nearly 5,000 accounts and over 60,000 repositories — indicates a well-resourced, persistent threat actor with clear objectives: cloud credential theft and lateral movement into cloud infrastructure.

Technical Analysis

The attack leverages compromised GitHub accounts to infiltrate repositories. Once access is gained, the attackers open pull requests containing malicious code designed to steal secrets. These secrets can include API keys, access tokens, cloud service credentials, and other sensitive authentication material. The attack chain is straightforward but highly effective:

  1. Account Compromise: Attackers gain access to legitimate GitHub accounts, likely through phishing, credential stuffing, or session hijacking.
  2. Repository Probing: Compromised accounts are used to scan and identify valuable repositories — 61,764 repositories were probed in this campaign.
  3. Malicious Pull Requests: Attackers submit pull requests containing malicious code. These PRs often appear legitimate, making them difficult to detect.
  4. Secrets Exfiltration: Once the malicious code is merged or executed, it steals secrets and exfiltrates them to attacker-controlled infrastructure.

No specific CVE is associated with this campaign; it relies on social engineering and credential compromise rather than a software vulnerability. The exploitation status is confirmed active in the wild, with 4,837 accounts already compromised.

Detection & Response

Sigma Rules

The following Sigma rules target key behaviors observed in this campaign: malicious pull requests, secrets-stealing code execution, and suspicious GitHub activity.

YAML
---
title: GitHub Malicious Pull Request - Secrets Stealing
description: Detects suspicious GitHub pull request activity associated with secrets-stealing malware.
references:
  - https://www.bleepingcomputer.com/news/security/hackers-compromise-4-800-github-accounts-to-steal-cloud-credentials/
author: Security Arsenal
date: 2026/04/06
logsource:
  product: github
  service: audit
detection:
  selection:
    action: 'pull_request.opened'
    pull_request.title|contains:
      - 'update'
      - 'fix'
      - 'security'
      - 'patch'
    pull_request.body|contains:
      - 'curl'
      - 'wget'
      - 'http://'
      - 'https://'
  condition: selection
falsepositives:
  - Legitimate pull requests with external links
level: high
---
title: GitHub Repository Probing - Mass Scanning
description: Detects mass scanning of GitHub repositories, indicative of the wfx-loot campaign.
references:
  - https://www.bleepingcomputer.com/news/security/hackers-compromise-4-800-github-accounts-to-steal-cloud-credentials/
author: Security Arsenal
date: 2026/04/06
logsource:
  product: github
  service: audit
detection:
  selection:
    action: 'repo.access'
    actor: '*'
  timeframe: 5m
  condition: selection | count() > 50
falsepositives:
  - Legitimate automated scanning
level: medium
---
title: GitHub Secrets Exfiltration - Suspicious Command Execution
description: Detects execution of commands commonly used to steal secrets in compromised repositories.
references:
  - https://www.bleepingcomputer.com/news/security/hackers-compromise-4-800-github-accounts-to-steal-cloud-credentials/
author: Security Arsenal
date: 2026/04/06
logsource:
  product: github
  service: audit
detection:
  selection:
    action: 'repo.clone'
    command_line|contains:
      - 'curl'
      - 'wget'
      - 'base64'
      - 'eval'
      - 'exec'
  condition: selection
falsepositives:
  - Legitimate CI/CD pipelines
level: high

KQL (Microsoft Sentinel / Defender)

The following KQL query hunts for suspicious GitHub activity in Microsoft Sentinel. It looks for mass repository access, suspicious pull requests, and command execution indicative of secrets theft.

KQL — Microsoft Sentinel / Defender
GitHubAuditEvent
| where Action == "pull_request.opened"
| where Title contains "update" or Title contains "fix" or Title contains "security" or Title contains "patch"
| where Body contains "curl" or Body contains "wget" or Body contains "http://" or Body contains "https://"
| summarize count() by Actor, Repository, Title
| where count_ > 5
| order by count_ desc

GitHubAuditEvent
| where Action == "repo.access"
| summarize count() by Actor, Repository
| where count_ > 50
| order by count_ desc

GitHubAuditEvent
| where Action == "repo.clone"
| where CommandLine contains "curl" or CommandLine contains "wget" or CommandLine contains "base64" or CommandLine contains "eval" or CommandLine contains "exec"
| summarize count() by Actor, Repository, CommandLine
| where count_ > 1
| order by count_ desc

Velociraptor VQL

The following Velociraptor VQL hunt targets process execution and file artifacts associated with secrets-stealing malware. It looks for suspicious commands and files commonly used in these attacks.

VQL — Velociraptor
-- Hunt for suspicious processes matching threat indicators
SELECT Pid, Name, CommandLine, Exe, Username, CreateTime
FROM pslist()
WHERE CommandLine =~ 'curl|wget|base64|eval|exec'
   OR Exe =~ 'github|git'

-- Hunt for suspicious files in GitHub repositories
SELECT FullPath, Size, Mtime
FROM glob(glob='C:\Users\*\Documents\GitHub\**\*.ps1')
WHERE Size > 1024

-- Hunt for network connections to suspicious domains
SELECT Pid, Name, RemoteAddress, RemotePort, State
FROM netstat()
WHERE RemoteAddress =~ 'github.com|raw.githubusercontent.com'

Remediation Script (PowerShell)

The following PowerShell script helps verify and harden GitHub accounts and repositories. It checks for suspicious activity, rotates credentials, and enforces security best practices.

PowerShell
# GitHub Security Hardening Script
# Run this script on all GitHub organization accounts

# 1. Rotate all GitHub tokens
$tokens = Get-GitHubToken -All
foreach ($token in $tokens) {
    Revoke-GitHubToken -Token $token.Id
    New-GitHubToken -Description "Rotated after wfx-loot campaign"
}

# 2. Enable two-factor authentication (2FA) for all users
$users = Get-GitHubUser -All
foreach ($user in $users) {
    if (-not $user.TwoFactorEnabled) {
        Enable-GitHub2FA -User $user.Login
    }
}

# 3. Audit recent pull requests for suspicious activity
$pullRequests = Get-GitHubPullRequest -All -State Open
foreach ($pr in $pullRequests) {
    if ($pr.Body -match 'curl|wget|http://|https://') {
        Write-Warning "Suspicious PR detected: $($pr.Title) - $($pr.Url)"
        # Optionally close or review the PR
    }
}

# 4. Enforce branch protection rules
$repos = Get-GitHubRepository -All
foreach ($repo in $repos) {
    Set-GitHubBranchProtection -Repository $repo.Name -Branch main -RequirePullRequestReviews -RequireStatusChecks
}

# 5. Scan for exposed secrets in repositories
$repos | ForEach-Object {
    $secrets = Get-GitHubSecret -Repository $_.Name
    if ($secrets) {
        Write-Warning "Exposed secrets found in $($_.Name)"
        # Rotate or revoke exposed secrets
    }
}

Write-Output "GitHub security hardening complete. Review warnings and take appropriate action."

Remediation

Immediate actions to mitigate the risk from the wfx-loot campaign:

  1. Rotate All Credentials: Immediately rotate all GitHub tokens, SSH keys, and cloud credentials. Assume all credentials are compromised.
  2. Enable 2FA: Enforce two-factor authentication for all GitHub accounts. This is non-negotiable.
  3. Audit Pull Requests: Review all recent pull requests for suspicious activity. Look for PRs with external links or commands.
  4. Branch Protection: Enable branch protection rules requiring pull request reviews and status checks.
  5. Secrets Scanning: Use tools like GitHub Secrets Scanning or TruffleHog to identify and revoke exposed secrets.
  6. Monitor GitHub Audit Logs: Continuously monitor GitHub audit logs for suspicious activity. Set up alerts for mass repository access or suspicious PRs.
  7. Educate Developers: Train developers to recognize phishing attempts and suspicious PRs. Social engineering is a key vector in this campaign.
  8. Vendor Advisory: Refer to GitHub's official security advisory for the latest guidance and updates: https://github.blog/security/

No specific patch is available; this is a social engineering and credential compromise campaign. Focus on hardening accounts and repositories.

Related Resources

Security Arsenal Incident Response Services AlertMonitor Platform Book a SOC Assessment incident-response Intel Hub

Is your security operations ready?

Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.