📚
Notes
  • Welcome
    • Intro
    • My OSCP Exam Adventure
  • Security Blogs
    • Initial Access 101
      • Spring Cloud Function CVE-2022-22963
    • Bug Hunting
      • XSS
        • Blog site search field
  • Active Directory
    • Tools
    • Common built-in AD groups
    • Identifying Users
    • LLMNR/NBT-NS Poisoning
    • Password Spraying
      • Enumerating & Retrieving Password Policies
      • Making a Target User list
      • Internal Password Spraying - from Linux
      • Internal Password Spraying - from Windows
    • Credentialed Enumeration
      • Linux
      • Windows
      • Living Off the Land
    • Kerberoasting
      • Linux
      • Windows
    • ACL
      • Enumeration
      • Abusing ACLs
      • DCSync
    • Privileged Access
    • AS-REP Roasting
    • Attacking Trusts
      • Enumerating Trust Relationships
      • Child -> Parent Trusts
      • Cross-Forest Trust Abuse
  • Enumeration
    • SMB, RPC - 137,138,139,445,111
    • MYSQL - 3306
    • MSSQl - 1433
    • FTP - 21
    • RPC - 111
    • DNS - 53
    • NFS - 2049
    • SMTP - 25
    • IMAP, POP3 - 110,143,993,995
    • SNMP - 161
    • SVN - 3690
    • IRC - 8067
    • Oracle TNS - 1521
    • LDAP
    • Linux Remote Management Protocols
    • Windows Remote Management Protocols
    • Fuzzing
    • IPMI - 623(UDP)
  • Common Applications
    • Application Enumeration
    • CMS (Content Management System)
      • Wordpress
      • Joomla
      • Drupal
    • Servlet Containers/Software Development
      • Tomcat
      • Jenkins
    • Customer Service Mgmt & Configuration Management
      • Gitlab
  • Shells
    • Reverse Shells
    • Bind Shells
    • Spawning a TTY Shell
    • Web Shells
  • Privilege Escalation
    • Other Resources
    • Linux PrivEsc
    • Windows PrivEsc
      • Windows Users Privileges
      • Information Gatthering & Enumeration
      • Privilege Escalation Techniques
  • File Transfers
    • Quick Cheatsheet
    • Windows File Transfer
    • Linux File Transfer
  • Password Attacks
    • Linux Local Password Attacks
      • Credential Hunting in Linux
      • Passwd, Shadow & Opasswd
    • Windows Local Password Attacks
      • Attacking SAM
      • Attacking LSASS
      • Attacking Active Directory & NTDS.dit
      • Credential Hunting in Windows
    • Pass-the-Hash (PtH)
    • Cracking Files
    • Remote Password Attacks
  • SIde Notes
    • Pivoting, Tunneling, and Port Forwarding
    • File Encryption
  • Programming
    • Downloading Files
Powered by GitBook
On this page
  • Protected Files
  • Hunting for Encoded Files
  • Cracking with John
  • Cracking Documents
  • Protected Archives
  • Cracking Archives
  • Cracking ZIP
  • Cracking OpenSSL Encrypted Archives
  • Cracking BitLocker Encrypted Drives
  1. Password Attacks

Cracking Files

Protected Files

Hunting for Encoded Files

Hunting for Files

for ext in $(echo ".xls .xls* .xltx .csv .od* .doc .doc* .pdf .pot .pot* .pp*");do echo -e "\\nFile extension: " $ext; find / -name *$ext 2>/dev/null | grep -v "lib\\|fonts\\|share\\|core" ;done

Hunting for SSH Keys

grep -rnw "PRIVATE KEY" /* 2>/dev/null | grep ":1"

Cracking with John

# John Hashing Scripts
locate *2john*

# generating the corresponding hashes for encrypted SSH keys.
ssh2john.py SSH.private > ssh.hash

# Cracking SSH Keys
john --wordlist=rockyou.txt ssh.hash

john ssh.hash --show

Cracking Documents

Cracking Microsoft Office Documents

# generating hash
office2john.py Protected.docx > protected-docx.hash

# cracking hash
john --wordlist=rockyou.txt protected-docx.hash
john protected-docx.hash --show

Cracking PDFs

# Generating hash
pdf2john.py PDF.pdf > pdf.hash

# Cracking hash
john --wordlist=rockyou.txt pdf.hash
john pdf.hash --show

Protected Archives

Cracking Archives

Cracking ZIP

Using zip2john

zip2john ZIP.zip > zip.hash

Cracking the Hash with John

john --wordlist=rockyou.txt zip.hash

Viewing the Cracked Hash

john zip.hash --show

Cracking OpenSSL Encrypted Archives

Using file

file GZIP.gzip

Using a for-loop to Display Extracted Contents

for i in $(cat rockyou.txt);do openssl enc -aes-256-cbc -d -in GZIP.gzip -k $i 2>/dev/null| tar xz;done

Cracking BitLocker Encrypted Drives

Using bitlocker2john

bitlocker2john -i Backup.vhd > backup.hashes
grep "bitlocker\\$0" backup.hashes > backup.hash
cat backup.hash

Using hashcat to Crack backup.hash

hashcat -m 22100 backup.hash /opt/useful/seclists/Passwords/Leaked-Databases/rockyou.txt -o backup.cracked
PreviousPass-the-Hash (PtH)NextRemote Password Attacks

Last updated 2 years ago