"I accidentally discovered I could predict password patterns with 84% accuracy. Then I realized what this meant for crypto wallets."
This repository contains research demonstrating how password pattern analysis combined with timing attacks can compromise cryptocurrency wallets with devastating accuracy. What started as procrastination during my thesis became a critical security discovery with implications for Web3 security.
- 84% accuracy in predicting password patterns from minimal data
- Millisecond timing vulnerabilities in 2FA implementations
- $2.5+ billion stolen using these techniques
- Zero recourse for victims in cryptocurrency ecosystem
Password Pattern + Timing Attack + Social Engineering = Complete Account Compromise
Traditional security assumes passwords are random. They're not. Humans follow patterns:
Password123βPassword124βPassword125John2021!βJohn2022!βJohn2023!ilovesarahβilovesar@hβ1love$arah
Combine this with timing attacks that leak authentication states in milliseconds, and cryptocurrency's irreversible transactions create a perfect storm for attackers.
- Markov chain implementation for password prediction
- PCFG (Probabilistic Context-Free Grammar) parser
- Neural network models for pattern recognition
- Real-world breach data analysis tools
- Vulnerable authentication server example
- Timing measurement tools
- Constant-time algorithm implementations
- Attack simulation scripts
- Secure password generation (Diceware, BIP-39)
- Multi-signature wallet implementations
- Hardware security module integrations
- Security audit checklists
# Required
- Python 3.8+
- Rust 1.70+
- Node.js 16+
# Optional
- CUDA toolkit (for GPU-accelerated cracking)
- Hardware wallet for testing# Clone the repository
git clone https://github.com/yourusername/password-pattern-research.git
cd password-pattern-research
# Install dependencies
pip install -r requirements.txt
npm install
cargo build --release
# Run the demo
python demo.py
# Launch the interactive website
npm run servepassword-pattern-research/
βββ π README.md # You are here
βββ π LICENSE # MIT License
βββ π SECURITY.md # Security policy & disclosure
βββ π CONTRIBUTING.md # How to contribute
βββ π CODE_OF_CONDUCT.md # Community guidelines
βββ π .gitignore # Git ignore rules
βββ π index.html # Interactive research website
βββ π docs/ # Documentation
β βββ technical-paper.pdf # Full research paper
β βββ setup-guide.md # Detailed setup instructions
β βββ api-reference.md # Code documentation
βββ π src/ # Source code
β βββ pattern-analysis/ # Pattern detection algorithms
β βββ timing-attacks/ # Timing vulnerability demos
β βββ defense/ # Security implementations
βββ π data/ # Sample data (anonymized)
β βββ patterns.json # Common password patterns
β βββ timing-results.csv # Timing attack measurements
βββ π tests/ # Test suites
βββ π examples/ # Usage examples
Our research shows that with just 1% of a website's passwords:
# Simplified pattern detection
def detect_pattern(password_list):
patterns = extract_base_patterns(password_list)
mutations = identify_mutations(patterns)
return predict_next_password(mutations)
# Accuracy: 84% on test datasets// Vulnerable code (DO NOT USE)
if (provided_token === stored_token) {
return true; // Timing leak!
}
// Secure implementation
function constantTimeCompare(a, b) {
let result = 0;
for (let i = 0; i < a.length; i++) {
result |= a.charCodeAt(i) ^ b.charCodeAt(i);
}
return result === 0;
}- Use hardware wallets with secure elements
- Implement multi-signature schemes (2-of-3 minimum)
- Generate passwords with true entropy (Diceware/BIP-39)
- Audit timing vulnerabilities in all auth flows
- Train teams on social engineering tactics
- Monitor for anomalous access patterns
We welcome contributions! Please see CONTRIBUTING.md for:
- Code of conduct
- Development setup
- Submission guidelines
- Security disclosure policy
This research is published for defensive purposes. If you discover vulnerabilities:
- Do NOT exploit them
- Report via SECURITY.md
- Allow 90 days for patches
- Claim bug bounties ethically
This project is licensed under the MIT License - see LICENSE for details.
- ODNI colleagues who highlighted real-world implications
- Cryptocurrency security researchers
- Breach dataset providers (anonymized)
- Hardware wallet manufacturers for collaboration
- The procrastination that started it all
- Research Inquiries: Tarruck@stanford.edu
- Security Reports: (https://github.com/TarruckWheeler)
- Linkedin: (https://www.linkedin.com/in/tarruck/)
- GPG Key: [0xYOURKEYID]
β‘ Remember: In crypto, there's no fraud department to call. Security is everything.
Made with β and many sleepless nights by @yourusername