Pentesting: Stealing Credentials with LOLCreds and CredsHound
Welcome back, cyberwarriors!
When you just land on a new machine, you often have to sit down and go through every running service just to figure out whatβs actually installed and which of those apps might be worth a closer look for credentials in a config somewhere. You canβt skip this part, as it usually gives you something youβll need later in the engagement, but it eats time. A lot of it.
There are older tools that try to do something similar, but the two weβre covering today are more current. LOLCreds and CredsHound come from the same developer and they cover a huge amount of software.
So letβs see how they work.
LOLCreds
LOLCreds is a website that has 678 different credentials. Some software generates a password when you install it or prompts you to enter it. There are also static credentials that are baked into the product. The D-Link backdoor credentials are a good example of the second kind.Β

LOLCreds also tracks AI API keys and shows you exactly where to find them on a system. Hereβs what it has on Cursor.

MySQL is a more basic example. Its password is often hidden in a config file or sitting as a variable in the env file.

CredsHound
All of that is great when you already know what software youβre hunting through and youβre picking it one at a time. But machines might have dozens of applications running. Software can be removed, but configs stay and password reuse is common. You can use CredsHound for this hunt.Β
CredsHound is a scanner written in Go. Under the hood it pulls templates from LOLCreds so it can run product aware checks. It has been fully optimized for modern environments, so it will scan everything from DBeaver encrypted databases to OpenCode, GitHub Copilot CLI, Hugging Face, OpenAI and more.Β
Setting Up
Before you start using the scanner, you need to have Go installed.
bash$ > sudo apt install golang
bash$ > go install github.com/haxxm0nkey/credshound/cmd/credshound@latest

Once that finishes, you may run into a common issue where the Go binaries arenβt included in your system path yet. Add them yourself:
bash$ > sudo echo βexport PATH:$PATH:/home/user/go/binβ >> /etc/profile
bash$ > source /etc/profile
Now weβre ready.
How to Use
There are different ways you can run it, but you always start with updating the template library. The scanner can be used with different privileges, but weβll use root.Β
# Update templates
bash# > credshound -ut
# Scan /etc
bash# > credshound -t /root/.cache/credshound/templates /etc

Our system is fresh, so thereβs not much on it yet. A box thatβs been sitting in prod for a while will have more interesting results, like the one below.

CredsHound can also work with BloodHound to show you the relationships between credentials as a graph. Hereβs how to set it up:
ubuntu$ > credshound -t ~/lolcreds-templates -bloodhound -o credshound-bloodhound.json .
Then you import the JSON file into BloodHound and see what comes up.

When youβve collected many of these JSON files from different machines, youβll start seeing the architecture of what youβre testing.
A few more commands youβll find useful:
# Scan the current directory
bash$ > credshound .
# Scan multiple roots
bash$ > credshound ~/project /etc
# Scan only env variables
bash$ > credshound -sources env
# Scan current and process environment variables on Linux
bash$ > credshound -sources env,proc
Summary
Credential hunting is a tedious thing when you do it manually, but you canβt really skip this part. Itβs essential to move further. The tools covered can make the whole process easier and the output rich. LOLCreds has a reference library for different products and CredsHound can scan your hosts for secrets with results that you may import into BloodHound.
If you like red teaming, we have our Red Team Operator training, where we cover more tools and techniques to help you emulate real APT work, so you can give a company a realistic stress test and help make it secure.
The post Pentesting: Stealing Credentials with LOLCreds and CredsHound first appeared on Hackers Arise.