Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Application Security

Stolen GitHub Credentials Used to Push Fake Dependabot Commits

Threat actors have been using stolen GitHub personal access tokens to push malicious code posing as Dependabot contributions.

Threat actors have been observed pushing fake Dependabot contributions to hundreds of GitHub repositories in an effort to inject malicious code, application security firm Checkmarx reports.

Identified in July, the campaign relied on stolen GitHub personal access tokens to gain access to repositories and push code to steal sensitive information from projects and passwords from end users.

To evade detection, the attackers faked commit messages to make them appear as if generated by Dependabot, GitHub’s free automated dependency management tool that helps software developers identify and address vulnerabilities in their code.

Dependabot continuously scans a project’s dependencies and generates pull requests when identifying issues. The update requests, however, need user acknowledgement.

As part of the observed campaign, the attackers created a commit message “fix” that appeared to be contributed by the ‘dependabot[bot]’ user account, tricking developers into believing the commits came from GitHub’s tool.

Using this technique, the threat actors targeted hundreds of repositories, including private repositories, adding a new “hook.yml” file as a workflow file, to send GitHub secrets to an external server on every push event.

In addition to injecting this GitHub Action, the attackers modified all .js files within the targeted projects, by appending an obfuscated line of code at the end.

The code would create a new script tag when executed in a browser, while also loading an additional script from a remote server, to intercept password-based forms and send user credentials to the attackers.

Advertisement. Scroll to continue reading.

According to Checkmarx, the stolen GitHub personal access tokens used in this campaign were most likely exfiltrated from the victims’ systems after they downloaded a malicious package.

The security firm notes that the attacks were likely automated, and that it was difficult for the victims to identify the token compromise, as the token’s access log activity does not show in the account’s audit log.

“This whole situation teaches us to be careful about where we get our code, even from trusted places like GitHub. This is the first incident we witnessed a threat actor using fake git commits to disguise activity, knowing that many developers do not check the actual changes of Dependabot when they see it,” Checkmarx notes.

Related: GitHub Rotates Publicly Exposed RSA SSH Private Key

Related: Attackers Can Abuse GitHub Codespaces for Malware Delivery

Related: GitHub Announces New Security Improvements

Written By

Ionut Arghire is an international correspondent for SecurityWeek.

Click to comment

Trending

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Join the session as we discuss the challenges and best practices for cybersecurity leaders managing cloud identities.

Register

SecurityWeek’s Ransomware Resilience and Recovery Summit helps businesses to plan, prepare, and recover from a ransomware incident.

Register

People on the Move

Mike Dube has joined cloud security company Aqua Security as CRO.

Cody Barrow has been appointed as CEO of threat intelligence company EclecticIQ.

Shay Mowlem has been named CMO of runtime and application security company Contrast Security.

More People On The Move

Expert Insights

Related Content

Application Security

Cycode, a startup that provides solutions for protecting software source code, emerged from stealth mode on Tuesday with $4.6 million in seed funding.

Application Security

Virtualization technology giant VMware on Tuesday shipped urgent updates to fix a trio of security problems in multiple software products, including a virtual machine...

Application Security

Fortinet on Monday issued an emergency patch to cover a severe vulnerability in its FortiOS SSL-VPN product, warning that hackers have already exploited the...

Application Security

PayPal is alerting roughly 35,000 individuals that their accounts have been targeted in a credential stuffing campaign.

Application Security

A CSRF vulnerability in the source control management (SCM) service Kudu could be exploited to achieve remote code execution in multiple Azure services.

Application Security

GitHub this week announced the revocation of three certificates used for the GitHub Desktop and Atom applications.

Application Security

Drupal released updates that resolve four vulnerabilities in Drupal core and three plugins.