Wednesday, May 21, 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

Hackers Target Mobile Users Using PWA JavaScript to Bypass Browser Security

A sophisticated new injection campaign has been uncovered, targeting mobile users through malicious third-party...

Docker Zombie Malware Infects Containers for Crypto Mining and Self-Replication

A novel malware campaign targeting containerized infrastructures has emerged, exploiting insecurely exposed Docker APIs...

Hackers Masquerade as Organizations to Steal Payroll Logins and Redirect Payments from Employees

ReliaQuest, hackers have deployed a cunning search engine optimization (SEO) poisoning scheme to orchestrate...

PupkinStealer Exploits Web Browser Passwords and App Tokens to Exfiltrate Data Through Telegram

A newly identified .NET-based information-stealing malware, dubbed PupkinStealer (also known as PumpkinStealer in some...

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

GEO vs SEO: How Brands Win AI Visibility

Search Is Changing Faster Than You Think The digital world is undergoing a massive shift....

How to Legally Deal With Hit-and-Run Car Accidents

Tucson (AZ) is known for its desert landscapes, vibrant culture, and wide-open roads. But...

Protecting Your Future After a Personal Injury—Trusted Legal Support

Los Angeles, California, is a city of dreams and determination, where traffic surges are...