The number is prime. The hexadecimal representation of this number is an English word (according to m-w.com). What four digit number matches these criteria?
When you think of spies and secret agents, you might think of lots of things; nifty gadgets, foreign travel, dangerous missiles, fast cars and being shaken but not stirred. You probably wouldn't think of mathematics. But you should.
Cracking codes and unravelling the true meaning of secret messages involves loads of maths, from simple addition and subtraction, to data handling and logical thinking. In fact, some of the most famous code breakers in history have been mathematicians who have been able to use quite simple maths to uncovered plots, identify traitors and influence battles.
The Roman Geezer
Let me give you an example. Nearly 2000 years ago, Julius Caesar was busy taking over the world, invading countries to increase the size of the Roman Empire. He needed a way of communicating his battle plans and tactics to everyone on his side without the enemy finding out. So Caesar would write messages to his generals in code. Instead of writing the letter 'A', he would write the letter thatcomes three places further on in the alphabet, the letter 'D'. Instead of a 'B', he would write an 'E', instead of a 'C', he would write an 'F' and so on. When he got to the end of the alphabet, however, he would have to go right back to the beginning, so instead of an 'X', he would write an 'A', instead of a 'Y', he'd write a 'B' and instead of 'Z', he'd write a 'C'.
Complete the table to find out how Caesar would encode the following message:
When Caesar's generals came to decipher the messages, they knew that all they had to do was go back three places in the alphabet. Have a go at trying to work out these messages which could have been sent by Caesar or his generals:
uhwuhdw wr iruhvw
Easy as 1, 2, 3
This all seems very clever, but so far it's all been letters and no numbers. So where's the maths? The maths comes if you think of the letters as numbers from 0 to 25 with A being 0, B being 1, C being 2 etc. Then encoding, shifting the alphabet forward three places, is the same as adding three to your starting number:
For example, encoding the letter 'A' is 0+3=3, which is a 'D'.
Coding 'I' is: 8+3=11, which is 'L'.
However, you do have to be careful when you get to the end of the alphabet, because there is no letter number 26, so you have to go back to number 0. In maths we call this 'MOD 26', instead of writing 26, we go back to 0.
Have a go at coding your name by adding 3 to every letter. Then have a go at coding your name by shifting the alphabet forward by more places by adding greater numbers eg adding 5, then adding 10. Then have a go at decoding. If your letters are numbers and encoding is addition, then decoding is subtraction, so if you've coded a message by adding 5, you will have to decode the message bysubtracting 5.
If you've got the hang of coding messages by shifting the alphabet forward, then you might have realised that it is actually pretty simple to crack this type of code. It can easily be done just by trial and error. An enemy code breaker would only have to try out 25 different possible shifts before they were able to read your messages, which means that your messages wouldn't be secret for verylong.
So, what about coding messages another way? Instead of writing a letter, we could write a symbol, or draw a picture. Instead of an 'A' we could write *, instead of a 'B' write + etc. For a long time, people thought this type of code would be really hard to crack. It would take the enemy far too long to figure out what letter of the alphabet each symbol stood for just by trying all the possiblecombinations of letters and symbols. There are 400 million billion billion possible combinations!
This type of code was used by Mary Queen of Scots when she was plotting against Elizabeth the First. Mary wanted to kill Elizabeth so that she herself could become Queen of England and was sending coded messages of this sort to her co-conspirator Anthony Babington. Unfortunately for Mary, there is a very simple way of cracking this code that doesn't involve trial and error, but which doesinvolve, surprise, surprise, maths.
Letter sent by Mary Queen of Scots to her co-conspirator Anthony Babington. Every symbol stands for a letter of the alphabet.
Letters in a language are pretty unusual because some get used more often than other letters. An easy experiment you can do to test this out is to get everyone in your class to raise their hand if they have the letter 'E' in their name. Then get all those with a 'Z' to raise their hand, then a 'Q', then an 'A'. You will probably find that 'E' and 'A' are more common than 'Z' and'Q'. The graph below shows the average frequency of letters in English. To compile the information, people looked through thousands and thousands of books, magazines and newspapers, and counted the number of times each letter came up.
In English, E is the most commonly used letter. In any piece of writing, we use E about 13% of the time on average. 'T' is the second most common letter and 'A' is the third most commonly used letter.
And it's this information that can help you to crack codes. All Elizabeth the First's Spy-Master had to do to crack Mary's code, was to look through the coded message and count the number of times each symbol came up. The symbol that came up the most would probably stand for the letter 'E'. Look at our Ancient Runes problem for another code that could be deciphered by counting how often each symbol appears.
When you crack codes like this, by looking for the most common letter, it's called 'frequency analysis', and it was this clever method of cracking codes that resulted in Mary having her head cut off. CHOP!
I show laser software free download.
Test your talents
Cracking these coded messages doesn't just involve looking for the most common symbol, you can also look for symbols that are all out on their own in the message ie one letter words. There are only two one-letter words in English, 'A' and 'I', so a lone symbol would have to stand for an 'A' or 'I'. Another thing you can look out for are common words. The most common three letter words in Englishare 'the' and 'and', so if you see a group of three symbols that comes up quite a lot, they could stand for 'the' or 'and'.
If you would like to test out these code breaking tips and your new code breaking talents, have a look at Simon Singh's Black Chamber. It has Caesar shift and frequency analysis puzzles for you to break, and other codes that you can try to unravel.
For more information about other secret codes that have been used throughout history, check out Simon Singh's web site. It's packed full of information about all sorts of codes, including the famous story Enigma, the code machine used by the Germans during WWII. The Germans thought their code was invincible, but incredibly, British mathematicians managedto break the code and read all the messages sent by the Germans during the war. Historians think that having this inside information shortened the war by two whole years.
After reading this, you might fancy making up some codes of your own, and writing you own secret messages. BE WARNED. Other people have also read this article and they too will be top mathematical codebreakers. Spies are everywhere, so be careful - who's reading your messages?
Claire Ellis, the author of this article, was director of the Enigma Project, which takes codes and code breaking, and a genuine WW2 Enigma machine, into the classroom. For more information contact the new director, Claire Greer, via the Enigma Schools' Project web site.
What is Password Cracking?
Password cracking is the process of attempting to gain Unauthorized access to restricted systems using common passwords or algorithms that guess passwords. In other words, it’s an art of obtaining the correct password that gives access to a system protected by an authentication method.
Password cracking employs a number of techniques to achieve its goals. The cracking process can involve either comparing stored passwords against word list or use algorithms to generate passwords that match
In this Tutorial, we will introduce you to the common password cracking techniques and the countermeasures you can implement to protect systems against such attacks.
Topics covered in this tutorial
What is password strength?
Password strength is the measure of a password’s efficiency to resist password cracking attacks. The strength of a password is determined by;
- Length: the number of characters the password contains.
- Complexity: does it use a combination of letters, numbers, and symbol?
- Unpredictability: is it something that can be guessed easily by an attacker?
Let’s now look at a practical example. We will use three passwords namely
For this example, we will use the password strength indicator of Cpanel when creating passwords. The images below show the password strengths of each of the above-listed passwords.
Note: the password used is password the strength is 1, and it’s very weak.
Note: the password used is password1 the strength is 28, and it’s still weak.
Note: The password used is #password1$ the strength is 60 and it’s strong.
The higher the strength number, better the password.
Let’s suppose that we have to store our above passwords using md5 encryption. We will use an online md5 hash generator to convert our passwords into md5 hashes.The table below shows the password hashes
|Password||MD5 Hash||Cpanel Strength Indicator|
We will now use http://www.md5this.com/ to crack the above hashes. The images below show the password cracking results for the above passwords.
As you can see from the above results, we managed to crack the first and second passwords that had lower strength numbers. We didn’t manage to crack the third password which was longer, complex and unpredictable. It had a higher strength number.
Password cracking techniques
There are a number of techniques that can be used to crack passwords. We will describe the most commonly used ones below;
- Dictionary attack– This method involves the use of a wordlist to compare against user passwords.
- Brute force attack– This method is similar to the dictionary attack. Brute force attacks use algorithms that combine alpha-numeric characters and symbols to come up with passwords for the attack. For example, a password of the value “password” can also be tried as p@$$word using the brute force attack.
- Rainbow table attack– This method uses pre-computed hashes. Let’s assume that we have a database which stores passwords as md5 hashes. We can create another database that has md5 hashes of commonly used passwords. We can then compare the password hash we have against the stored hashes in the database. If a match is found, then we have the password.
- Guess– As the name suggests, this method involves guessing. Passwords such as qwerty, password, admin, etc. are commonly used or set as default passwords. If they have not been changed or if the user is careless when selecting passwords, then they can be easily compromised.
- Spidering– Most organizations use passwords that contain company information. This information can be found on company websites, social media such as facebook, twitter, etc. Spidering gathers information from these sources to come up with word lists. The word list is then used to perform dictionary and brute force attacks.
Spidering sample dictionary attack wordlist
Password cracking tool
These are software programs that are used to crack user passwords. We already looked at a similar tool in the above example on password strengths. The website www.md5this.com uses a rainbow table to crack passwords. We will now look at some of the commonly used tools
John the Ripper
John the Ripper uses the command prompt to crack passwords. This makes it suitable for advanced users who are comfortable working with commands. It uses to wordlist to crack passwords. The program is free, but the word list has to be bought. It has free alternative word lists that you can use. Visit the product website https://www.openwall.com/john/ for more information and how to use it.
Cain & Abel
Cain & Abel runs on windows. It is used to recover passwords for user accounts, recovery of Microsoft Access passwords; networking sniffing, etc. Unlike John the Ripper, Cain & Abel uses a graphic user interface. It is very common among newbies and script kiddies because of its simplicity of use. Visit the product website http://www.softpedia.com/get/Security/Decrypting-Decoding/Cain-and-Abel.shtml for more information and how to use it.
Ophcrack is a cross-platform Windows password cracker that uses rainbow tables to crack passwords. It runs on Windows, Linux and Mac OS. It also has a module for brute force attacks among other features. Visit the product website http://ophcrack.sourceforge.net/ for more information and how to use it.
Password Cracking Counter Measures
- An organization can use the following methods to reduce the chances of the passwords been cracked
- Avoid short and easily predicable passwords
- Avoid using passwords with predictable patterns such as 11552266.
- Passwords stored in the database must always be encrypted. For md5 encryptions, its better to salt the password hashes before storing them. Salting involves adding some word to the provided password before creating the hash.
- Most registration systems have password strength indicators, organizations must adopt policies that favor high password strength numbers.
Hacking Activity: Hack Now!
In this practical scenario, we are going to crack Windows account with a simple password. Windows uses NTLM hashes to encrypt passwords. We will use the NTLM cracker tool in Cain and Abel to do that.
Cain and Abel cracker can be used to crack passwords using;
- Dictionary attack
- Brute force
We will use the dictionary attack in this example. You will need to download the dictionary attack wordlist here 10k-Most-Common.zip
For this demonstration, we have created an account called Accounts with the password qwerty on Windows 7.
Password cracking steps
- Open Cain and Abel, you will get the following main screen
- Make sure the cracker tab is selected as shown above
- Click on the Add button on the toolbar.
- The following dialog window will appear
- The local user accounts will be displayed as follows. Note the results shown will be of the user accounts on your local machine.
- Right click on the account you want to crack. For this tutorial, we will use Accounts as the user account.
- The following screen will appear
- Right click on the dictionary section and select Add to list menu as shown above
- Browse to the 10k most common.txt file that you just downloaded
- Click on start button
- If the user used a simple password like qwerty, then you should be able to get the following results.
- Note: the time taken to crack the password depends on the password strength, complexity and processing power of your machine.
- If the password is not cracked using a dictionary attack, you can try brute force or cryptanalysis attacks.
- Password cracking is the art of recovering stored or transmitted passwords.
- Password strength is determined by the length, complexity, and unpredictability of a password value.
- Common password techniques include dictionary attacks, brute force, rainbow tables, spidering and cracking.
- Password cracking tools simplify the process of cracking passwords.
- среда 01 апреля