You are here: Links of Interest » HEIG-VD » [SLO] Sécurité Logicielle » Labo 03 - Crackme
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
heig:slo:labo03 [2016/04/18 13:14] – [Crackme 2] Laureline David | heig:slo:labo03 [2016/04/19 17:40] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
===== Crackme 1 ===== | ===== Crackme 1 ===== | ||
- | ... | + | This crackme uses straight up '' |
+ | **Solution: | ||
+ | |||
+ | **Vulnerability: | ||
===== Crackme 2 ===== | ===== Crackme 2 ===== | ||
+ | |||
+ | This crackme uses a custom hashing algorithms to check the validity of the password. XORing all the bytes of the password together must equal to '' | ||
+ | |||
+ | **Solution: | ||
+ | |||
+ | **Vulnerability: | ||
<uml> | <uml> | ||
- | :var1 = 0 [esp+18h]; | ||
- | while (var1 ≤ 7) | ||
- | :edx = password[var1]; | ||
:eax = argv[1]; | :eax = argv[1]; | ||
- | if (strcmp(eax, | ||
- | :var1++; | ||
- | else (0) | ||
- | :fail: Lamer; | ||
- | end | ||
- | endif | ||
- | endwhile | ||
- | :eax = argv[1]; | ||
- | if (strlen(eax)) then (> 7) | ||
:var1 = 0; | :var1 = 0; | ||
:var2 = 0; | :var2 = 0; | ||
Line 30: | Line 27: | ||
if (var2 = 0x56) then | if (var2 = 0x56) then | ||
:win!; | :win!; | ||
+ | stop | ||
else | else | ||
:fail!; | :fail!; | ||
+ | end | ||
endif | endif | ||
+ | </ | ||
+ | |||
+ | ===== Crackme 3 ===== | ||
+ | |||
+ | This crackme uses SHA1 to check the validity of the password. | ||
+ | |||
+ | **Solution: | ||
+ | |||
+ | **Vulnerability: | ||
+ | |||
+ | <uml> | ||
+ | :DIGEST = 1b6004ce49ab73225720b82d36eaaa4d6e511034; | ||
+ | if (solution to crackme1) then (yes) | ||
end | end | ||
- | else | + | endif |
- | :fail: Joke; | + | if (solution to crackme2) then (yes) |
+ | end | ||
+ | endif | ||
+ | :hsh = SHA1(argv[1]); | ||
+ | :v1 = 0; | ||
+ | :v2 = 0; | ||
+ | while (v1 ≤ 19) | ||
+ | :v2 |= hsh[v1] ^ DIGEST[v1]; | ||
+ | :v1++; | ||
+ | endwhile | ||
+ | if (v2 == 0) then (yes) | ||
+ | :echo " | ||
+ | else (no) | ||
+ | :fail; | ||
end | end | ||
endif | endif | ||
+ | stop | ||
</ | </ |