syselement's Blog
🏠 Home BlogXGitHub📚 Buy Me a Book📧 Contact
  • 🏠Home
  • 🔳Operating Systems
    • 🐧Linux
      • 📃Everything Linux
      • Linux Distros
        • Kali Linux - VM
        • ParrotOS - VM
        • Rocky Linux
        • Ubuntu Desktop - VM
        • Ubuntu Server - VM
      • Linux Tools
        • BookStack
        • Nessus Essentials
        • SysReptor
        • Terminator
        • UniFi
        • Zsh & Oh-My-Zsh
    • 🪟Windows
      • 📃Everything Windows
      • Windows Tools
        • Hashcat
        • Vagrant
      • Windows Virtual Machines
        • Windows 11 - VM
        • Windows Server 2025 - VM
  • 📝Courses Notes
    • eLearnSecurity / INE
      • eJPT - PTSv2
      • eMAPT
      • ICCA
    • Practical Networking
      • Practical TLS
        • TLS/SSL Overview
        • Cryptography
        • x509 Certificates and Keys
        • Security through Certificates
        • Cipher Suites
        • TLS/SSL Handshake
        • TLS Defenses
        • TLS Attacks & Vulnerabilities
        • What's new in TLS 1.3?
        • TLS 1.3 Under the Hood
        • TLS 1.3 Extensions
        • 🌐Practical TLS References
    • TCM Security
      • Linux101
      • MAPT
      • PEH
  • 🖥️Cyber Everything
    • 📌Generic Resources
      • Cryptography
      • CVSS 3.1
      • Cyber Threat Intelligence (CTI)
    • 📱Mobile
      • Apps Lab
        • Android Rooting Guide
        • iOS Jailbreak Guide
        • Intercepting Android App Traffic
      • OWASP MAS
        • MASTG Techniques
        • MASTG Tests
        • MASTG Theory
        • MASVS Notes
      • Tools
        • MobSF
    • 🧬Network
      • Commands
        • Linux Privesc Commands
        • Networking Commands
    • 🌐Web
      • API
        • API Sec Fundamentals
        • API Penetration Testing
      • PortSwigger Academy
        • Server-Side Topics
        • Client-Side Topics
        • Advanced topics
        • 🔬Vulnerability Labs
    • ✍️Writeups & Walkthroughs
      • 🌩️TryHackMe
        • 📖Learn
          • Cyber Threat Intelligence
          • Intro to Defensive Security
          • Juice Shop
          • Upload Vulnerabilities
        • 🎯Practice
          • Easy
            • Blaster
            • Blue
            • Bolt
            • Chill Hack
            • Ice
            • Ignite
            • Retro
            • Startup
          • Medium
            • Blog
      • 📦HackTheBox
      • 🚩Capture The Flag
  • ♾️DevOps Everything
    • 🔗DevOps Resources
      • Introduction to DevOps
      • Ansible
      • Docker
      • Git
      • Kubernetes
      • Terraform
      • Vim
  • 🔬Home Lab
    • 🖥️Hypervisors
      • Hyper-V
        • Windows WSL
      • Proxmox
        • Proxmox VE
        • Proxmox Upgrade 7 to 8
      • VMware
        • VMware Workstation Pro
    • 🔴Offensive Labs
      • Hashcat Password Cracking
      • Metasploitable3
    • 🔵Defensive Labs
      • Detection Lab
    • ⚪Misc Labs
      • Bitwarden On-Premise
      • OpenWrt & WiFi Exploitation
      • Passbolt CE - Ubuntu Server
Powered by GitBook
On this page
  • 🌐 Resources 🔗
  • Tools
  • Theory
  • Commands
  • Hash cracking

Was this helpful?

Edit on GitHub
  1. Cyber Everything
  2. Generic Resources

Cryptography

PreviousGeneric ResourcesNextCVSS 3.1

Last updated 3 months ago

Was this helpful?


🌐 Resources 🔗

Tools


Theory

  • Hashing is a process that transforms input data into a unique hash value, a fixed-length string of characters, also known as a digest. This hash value serves as a unique representation of the original data, and even a minor modification in the data will result in a different hash value. Unlike encryption or encoding, hashing is a one-way process, meaning the original data cannot be recovered from the hash.

    • Computer science - Polynomial Time (e.g. hashing algorithm = reasonable time) vs Non-deterministic Polynomial Time (e.g. un-hashing algorithm = long time)

    • Some hashing algorithms: MD4, MD5, SHA1, NTLM, etc

