Cracking Linux Hashes And Expanding Access
The author gained root access to several Linux machines and extracted password hashes from the shadow file. After cracking two hashes with Hashcat, they used Shodan to find other machines in the same organisation and successfully authenticated to several via SSH brute-force with the cracked credentials.
Published on systemweakness.com
In this blog, I’ll walk through how I gained access to multiple machines within an organization by cracking Linux user hashes and leveraging Shodan to identify additional targets. This post will focus on the post-exploitation phase, including hash extraction, cracking, and lateral movement.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely weak user passwords that could be cracked from the shadow file, combined with password reuse across multiple machines in the same organisation.
Impact
The attacker could authenticate to several other machines within the same organisation, expanding access across multiple servers.
What the attacker needed
Root access to a Linux machine; weak user passwords; password reuse across machines; network access to target machines
The fix
Organisations should enforce strong unique passwords, enable MFA for SSH, restrict SSH access, and monitor logs for repeated failed login attempts.
How it was found
- Access the /etc/shadow file with root privileges.
- Copy the shadow file contents to a local machine.
- Extract the hashes using a command that isolates the hash field.
- Identify the hash type as sha512crypt.
- Run Hashcat with a dictionary attack using the rockyou wordlist.
- Use Shodan to find other IP addresses in the same organisation, ISP, or subnet.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
This is a story about breaking into computers that are already compromised. The attacker had full control of one machine, copied the scrambled passwords (hashes) stored on it, and used a tool to guess the original passwords. With those passwords, they found other machines belonging to the same organisation and logged into them too.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.