Noirchapeau's Gitbook
Noirchapeau
Noirchapeau
  • Welcome to NoirChapeau Gitbook
  • Network Mapping and Security Auditing Tool
  • Footprinting - Enumeration and Information Gathering Notes
    • FTP Pentesting Notes
    • SMB Pentesting Notes
    • SSH Pentesting Notes
    • IPMI Pentesting Notes
    • Oracle TNS Pentesting Notes
    • MSSQL Pentesting Notes
    • MySQL Pentesting Notes
    • SNMP Pentesting Notes
    • IMAP/POP3 Pentesting Notes
    • SMTP Pentesting Notes
    • DNS Pentesting Notes
    • NFS Pentesting Notes
  • Web Reconnaissance Notes
  • Vulnerability Assessment Notes
    • Nessus Vulnerability Scanner Notes
    • OpenVAS (GVM) Vulnerability Scanner Notes
  • File Transfer Techniques for Pentesting
    • Advanced File Transfer Techniques
    • File Transfer Detection & Evasion Techniques
  • Shells & Payloads: Shell Overview
    • Shells & Payloads: Payloads Overview
    • Shells & Payloads: Web Shells Overview
    • Shells & Payloads: Detection & Prevention
  • Metasploit
    • Working with Metasploit Modules
    • Targets and Payloads
    • Encoders & Msfvenom: Advanced Exploitation Techniques
    • Database Management in Metasploit
    • Sessions and Jobs
    • Writing and Importing Custom Modules into Metasploit
    • Firewall and IDS/IPS Evasion
  • Password Attacks
    • Remote Password Attacks
    • Windows Local Password Attacks
    • Linux Local Password Attacks
    • Windows Lateral Movement
    • Files & Archives Cracking
    • Password Management
  • Interacting with Common Services
    • Protocol Specific Attacks
Powered by GitBook
On this page
  • Understanding Password Security
  • The Foundations
  • Current Password Statistics
  • Password Complexity
  • Credential Storage Systems
  • Linux Systems
  • Windows Systems
  • Attack Methodologies
  • 1. Dictionary Attacks
  • 2. Brute Force Attacks
  • 3. Rainbow Table Attacks
  • John the Ripper Tutorial
  • Basic Usage
  • File Conversion Tools
  • Monitoring Progress
  • Results Storage
  • Protection Measures
  • Additional Resources

Password Attacks

Understanding Password Security

The Foundations

  • Authentication is based on three key factors:

    • Something you know (password, PIN)

    • Something you have (security key, MFA tools)

    • Something you are (biometrics)

Current Password Statistics

  • Password security remains a significant concern:

    • 24% of Americans use weak passwords (e.g., "password", "Qwerty", "123456")

    • 66% reuse passwords across multiple platforms

    • 45% of users don't change passwords after a breach

    • 55% continue using compromised passwords

Password Complexity

  • An 8-character password using uppercase letters and numbers has 36⁸ combinations (208,827,064,576)

  • Strong passwords can include:

    • Phrases

    • Song lyrics

    • Random word combinations (e.g., "TreeDogEvilElephant")

Credential Storage Systems

Linux Systems

  • Passwords are stored in /etc/shadow

  • Shadow file format:

    <username>:<encrypted password>:<last change>:<min age>:<max age>:<warning period>:<inactivity period>:<expiration date>:<reserved field>

Hash Formats

Common hash identifiers:

  • $1$ = MD5

  • $2a$ = Blowfish

  • $5$ = SHA-256

  • $6$ = SHA-512

  • $sha1$ = SHA1crypt

  • $y$ = Yescrypt

  • $gy$ = Gost-yescrypt

  • $7$ = Scrypt

Windows Systems

  • Key components:

    • LSA (Local Security Authority): Manages security policies and authentication

    • LSASS: Handles system security and access permissions

    • SAM: Stores credentials in %SystemRoot%\system32\config\SAM

    • NTDS.dit: Stores Active Directory data including user accounts and passwords

Attack Methodologies

1. Dictionary Attacks

  • Uses wordlists to match against password hashes

  • Common wordlists:

    • rockyou.txt (contains 32 million passwords from the RockYou breach)

  • Best for weak, common passwords

2. Brute Force Attacks

  • Tries all possible character combinations

  • Time-intensive but comprehensive

  • Most effective against shorter passwords

3. Rainbow Table Attacks

  • Uses pre-computed hash-plaintext pairs

  • Limited by table size and content

  • Effective only for hashes present in the table

John the Ripper Tutorial

Basic Usage

  1. Single Crack Mode:

    john --format=<hash_type> <hash_file>
  2. Wordlist Mode:

    john --wordlist=<wordlist_file> --rules <hash_file>
  3. Incremental Mode:

    john --incremental <hash_file>

File Conversion Tools

Before cracking, convert files using appropriate tools:

  • pdf2john: PDF files

  • rar2john: RAR archives

  • ssh2john: SSH private keys

  • zip2john: ZIP files

  • keepass2john: KeePass databases

  • office2john: MS Office documents

Find conversion tools:

locate *2john*

Monitoring Progress

Check cracking progress:

john --show <hash_file>

Results Storage

  • Cracked passwords stored in: ~/.john/john.pot

Protection Measures

  • Implement strong password policies

  • Use multi-factor authentication

  • Monitor for breaches using tools like HaveIBeenPwned

  • Avoid password reuse across platforms

  • Regular password updates, especially after breaches

  • Implement proper hashing and salting mechanisms

Additional Resources

  • Learn about hash algorithms and their security

  • Study common password patterns and avoid them

  • Keep up with latest password security standards

PreviousFirewall and IDS/IPS EvasionNextRemote Password Attacks

Monitor your email for breaches:

HaveIBeenPwned