In early 2026, Kaspersky researchers identified an active intrusion campaign—codenamed Operation ShadowCloud—targeting government sectors across Asia and Africa. The operation employs two previously undocumented backdoors, GitDoor and GraphDoor, which abuse legitimate cloud services—GitHub and Microsoft SharePoint, respectively—as covert command-and-control (C2) channels.
This represents a sophisticated evolution in adversary tradecraft. By leveraging high-reputation domains and encrypted API traffic, the attackers bypass traditional egress filtering and blend malicious communications with routine enterprise collaboration traffic. Organizations relying on GitHub for development or SharePoint for document management must immediately assess their exposure and hunt for indicators of these implants.
Technical Analysis
Threat Overview
Operation ShadowCloud utilizes a dual-implant strategy tailored to the victim's environment:
- GitDoor: Leverages GitHub repositories and API endpoints for tasking and data exfiltration
- GraphDoor: Abuses Microsoft Graph API and SharePoint Online for C2 communications
Affected Platforms
- GitHub (github.com, api.github.com, enterprise instances)
- Microsoft SharePoint Online (sharepoint.com, graph.microsoft.com)
- Microsoft 365 / Office 365 tenants utilizing Graph API
Attack Chain
The intrusion follows a typical APT pattern:
- Initial Access: Likely spear-phishing or exploitation of perimeter devices (specific vector not yet disclosed)
- Implant Deployment: GitDoor or GraphDoor is deployed based on available egress paths
- C2 Establishment: The implant authenticates to legitimate cloud services using hardcoded or dynamically retrieved tokens
- Tasking & Exfiltration: Commands are retrieved from attacker-controlled repositories or SharePoint sites; data is staged and exfiltrated through the same channels
Why This Is Dangerous
Traditional network security controls struggle against this technique because:
- Reputation-based filtering fails: GitHub and Microsoft domains are whitelisted in most environments
- TLS inspection limitations: Encrypted API traffic requires SSL/TLS decryption to inspect, which many organizations avoid for privacy or performance reasons
- Legitimate credentials: Attackers use valid OAuth tokens or API keys, making authentication-based detection difficult
- Low and slow: C2 traffic mimics normal API call patterns with minimal bandwidth
Exploitation Status
- Active exploitation: Confirmed in government sectors across Asia and Africa
- Attribution: Not publicly attributed to a specific nation-state, but TTPs suggest a sophisticated APT actor
- CISA KEV: Not yet listed (as of February 2026)
Detection & Response
Sigma Rules
---
title: GitDoor C2 Activity - GitHub API Abuse
id: 8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c
status: experimental
description: Detects suspicious GitHub API access patterns consistent with GitDoor C2, including raw.githubusercontent.com access from non-browser processes and unusual repository enumeration.
references:
- https://attack.mitre.org/techniques/T1071.001/
- https://attack.mitre.org/techniques/T1567.002/
author: Security Arsenal
date: 2026/02/16
tags:
- attack.command_and_control
- attack.t1071.001
- attack.exfiltration
- attack.t1567.002
logsource:
category: network_connection
product: windows
detection:
selection:
DestinationHostname|contains:
- 'raw.githubusercontent.com'
- 'api.github.com'
- 'github.com'
Image|endswith:
- '\powershell.exe'
- '\cmd.exe'
- '\wscript.exe'
- '\cscript.exe'
- '\mshta.exe'
- '\rundll32.exe'
- '\regsvr32.exe'
filter_browsers:
Image|endswith:
- '\chrome.exe'
- '\firefox.exe'
- '\msedge.exe'
- '\iexplore.exe'
- '\safari.exe'
condition: selection and not filter_browsers
falsepositives:
- Developers using CLI tools
- CI/CD pipelines accessing GitHub
level: high
---
title: GraphDoor C2 Activity - Microsoft Graph API Abuse
id: 9e4b3c2d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects suspicious Microsoft Graph API or SharePoint Online access from non-standard processes, potentially indicating GraphDoor C2 communications.
references:
- https://attack.mitre.org/techniques/T1071.001/
- https://attack.mitre.org/techniques/T1550.001/
author: Security Arsenal
date: 2026/02/16
tags:
- attack.command_and_control
- attack.t1071.001
- attack.use_of_authentication_token
- attack.t1550.001
logsource:
category: network_connection
product: windows
detection:
selection:
DestinationHostname|contains:
- 'graph.microsoft.com'
- '.sharepoint.com'
Image|endswith:
- '\powershell.exe'
- '\cmd.exe'
- '\wscript.exe'
- '\cscript.exe'
- '\mshta.exe'
- '\rundll32.exe'
- '\regsvr32.exe'
filter_office:
Image|endswith:
- '\outlook.exe'
- '\teams.exe'
- '\onedrive.exe'
- '\excel.exe'
- '\winword.exe'
- '\powerpnt.exe'
condition: selection and not filter_office
falsepositives:
- Custom SharePoint integrations
- PowerShell administrative scripts
level: medium
---
title: Suspicious OAuth Token or API Key Usage from Scripting Engines
id: 0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects scripting engines making HTTPS connections to GitHub or Microsoft Graph with authorization headers, indicating potential token-based C2 authentication.
references:
- https://attack.mitre.org/techniques/T1550.001/
- https://attack.mitre.org/techniques/T1059.001/
author: Security Arsenal
date: 2026/02/16
tags:
- attack.use_of_authentication_token
- attack.t1550.001
- attack.execution
- attack.t1059.001
logsource:
category: process_creation
product: windows
detection:
selection:
CommandLine|contains:
- 'Authorization: Bearer'
- 'api.github.com'
- 'graph.microsoft.com'
- 'access_token'
- 'client_secret'
condition: selection
falsepositives:
- Legitimate automation scripts
- DevOps tooling
level: medium
KQL Hunt Query
// Hunt for GitDoor and GraphDoor C2 patterns in Microsoft Sentinel
// Focus on non-browser processes communicating with GitHub or SharePoint APIs
let GitHubDomains = dynamic(["api.github.com", "raw.githubusercontent.com", "github.com"]);
let MicrosoftDomains = dynamic(["graph.microsoft.com", "*.sharepoint.com"]);
let SuspiciousProcesses = dynamic(["powershell.exe", "cmd.exe", "wscript.exe", "cscript.exe", "mshta.exe", "rundll32.exe", "regsvr32.exe"]);
union
(DeviceNetworkEvents
| where TimeGenerated > ago(7d)
| where RemoteUrl has_any (GitHubDomains) or RemoteUrl has_any (MicrosoftDomains)
| where InitiatingProcessFileName in~ (SuspiciousProcesses)
| where InitiatingProcessFileName !in~ ("chrome.exe", "firefox.exe", "msedge.exe", "iexplore.exe", "outlook.exe", "teams.exe")
| summarize Connections = count(),
UniqueRemoteIPs = dcount(RemoteIP),
FirstSeen = min(TimeGenerated),
LastSeen = max(TimeGenerated),
RemoteIPs = make_set(RemoteIP),
RemoteUrls = make_set(RemoteUrl)
by DeviceName, InitiatingProcessFileName, InitiatingProcessCommandLine
| extend RiskScore = case(
Connections > 50 and UniqueRemoteIPs < 3, "High - Beaconing Pattern",
Connections > 10, "Medium - Frequent API Access",
"Low - Occasional Access")
| order by Connections desc),
(CommonSecurityLog
| where TimeGenerated > ago(7d)
| where DestinationHostName has_any (GitHubDomains) or DestinationHostName has_any (MicrosoftDomains)
| where SourceProcessName in~ (SuspiciousProcesses)
| summarize Connections = count(),
FirstSeen = min(TimeGenerated),
LastSeen = max(TimeGenerated)
by SourceHostName, SourceProcessName, DestinationHostName
| extend RiskScore = "Medium - Syslog Detection")
Velociraptor VQL Hunt
-- Hunt for processes with network connections to GitHub or SharePoint APIs
-- and inspect their command lines for suspicious patterns
SELECT Pid, Name, CommandLine, Exe, Username, CreateTime,
Netstat.LocalIP, Netstat.LocalPort, Netstat.RemoteIP, Netstat.RemotePort, Netstat.Status
FROM pslist()
JOIN (
SELECT Pid, LocalIP, LocalPort, RemoteIP, RemotePort, Status
FROM netstat()
WHERE RemoteIP =~ '140\.82\.' OR RemoteIP =~ '20\.' OR RemoteIP =~ '13\.' // GitHub and Azure ranges
) AS Netstat ON pslist().Pid = Netstat.Pid
WHERE Name =~ '(powershell|cmd|wscript|cscript|mshta|rundll32|regsvr32)'
AND CommandLine =~ '(github|graph\.microsoft|sharepoint|api\.|Bearer|access_token)'
AND Username != 'SYSTEM'
ORDER BY CreateTime DESC
Remediation Script
# GitDoor/GraphDoor Detection and Hardening Script
# Run with administrative privileges
Write-Host "=== Operation ShadowCloud Detection and Hardening ===" -ForegroundColor Cyan
# 1. Check for suspicious GitHub/SharePoint connections from non-browser processes
Write-Host "`n[1] Checking for suspicious network connections..." -ForegroundColor Yellow
$suspiciousConnections = Get-NetTCPConnection | Where-Object {
($_.RemoteAddress -match '140\.82\.' -or $_.RemoteAddress -match '20\.' -or $_.RemoteAddress -match '13\.') -and
(Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue).ProcessName -match '(powershell|cmd|wscript|cscript|mshta|rundll32|regsvr32)'
} | Select-Object LocalAddress, LocalPort, RemoteAddress, RemotePort, State, OwningProcess,
@{Name='ProcessName';Expression={(Get-Process -Id $_.OwningProcess).ProcessName}},
@{Name='ProcessPath';Expression={(Get-Process -Id $_.OwningProcess).Path}}
if ($suspiciousConnections) {
Write-Host "ALERT: Found suspicious connections to GitHub/Azure ranges:" -ForegroundColor Red
$suspiciousConnections | Format-Table -AutoSize
} else {
Write-Host "No suspicious connections detected." -ForegroundColor Green
}
# 2. Audit PowerShell script block logging for GitHub/Graph API abuse
Write-Host "`n[2] Checking PowerShell script block logs for suspicious API calls..." -ForegroundColor Yellow
$events = Get-WinEvent -FilterHashtable @{LogName='Microsoft-Windows-PowerShell/Operational'; Id=4104} -MaxEvents 1000 -ErrorAction SilentlyContinue |
Where-Object { $_.Message -match '(api\.github\.com|graph\.microsoft\.com|raw\.githubusercontent\.com)' -and
$_.Message -match '(Authorization|Bearer|access_token|client_secret)' }
if ($events) {
Write-Host "ALERT: Found suspicious PowerShell activity targeting GitHub/Microsoft Graph:" -ForegroundColor Red
$events | Select-Object TimeCreated, Id, Message | Format-List
} else {
Write-Host "No suspicious PowerShell activity detected in recent logs." -ForegroundColor Green
}
# 3. Enable enhanced PowerShell logging if not already enabled
Write-Host "`n[3] Verifying PowerShell logging configuration..." -ForegroundColor Yellow
$scriptBlockLogging = Get-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging" -Name "EnableScriptBlockLogging" -ErrorAction SilentlyContinue
$moduleLogging = Get-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ModuleLogging" -Name "EnableModuleLogging" -ErrorAction SilentlyContinue
if (-not $scriptBlockLogging -or $scriptBlockLogging.EnableScriptBlockLogging -ne 1) {
Write-Host "Enabling PowerShell Script Block Logging..." -ForegroundColor Cyan
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging" -Force | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging" -Name "EnableScriptBlockLogging" -Value 1
Write-Host "Script Block Logging enabled." -ForegroundColor Green
} else {
Write-Host "Script Block Logging already enabled." -ForegroundColor Green
}
if (-not $moduleLogging -or $moduleLogging.EnableModuleLogging -ne 1) {
Write-Host "Enabling PowerShell Module Logging..." -ForegroundColor Cyan
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ModuleLogging" -Force | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ModuleLogging" -Name "EnableModuleLogging" -Value 1
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ModuleLogging" -Name "ModuleNames" -Value "*"
Write-Host "Module Logging enabled." -ForegroundColor Green
} else {
Write-Host "Module Logging already enabled." -ForegroundColor Green
}
# 4. Recommendations
Write-Host "`n[4] Recommended Actions:" -ForegroundColor Yellow
Write-Host " • Review firewall/proxy logs for connections to api.github.com and graph.microsoft.com from non-standard processes" -ForegroundColor White
Write-Host " • Implement TLS inspection for GitHub and Microsoft Graph API traffic if legally permissible" -ForegroundColor White
Write-Host " • Audit GitHub App permissions and OAuth tokens for unauthorized applications" -ForegroundColor White
Write-Host " • Review Azure AD app registrations for suspicious Graph API permissions" -ForegroundColor White
Write-Host " • Deploy EDR solutions with behavioral detection for C2 patterns" -ForegroundColor White
Write-Host "`n=== Scan Complete ===" -ForegroundColor Cyan
Remediation
Immediate Actions
-
Hunt for Indicators: Deploy the Sigma rules and KQL queries provided above to identify potential GitDoor or GraphDoor activity in your environment.
-
Audit Cloud Service Usage:
- Review GitHub App installations and OAuth tokens for unauthorized or suspicious applications
- Audit Azure AD app registrations for unusual Graph API permissions (Sites.FullControl.All, Mail.Read, etc.)
- Check for unexpected SharePoint site collections or document libraries
-
Network Controls:
- Implement TLS inspection for GitHub and Microsoft Graph API traffic if legally and operationally feasible
- Consider blocking raw.githubusercontent.com for non-developer systems
- Monitor for DNS queries to attacker-controlled GitHub Pages or SharePoint subdomains
-
Endpoint Hardening:
- Enable PowerShell Script Block Logging and Module Logging (see script above)
- Deploy attack surface reduction (ASR) rules to block Office applications from creating child processes
- Restrict PowerShell execution policy to AllSigned or RemoteSigned
Long-term Strategy
- Zero Trust Architecture: Implement micro-segmentation and least-privilege access to prevent lateral movement
- Behavioral Analytics: Deploy UEBA solutions to detect anomalous API usage patterns
- Threat Intelligence: Subscribe to Kaspersky and other vendor feeds for updated IoCs related to Operation ShadowCloud
- Incident Response Plan: Update playbooks to include cloud service C2 scenarios
Vendor References
- Kaspersky SecureList: Monitor for updated technical analysis of GitDoor and GraphDoor
- Microsoft Security Response Center: Guidance on securing Graph API access
- GitHub Security: Best practices for securing organization repositories
Category
soc-mdr
Related Resources
Security Arsenal Alert Triage Automation AlertMonitor Platform Book a SOC Assessment platform Intel Hub
Is your security operations ready?
Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.