-
Notifications
You must be signed in to change notification settings - Fork 0
/
Hashing - Crypto 101
117 lines (86 loc) · 4.35 KB
/
Hashing - Crypto 101
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#Task 1 Key Terms
Before we start, we need to get some jargon out of the way.
Read these, and take in as much as you can. We'll expand on some of them later in the room.
Plaintext - Data before encryption or hashing, often text but not always as it could be a photograph or other file instead.
Encoding - This is NOT a form of encryption, just a form of data representation like base64 or hexadecimal. Immediately reversible.
Hash - A hash is the output of a hash function. Hashing can also be used as a verb, "to hash", meaning to produce the hash value of some data.
Brute force - Attacking cryptography by trying every different password or every different key
Cryptanalysis - Attacking cryptography by finding a weakness in the underlying maths
This room will likely involve some research. Get good at using search engines, it's crucial to infosec.
- Read the words, and understand the meanings!
Is base64 encryption or encoding?
encoding
#Task 2 What is a hash function?
What is the output size in bytes of the MD5 hash function?
hint:128 bit= 16 bytes
16
- Can you avoid hash collisions? (Yea/Nay)
Nay
- If you have an 8 bit hash output, how many possible hashes are there?
hint: 2^8
256
#Task 3 Uses for hashing
-Crack the hash "d0199f51d2728db6011945145a1b607a" using the rainbow table manually.
hint:https://md5hashing.net/search?q=d0199f51d2728db6011945145a1b607a
basketball
- Crack the hash "5b31f93c09ad1d065c0491b764d04933" using online tools
hint: search https://md5hashing.net/hash/md5/5b31f93c09ad1d065c0491b764d04933
tryhackme
- Should you encrypt passwords? Yea/Nay
Nay
#Task 4 Recognising password hashes
- How many rounds does sha512crypt ($6$) use by default?
hint: https://blog.michael.franzl.name/2016/09/09/hashing-passwords-sha512-stronger-than-bcrypt-rounds/
5000
- What's the hashcat example hash (from the website) for Citrix Netscaler hashes?
hint: https://hashcat.net/wiki/doku.php?id=example_hashes
search citrix
1765058016a22f1b4e076dccd1c3df4e8e5c0839ccded98ea
- How long is a Windows NTLM hash, in characters?
hint: You can get the result by counting the letters of this hash value.
32
#Task 5 Password Cracking
- Crack this hash: $2a$06$7yoU3Ng8dHTXphAg913cyO6Bjs3K5lBnwq5FJyA6d01pMSrddr1ZG
hint: https://www.tunnelsup.com/hash-analyzer/
view Hash type: bcrypt
linux: hashcat -h | grep -iF "bcrypt"
windows: hashcat --help | findstr bycrypt
win:.\hashcat.exe -m 3200 '$2a$06$7yoU3Ng8dHTXphAg913cyO6Bjs3K5lBnwq5FJyA6d01pMSrddr1ZG' .\rockyou.txt
linux hashcat -m 3200 '$2a$06$7yoU3Ng8dHTXphAg913cyO6Bjs3K5lBnwq5FJyA6d01pMSrddr1ZG' /usr/share/wordlist/rockyou.txt
85208520
- Crack this hash: 9eb7ee7f551d2f0ac684981bd1f1e2fa4a37590199636753efe614d4db30e8e1
hint: https://www.tunnelsup.com/hash-analyzer/
https://tools.kali.org/password-attacks/hash-identifier
hash-identifier
9eb7ee7f551d2f0ac684981bd1f1e2fa4a37590199636753efe614d4db30e8e1
sha2-256
or pip install hashid
hashid -m 9eb7ee7f551d2f0ac684981bd1f1e2fa4a37590199636753efe614d4db30e8e1
[+] SHA-256 [Hashcat Mode: 1400]
.\hashcat.exe -m 1400 '9eb7ee7f551d2f0ac684981bd1f1e2fa4a37590199636753efe614d4db30e8e1' .\rockyou.txt
halloween
- Crack this hash: $6$GQXVvW4EuM$ehD6jWiMsfNorxy5SINsgdlxmAEl3.yif0/c3NqzGLa0P.S7KRDYjycw5bnYkF5ZtB8wQy8KnskuWQS3Yr1wQ0
hint: https://www.onlinehashcrack.com/hash-identification.php
- SHA-512 Crypt
.\hashcat.exe --help | findstr sha512
.\hashcat.exe -m 1800 '$6$GQXVvW4EuM$ehD6jWiMsfNorxy5SINsgdlxmAEl3.yif0/c3NqzGLa0P.S7KRDYjycw5bnYkF5ZtB8wQy8KnskuWQS3Yr1wQ0' .\rockyou.txt
spaceman
- Bored of this yet? Crack this hash: b6b0d451bbf6fed658659a9e7e5598fe
hint: https://www.tunnelsup.com/hash-analyzer/
https://www.onlinehashcrack.com/hash-identification.php
hashid -m b6b0d451bbf6fed658659a9e7e5598fe
https://md5hashing.net/hash/md5/b6b0d451bbf6fed658659a9e7e5598fe
rockyou
funforyou
#Task 6 Hashing for integrity checking
- What's the SHA1 sum for the amd64 Kali 2019.4 ISO? http://old.kali.org/kali-images/kali-2019.4/
hint: http://old.kali.org/kali-images/kali-2019.4/SHA1SUMS
186c5227e24ceb60deb711f1bdc34ad9f4718ff9
- What's the hashcat mode number for HMAC-SHA512 (key = $pass)?
.\hashcat.exe --help | findstr HMAC-SHA512
hashcat --help | grep HMAC-SHA512
or https://hashcat.net/wiki/doku.php?id=example_hashes
1750
https://tryhackme.com/room/hashingcrypto101
https://fthcyber.com/2020/09/28/hashing-crypto-101-writeup-tryhackme/
https://www.thedutchhacker.com/hashing-crypto-101/