Malicious ZIP Archive Delivers Git-Based Remote Code Execution via Hooks and Filters
A developer recently received an unsolicited job offer via LinkedIn from a company called Cryptic Heaven, which claimed to build financial systems for cryptocurrency credit cards. The message directed the recipient to download a contract archive from a provided link, resulting in the file Contract-2026.zip.
Inside the archive were standard documents, a README.md, and a complete .git directory containing multiple branches and custom configuration. The README instructed users to inspect documents across three branches: doc, job, and codebase.
Attack Mechanism
The repository contained a modified .git/config that redirected hooks to .git/objects/interrupt and defined a custom filter named ltr. A post-checkout hook in the hidden directory executed git status after branch switches, while the filter script .git/ltr ran during status checks to download and execute remote code.
The filter script used timing logic and lock files to debounce multiple invocations before launching platform-specific payloads via curl and PowerShell or sh. It preserved file contents by piping input directly to cat, avoiding visible changes to the working directory.
Trigger Scenarios
Execution could occur without deliberate malicious commands through several common developer workflows:
- Opening README.md in Visual Studio Code, which auto-detects the repository and runs git status.
- Using Git-aware terminal prompts that invoke git status upon directory change.
- Following the README instructions to run git checkout on different branches.
The attack targeted both Unix-like systems and Windows, relying on Git for Windows to interpret shell scripts even from PowerShell or CMD environments.
Implications
By delivering a full local Git repository in ZIP format rather than a clone URL, the attackers preserved malicious local configuration that standard cloning would discard. Analysts recommend inspecting .git/config, .git/info/attributes, and custom hooks before opening unknown repositories in any IDE.
Related articles
487 GitHub Repositories Found Distributing MopsStealer Trojan Disguised as Claude Add-ons
Security researchers at AIR Security have uncovered an ongoing campaign called TrojanPony that has placed 487 malicious repositories on GitHub since July 2026. Attackers distribute the MopsStealer infostealer by masquerading it as legitimate extensions for the Claude Code AI agent, including ponytail, agents-council, and andrej-karpathy-skills modifications that retain original functionality. The malware is delivered through a signed Notepad++ updater that performs DLL side-loading to drop the payload, which then impersonates RuntimeBroker.exe, persists via scheduled tasks, and steals credentials. In November the operators expanded the lure set to include fake AI applications and a counterfeit GTA VI PC port. Using a stolen GitHub token, the threat actors also injected malicious code into 20 legitimate repositories and attempted to extract CI secrets, with five tainted repos reaching trending status and accumulating 2,482 stars. After the original account was removed, 413 copies remained, and one malicious extension was still available on skills.sh after bypassing automated checks by Gen Agent Trust Hub, Socket, and Snyk.
SAP Investigates GitHub Breach After Attackers Steal Employee Tokens to Modify Source Code
SAP has confirmed an ongoing investigation into a security incident in which attackers obtained employee authentication tokens and used them to access, copy, and modify source code on the company's GitHub infrastructure. The company stated that there is currently no evidence of unauthorized access to customer data. German outlet Der Spiegel reported that the incident was internally codenamed Project Granite, with employees instructed to maintain confidentiality. Attackers are believed to have leveraged AI-based tools during the operation, though SAP has not officially confirmed this detail. As a precaution, SAP restricted GitHub access, halted automated development processes, and replaced digital signing keys. The incident follows a separate compromise of official SAP npm packages earlier this year that targeted developer credentials.
Pre-installed Android Malware Surges as Triada and Keenadu Trojans Infect Devices Through Supply Chain
The number of Android devices carrying pre-installed malware has more than doubled over the past year, with compromised firmware reaching consumers directly from manufacturers. According to Kaspersky Lab research covering the first ten months of 2026, 88 percent of detected cases involved the Triada and Keenadu trojan families, with Keenadu alone appearing on over 220,000 devices. Infections occur at multiple points in the production pipeline, including deliberate insertion by makers of low-cost and counterfeit hardware, compromised firmware builds supplied by contractors, and tainted open-source components. Triada operates with system-level privileges to inject malicious modules into application memory, intercept SMS and calls, and steal credentials, while Keenadu employs a delayed-activation mechanism that can remain dormant for roughly 2.5 months after initial contact with its command server. Similar threats have been identified beyond smartphones, including Dwphon on children's smartwatches and Vo1d on television set-top boxes. Kaspersky Lab's Denis Parinov warned that such devices can serve as entry points into corporate networks, sources of data leaks, and participants in DDoS attacks, recommending firmware verification and Zero Trust policies for mobile infrastructure.
Securing Secrets in GitLab CI/CD Against Merge Request Leaks and Unsafe Pipelines
The article explains how GitLab CI/CD pipelines run with elevated privileges and can leak secrets through misconfigured variables or overly permissive CI_JOB_TOKEN settings. It stresses that masked variables only hide values in logs while protected variables restrict access to protected branches and tags. Best practices include using protected and masked variables with environment scope, limiting CI_JOB_TOKEN to specific projects, and adopting external secret managers such as HashiCorp Vault with JWT authentication. The guide also covers OIDC federation for passwordless cloud access using Yandex Cloud as an example and recommends pinning images by digest and using ephemeral runners. Additional advice covers protecting pipeline configuration files and avoiding privileged runners for untrusted code.