Word: "white"

MD4		76b737528246b908e6817dd81bd41e5d
MD5		d508fe45cecaf653904a0e774084bb5c
SHA1	528cef87d0bfb947548ab94679d1e5765f19089a
SHA256	018fa96a44715c90bf93be148069cb28dd45d398f2cc75aa1565311f6e55d174
  • Encoding is used to convert data into a different format to ensure compatibility with a particular system. Common encoding methods for the English language include ASCII, UTF-8, UTF-16, UTF-32, ISO-8859-1, and Windows-1252. UTF-8, UTF-16, and UTF-32 are Unicode encodings capable of representing characters from various languages, such as Arabic and Japanese.

  • Encryption is the only method that safeguards data confidentiality by using a cryptographic cipher and a key. This process is reversible, as long as the cipher is known and the key is accessible.


Commands

ssh-keygen

gpg --import <yourkey>.key
gpg --decrypt <message>.gpg

hexdump -C <file.txt>
md5sum <file.txt>
sha1sum <file.txt>
sha256sum <file.txt>
sha512sum <file.txt>

cat /etc/shadow
# Encrypted password:
# $prefix$options$salt$hash
man 5 crypt

echo "Text" | base64
echo "EncodedText" | base64 -d

Hash cracking

john

# John the Ripper
john <options> <file with hashes>
john --list=formats
cat /usr/share/john/john.conf | grep -i rules

john --wordlist=<path to wordlist> <path to file>
john --format=<format> --wordlist=<path to wordlist> <path to file>
# e.g.
john --wordlist=/usr/share/wordlists/rockyou.txt hash_to_crack.txt
john --format=raw-md5 --wordlist=/usr/share/wordlists/rockyou.txt hash_to_crack.txt

# Crack Windows authentication hashes
# e.g.
john --format=NT --wordlist=/usr/share/wordlists/rockyou.txt ntlm_to_crack.txt

# Crack /etc/shadow hashes
unshadow <path to passwd> <path to shadow>
# e.g.
unshadow local_passwd local_shadow > unshadowed.txt
john --format=sha512crypt --wordlist=/usr/share/wordlists/rockyou.txt unshadowed.txt

# Single crack mode & mangling rules
john --single --format=<format> <path to file>

# Crack password-protected Zip/RAR files
zip2john <options> <zip file> > <output file>
rar2john <rar file> > <output file>
# e.g.
zip2john zipfile.zip > zip_hash.txt
rar2john rarfile.rar > rar_hash.txt
john --wordlist=/usr/share/wordlists/rockyou.txt zip_hash.txt

# Crack SSH keys
ssh2john <id_rsa private key file> > <output file>
# e.g.
ssh2john id_rsa > id_rsa_hash.txt
john --wordlist=/usr/share/wordlists/rockyou.txt id_rsa_hash.txt

🖥️
📌
Cryptography Basics - TryHackMe
Public Key Cryptography Basics - TryHackMe
Hashing Basics - TryHackMe
Introduction to Cryptography
CryptoBook
CryptoHack – A fun, free platform for learning cryptography
What is encryption? - Cloudflare
Wolfram|Alpha
Modular arithmetic - Britannica
RSA Encryption - Brilliant
Diffie-Hellman - Brilliant
What is SSH? - Cloudflare
Digital signature
CA/Included Certificates - MozillaWiki
net/data/ssl/chrome_root_store/root_store.md
The GNU Privacy Guard
Email Self-Defense
SHA - Brilliant
Peter Selinger: MD5 Collision Demo
SHAttered - Collision attack
Common Password List - rockyou.txt - Kaggle
Understanding RockYou.txt: A Tool for Security and a Weapon for Hackers - Keeper
What is a rainbow table attack and how to prevent it? - Proton
HMAC (Hash-Based Message Authentication Codes) Definition - Okta
HMAC
pyca/cryptography
dCode - Online Ciphers, Solvers, Decoders, Calculators
RsaCtfTool
rsatool
CyberChef
gpg
CrackStation - Online Password Hash Cracking
Hashes.com - hash decryptor
Hashes.com - hash identifier
Free Online Encoding Tools For Developers - FreeFormatter.com
hashID
hashcat
John the Ripper
John the Ripper jumbo
John the Ripper - wordlist rules syntax
hash-identifier