Thursday, April 17, 2025
HomeTechnologyHacker disclosed GitHub secret key hunter - TruffleHog

Hacker disclosed GitHub secret key hunter – TruffleHog

Published on

SIEM as a Service

Follow Us on Google News

A tool for finding secret keys with varying cryptographic strength in github repositories is published by Dylan Ayrey.

The tool, named as TruffleHog, can search for and find keys containing high-entropy strings by digging deep into commit history and branches, as per developer

TruffleHog’s search capabilities make it “effective at finding secrets accidentally committed that contain high entropy,” Ayrey says, and the tool needs nothing more than GitPython to work.

- Advertisement - Google News

Ayrey commented:

This module will go through the entire commit history of each branch, and check each diff from each commit, and evaluate the Shannon entropy for both the base64 character set and hexidecimal character set for every blob of text greater than 20 characters comprised of those character sets in each diff.

TruffleHog calculates entropy levels using a Shannon Entropy (.PDF) calculator. The entropy levels of keys are important, as the information required to decide unknown key variables can alter how difficult it is to crack.

If a high-entropy string is detected, the string is printed to the screen.

Users of TruffleHog said in a Reddit discussion topic that Amazon already uses the tool to preemptively search GitHub for Amazon Web Services (AWS) keys accidentally connected to public repositories, which prevents attackers from snatching the keys, spinning up vast AWS instances and leaving the owners with the bill.

Setup:

GitPython is the only requirement, which can be installed with the following

pip install -r requirements.txt

How to use Truffle Hog:

python truffleHog.py https://github.com/dxa4481/truffleHog.git

hacker have disclosed GitHub secret keys
Why the name Truffle Hog?

Truffle Hog is a domestic pig used for locating and extracting a type of tuber known as truffles from temperate forests in Europe and North America. The pigs have a good sense of smell and can find truffles from as deep as three feet underground.

It is thought that the natural sex hormones of the male pig are like the smell of the truffles and pigs have a natural affinity for rooting in the earth for food. They are trained to hunt truffles by walking on a leash through suitable groves with a keeper.

Gurubaran
Gurubaran
Gurubaran is a co-founder of Cyber Security News and GBHackers On Security. He has 10+ years of experience as a Security Consultant, Editor, and Analyst in cybersecurity, technology, and communications.

Latest articles

Hacker Leaks 33,000 Employee Records in Third-Party API Breach

A hacker has exposed the personal records of over 33,000 employees after discovering unrestricted...

Google Removes 5.5 Billion Malicious Ads, Suspends 700,000+ Offending Advertisers

Google has announced the removal of 5.5 billion malicious advertisements and the suspension of...

CISA Issues Alert on SonicWall Flaw Being Actively Exploited

The Cybersecurity and Infrastructure Security Agency (CISA) has issued a critical security alert after...

Cisco Webex Vulnerability Lets Hackers Execute Code Through Malicious Meeting Links

Cisco has disclosed a high-severity vulnerability in its widely used Webex App, warning users...

Resilience at Scale

Why Application Security is Non-Negotiable

The resilience of your digital infrastructure directly impacts your ability to scale. And yet, application security remains a critical weak link for most organizations.

Application Security is no longer just a defensive play—it’s the cornerstone of cyber resilience and sustainable growth. In this webinar, Karthik Krishnamoorthy (CTO of Indusface) and Phani Deepak Akella (VP of Marketing – Indusface), will share how AI-powered application security can help organizations build resilience by

Discussion points


Protecting at internet scale using AI and behavioral-based DDoS & bot mitigation.
Autonomously discovering external assets and remediating vulnerabilities within 72 hours, enabling secure, confident scaling.
Ensuring 100% application availability through platforms architected for failure resilience.
Eliminating silos with real-time correlation between attack surface and active threats for rapid, accurate mitigation

More like this

The Ethics of AI-Generated Literature: Who Owns Machine-Written Books?

A New Chapter in StorytellingFiction once belonged solely to human hands. Every novel or...

Why Social Media Habits Make You a Target for Cybercriminals?

Social media has transformed the way we interact, engage, and exchange information. However, the...

10 Common UX Mistakes That Compromise User Security

Here are ten common UX mistakes that can create security vulnerabilities:1. Overly Simplified AuthenticationTrying...