forked from lanjelot/kb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcrypto
68 lines (54 loc) · 2.41 KB
/
crypto
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
# crypto
# pkcs structures
http://www.cem.me/pki/index.html
# tools
CrypTool
CryptoCrack
https://gchq.github.io/CyberChef/
# great resources
http://crypto.interactive-maths.com/
http://practicalcryptography.com/cryptanalysis/
http://rumkin.com/tools/cipher/
http://www.moserware.com/2009/09/stick-figure-guide-to-advanced.html (aes well explained)
# Forward Secrecy.
With this feature enabled, each connection uses separate encryption keys, which means that the encrypted data remains safe if the server private key is compromised.
# wordpress cookie
cookie: $username|$expiry|$hmac
key = wp_hash($username . $expiration) # based on wordpress SECRET_KEY
hash_hmac('md5', $username . $expiry, $key) == $hmac
following values will generate same hash:
admin1 1353464343
admin 11353464343
# hash length extension
https://blog.whitehatsec.com/hash-length-extension-attacks/
http://www.vnsecurity.net/2010/03/codegate_challenge15_sha1_padding_attack/
https://blog.skullsecurity.org/2012/everything-you-need-to-know-about-hash-length-extension-attacks
Given an application that prepends a secret to a string before hashing it, the application is vulnerable if an attacker knows both the string and the hash. The attacker is able to append extra information to the original string and still generate a valid hash from it without knowing the secret. In a query, the extra data that is appended is given preference over the original data.
https://github.com/stephenbradshaw/hlextend
https://github.com/bwall/HashPump
https://github.com/iagox86/hash_extender
# substitution ciphers
* monoalphabetic
caesar/rot: for i in {0..25}; do echo "Ackkmaa" | /usr/games/bin/caesar $i ; done
* polyalphabetic
vigenere
autokey
porta (13 alphabet instead of 26 like vigenere)
...
anagram
online cryptogram solver: http://quipqiup.com/
google SCBSolver
best results with tools/crypto/practicalcryptography.com/*.py (e.g. tools/crypto/pygenere's VigCrack.crack_codeword fails when ciphertext too small)
# transposition cipher
scytale
rail fence
route
columnar transposition (break_coltrans.py) unlikely if there are no many vowels
# xortool
github.com/hellman/xortool: use -c 00 for encrypted binaries, -c ' ' for texts (sometimes fails to find correct xor key)
# XORsearch
https://blog.didierstevens.com/?s=xorsearch
# ADVGVX
ciphertext only consists of these letters
# scrambler
if the algo is cyclic, keep running the ciphertext through the scramler until output makes sense