EG Information

Main Index
EG Manual
Disclaimer
Legal Information
Hall of Fame
Hall of Shame
Member Rankings
Members List
Meet the Staff
Hacker's Home Page
IRC Flash Chat

Training Missions

Read Me First
Basic Skills
Realistic Scenarios
Cryptography
Software Cracking
Linux ELF Binary Cracking
Logical Thinking
Programming
Captcha Cracking
Patching
Steganography
Deface This Wall
/dev/null
/dev/urandom
/dev/extra

Knowledge Bank

Discussion Forums
Exploit Database New
PasteBin New
RSS Feeds RSS
Articles / Tutorials
Videos
Online EG MP3 Player Radio
Downloads
Tools

Code Resources

Submit Code
Ajax
ASM
Bash
C
CPP
Csharp
Delphi
Haskell
Java
Javascript
Jython
Lisp
mIRC
MySQL
Perl
PHP
Python
QBASIC
VisualBasic

Pimp Us Out!

Review enigmagroup.org on alexa.com

Has Enigma Group Helped You? Then Help Us By Advertising For Us. Place One Of The Following Images On Your Site And Create A Link Back To Enigma Group.

Enigma Group

Enigma Group

Enigma Group

Enigma Group
 

Enigma Group's Articles



Return to Category Selection

Intro to hashes - Submitted By: st3alth 2011-07-16 10:13:38
Hello, this article will cover the topic of hashing. A hash is the product of a hashing function, and hashing functions are encryption algorithms, specifically one-way encryption. Now this means that one cannot directly decrypt it. In order to find the plain text value of a hash, you must use the same hashing function on various plain text strings, this is known as “cracking a hash”. Hashes can also be called message digests, hence names like MD5(more on that later.) Now there are some issues with hashing, a big one being collisions. Basically this means multiple inputs can have identical output. We'll get into that in a bit.

   So now that you know what a hash is, lets talk about some different algorithms that are in use. First I will talk about MD5, which I mentioned earlier. MD5 outputs a 32 character long encrypted string. MD5 is considered to be insecure, as the algorithm has been found to generate a large amount of collisions. SHA-1 is another algorithm which is commonly used, considered better than MD5 but was discovered to have many collisions as well. This was determined in a cryptanalysis attack in 2008, run by Stephane Manuel. The recommended algorithms are SHA-256 & SHA-512. For more algorithms, check the bottom of this document.

   A good habit to have when hashing is using a salt. A salt is a short string of characters encrypted in addition to the data being hashed. This can be done in many ways, some salted hash functions Ive seen used are:
   
                                                        Examples
md5(md5($pass).$salt)
md5($salt.$pass)
md5($pass.$salt);

Now we'll talk about identifying and cracking hashes. In order to crack these hashes you will need to code/download a hash cracker. I recommend John the Ripper, found at http://www.openwall.com/john/. John usually is able to detect the type of hash in use. Now, the drawback of pre-made crackers is when you run into custom algorithms, in which case if you know what they used, you can rather easily code a cracker for said algorithms. For John simple put the password in a text file with this syntax:
Username:Hash. Then fire up john either with a wordlist or brute force. Since this is not a tutorial for John the Ripper I will not explain in detail. Here is a table with various algorithms and their hash length.

   
Algorithm     Output length
MD5                   32
SHA1                 41
SHA 256(Unix)    55
SHA 512(Unix)    98
DES                   13

   An easy way to identify SHA 256 is to check if the hash begins with $5$, or $6$ for SHA 512.
DES is used in apache .htpasswd files, which I believe is the most common use of DES. MD5 and SHA-1 are used heavily across the internet, although they are considered less secure than the recommendation.  

   I hope I have helped you understand Hashing, and how to identify them. At this point you should be more aware of how to use hashes that are hard to crack and how to crack them. Before I sign off, I have one more thing to say, and that is to ALWAYS use a salt in your hashes. Hope you found this useful.
   

   st3alth

Return to Category Selection
Comment By: skid225 2011-07-16 11:23:54
Very nice article great idea for a topic :D

Comment By: myne17 2011-08-07 13:15:27
thanks!!! sir st3alth

Comment By: AlwaysAStudent 2011-08-12 14:11:04
Thanks for the input!

Comment By: Conch 2012-08-11 20:09:42
This is awesome, I'm trying to find out more information on Hashes. Thanks!

Comment By: fatal 2012-09-11 00:08:52
Great article, I learned a little bit. I'm still a little confused about salting though. I don't really understand how those functions work. Or how I would go about finding which part of a hash is the salt.

Comment By: lol 2012-10-18 05:23:46
Sir st3alth. :D

Comment By: rlongersle 2012-12-06 09:07:08

Comment By: rlongersle 2012-12-06 09:07:10

Comment By: rlongersle 2012-12-06 09:07:11

Comment By: mori 2013-01-14 07:47:57
Very nice.

If you wish to submit a comment, you must be a registered member and logged in.

Login or Register.



Return to Category Selection

 

Who Visited EnigmaGroup Today?

1650 Guests, 164 Users (204 Spiders)
eusouumpeixe, Red, bbml, sernaval, seichi, Megji, jp367, Wade, 13thd4y, proman, edeck, timeout, GothicLogic, akhil, tamari, Prestige, itsukiminami2, Kahlzof, tyzer200946, cls777, yop, SamGrant23, mittal_palash, iHaxMatt, nullset, dnoz78, Evil1, archestraty, babysealslippers, Anonanonamous, Arrow of time, anandbhala, cronix91, angelicstrike, f879550@rmqkr.net, AlexDxel, nenf, Ghosterr, Erebeos, Telv1n, nerd, s4cr3ds3cr3t, Ausome1, xthomd, ma7ir, dark_void, Doraga, Raell, IJspegeltje, pasuanluhalu, d3krepit, statix, Th3Pr0ph3t, zik-rock, doublebb, st3alth, Pelthrund, Craylien, rinkiyoshikinjo, sepra, mayur, leonheart, Annumbo, JaRam, lolliver, Dodoo, blackbird, cor3dump, suplolx, Ultraminor, Rex_Mundi, jsabina, vipro, Abhinav2107, ExpDel, unholyblood, Philmore, Null Set, nagyzsomborg, Zecklar, Debsxxx39, kernel_mod, Futility, mustafa, Acid-Rain, ropopopo, gosu1, Pamimantini, obm0rok, micsan, MaxMeier, psychomarine, zediwon, morpheus5177, potato18, N4g4c3N, cmczboy, TenthOfApril, Marko Bijelic, Musbell, mahesh, Arkz.Ruby, jodylan, Arc, Nightraven, tulu, Moff, PrinceLordPrime, squidgy23, HarikaMurthy, djaakrlacl, qty92, rgrgrg, hackaday, kaitou_kid, scramer, Ce1tic 13h0y, Alberto, ghost walker, CodeAlien, ellisp, javawitness, Anonymousfigure, mrcr4cker, Titan1580, f0gh0rn, germeniusz, easiestripes, sub_zero, harsh419heavy, hatharry, Arsenal, lol, hawkeyes, 4lb47r055, patate49, tcroft, Xeneph, fatal, Psiber_Syn, RedEvolution, Resu Amgine, booooore1, WarSnail, Partisan, Javar2698, smokeface, riker987, VivisClone, apackofgiraffes, CGDJ, asdf12345, zombiehack640, killr00t, Celestial, 1.61803399, elapache2001, bubba241991, anupammeht, NexusQ, IntoxicatedDog, derpaton, matewan, Robbie
 
Enigma Group