Offline password attacks
In contrast to online password attacks, offline attacks assume that the attacker already has access to password hashes. This may occur as a result of a database leak or unauthorized access to a compromised system. Password candidates are then tested locally, completely independent of the original system’s protection mechanisms.
A cryptographic hash function represents a one-way function that maps input data of arbitrary size to a fixed-length value. Recovering a password therefore does not mean “reversing” the hash, but rather finding an input that produces the same hash value.
Key Success Factors
The success of an offline attack primarily depends on three factors:
-
Computational Power:
The more processing power is available, the more password candidates can be tested per second. Modern GPUs enable massive parallelization and can reach billions of attempts per second for simple hash functions. -
Password Strength:
As password length and complexity increase, the search space grows exponentially. This significantly increases the time required for a successful attack. -
Hash Algorithm:
Traditional functions such as MD5 or SHA-1 are computationally efficient and therefore particularly vulnerable. Modern algorithms such as bcrypt, scrypt, or Argon2 deliberately increase computational and memory cost (key stretching), significantly slowing down attacks.
The Role of Salt and Collisions
Cryptographic hash functions are designed such that it is practically infeasible to generate collisions, meaning two different inputs that result in the same hash value. However, for password attacks, this property is of limited relevance. In practice, attackers do not search for arbitrary collisions but attempt to recover the original password through systematic guessing.
A key defensive mechanism is the use of a salt. A salt is a random value that is combined with the password before hashing. This ensures that identical passwords do not produce identical hashes.
In addition, salt prevents the efficient use of precomputed attacks such as rainbow tables, since separate computations are required for each hash. As a result, attack results cannot be reused across different datasets.
Tools and Specialized Techniques
In practice, various tools are used, each with specific strengths:
-
hashcat:
Considered the standard tool for high-speed password cracking due to its strong GPU support. -
John the Ripper (JtR):
Known for its flexibility and support for a wide range of hash formats, including less common ones. It is often used for CPU-based analysis and as a complement to other tools. -
Rule-based Attacks:
Instead of using static wordlists, rules are applied to systematically modify words, for example by replacing characters, appending numbers, or inserting special characters. This approach closely models real-world password patterns and is often more effective than pure brute force. -
Rainbow Tables and Specialized Tools:
Tools such as Ophcrack use precomputed tables to quickly resolve hashes. This technique is only effective for outdated or unsalted hash schemes (e.g., LM hashes) and is largely irrelevant in modern systems. -
CyberChef:
A versatile tool for quickly identifying hash types and performing basic cryptographic analysis and data preparation.
Conclusion
Offline password attacks are highly efficient, as they are not limited by network latency or defensive mechanisms such as rate limiting or account lockouts. Once an attacker gains access to password hashes, security primarily depends on password strength and the quality of the hashing algorithm used.
Modern hashing algorithms combined with strong passwords can increase the cost of an attack to the point where it becomes practically infeasible.
Sub Articles
Pentest Training
Take a look at the pentest training chapters and learn penetration testing:
- Preface
- Introduction
- Legal Framework
- Hacking vs. Penetration Testing
- Classification
- Meaningfulness of Penetration Tests
- Penetration Testing Standards
- The Hacking Guide
- Hacking I: Scanning networks
- Hacking II: Password attacks
- Hacking III: Web application attacks
- Hacking IV: Privilege Escalation
- Hacking V: Tunnelling Techniques
- Hacking VI: Vulnerability scanner and penetration testing frameworks
- Demonstration of a Penetration Test
- Risk Assessment of Identified Vulnerabilities
- Structure of Documentation and Reporting
- Insider stories: Tales from Dubius Payment Ltd.
binsec academy GmbH – Advanced Pentest Training Lab
binsec academy GmbH operates the Pentest Training Lab, a highly practical online platform dedicated to real penetration testing. Simulating complex corporate networks and advanced real-world attack scenarios within isolated lab environments, it is engineered to sharpen the skills of aspiring and professional penetration testers. Upon conquering our rigorous, fully practical examination, participants earn the distinguished Binsec Academy Certified Pentest Professional (BACPP) designation — proving their technical capability to methodically uncover and evaluate vulnerabilities in modern IT infrastructures.
Explore the Pentest Training Lab
binsec GmbH – Experts in Penetration Testing
As the operative pentesting core of the binsec group, binsec GmbH has provided high-end, human-led penetration testing since 2013. Rejecting automated scans, our permanently employed, certified senior pentest experts deliver manual deep-dive assessments of web applications, APIs, mobile apps, complex network infrastructures, cloud environments, and advanced red team simulations. Specializing in high-regulation sectors like Payment, Banking, and Healthcare, we provide clear risk evaluations and actionable reports to effectively assess your business-critical systems.
Get Manual Expert Penetration Testing Services