Tutorial - Breaking Weak Encryption With Excel

The importance of a good encryption algorithm is essential to functional security. And yet there are a lot of misguided initiatives to use an 'internal', 'trusted' and 'secret' algorithm. Obscurity IS NOT Security and an algorithm that hasn't passed external scrutiny may be fundamentally flawed. If you go down that road you may even find your encryptions hacked by non-programmers.

Here is a tutorial on how easy it is to crack an encryption that is not properly designed.
For this tutorial, We are going to work with a really simple and weak algorithm - XECryption.

Here is a narrative summary of the algorithm:

  • The password the user chose is first used to produce a number by adding the ASCII value of every character in the password to produce one large total. This number is used as the encryption key.
  • The message is encrypted by adding the password key is added to the ASCII value of each letter in the message, then it is divided by three. A random number between -10 and 10 is added to this new number. This becomes the first number in the series, and is repeated to produce the second number. The third number is the difference between the first two final numbers and the original ASCII value plus the password key. At the end, every letter in the encrypted message takes on the following format: ".193.144.164".
  • When decrypting, the password key is found in the same way that it's encrypted. Each triplet is added together, and then the password key is subtracted. This is the ASCII value of the letter.

So in summary, an XECryption encrypted message represents each letter in number triplets. Here is a sample XECryption encrypted message for your exercise.

Most readers have already noticed that there are a lot of flaws to the algorithm. Here are some which we will use:
  1. There are multiple decryption passwords - there are a lot of combinations of characters that will produce the same number which is used to create the encrypted message. In essence
  2. Also,the encryption number/key is contained within the message.
  3. It is extremely easy to bruteforce this algorithm.
Here is how to approach this crack, and you won't even need to program anything:
  1. First, we need to remember that each total of the triplets contains the encryption number, and since it needs to be subtracted from the total, the resulting number needs to be positive. So your password is contained even in the lowest total of any triplet in the message.
  2. Once you find the lowest triplet total, you can just attempt all numbers starting from the lowest total down to zero as a possible encryption number - in essence, just bruteforce the text.
  3. If you use a program to do the bruteforcing, you need to program a logic which will be able to identify that the bruteforced result is the real solution. This is usually done by counting how many of the bruteforce calculated ASCII codes are codes for letters, numbers and punctuation marks. If the percentage is large, it is a possible solution.
  4. If you use Excel, the pattern matching will be done by your brain - a human can easily identify words and discover the solution.
  5. To utilize this approach, simply place the encrypted text into an excel sheet, and create sums of every three numbers. These numbers are the triplet totals that need to be decrypted.
  6. Place the triplet totals sequence on row 1 of a sheet, and on column 1 find the minimum total of the sequence. Starting from this minimum simply fill the rows in column 1 with every number from the minimum down to 1
  7. Then in the cells from row 2 and in all columns which have triplet total in row 1 use the following function - CHAR(Row1,ColumnX - RowX,Column1).
  8. Start reading the text in the rows and find your solution. Here is an excel file example of a decryption - the word 'hello' encrypted with a password 'hi'

Once you discover your most probable solution, just use the encryption number on the start of the row and the encrypted message on this site to check.

So, go ahead and try the described methodology - and post the identified source (author and book) of the encrypted text.
Every successful identification gets an honorable mention and a link in the followup article!

Talkback and comments are most welcome

Related posts
TrueCrypt Full Disk Encryption Review
5 rules to Protecting Information on your Laptop
Windows 7 Full Disk Encryption with Truecrypt
Tutorial - Hidden Operating System with Truecrypt
Tutorial - A Poor Man's Secure USB
Hardware Security Module for Dummies


Anh Nam said...

Dịch vụ chuyển phát nhanh ở tphcm ngày ngày càng phát triển góp phần nâng cao dịch vụ mua bán đặc biệt mua bán online. Nên các chuyển phát nhanh hcm luôn được phát triển nâng cao nhu cầu phục vụ công ty doanh nghiệp. Dịch vụ chuyển phát nhanh của Công ty Proship đã được nhiều tổ chức, doanh nghiệp, cá nhân yêu mến, tin cậy và hợp tác lâu dài. Trong quá trình xây dựng và phát triển, chúng tôi công ty chuyển phát nhanh ở hcm là hiện thân cho tinh thần trách nhiệm và trung thực, dịch vụ chu đáo và nhanh chóng. Tại thị trường Tphcm, Proship được đánh giá là một trong những Công ty Chuyển phát nhanh làm ăn có hiệu quả, uy tín, có sức phát triển và dành được nhiều cảm mến. Chuyên cung cấp các dịch vụ chuyển hàng vào sài gòn .Ngoài dịch vụ nhanh chóng, chu đáo và giá cả hợp lý thì Proship cũng có nhiều chương trình khuyến mãi cho các khách hàng tại Sài Gòn. Nên nếu bạn là cá nhân hay công ty doanh nghiệp đang có nhu cầu sử dụng chuyển phát nhanh vào sài gòn hãy liên hệ với chúng tôi công ty Proship. Với những uy tín vốn có của doanh nghiệp, chuyển phát Proship nhận vận chuyển các loại hàng hóa và bưu phẩm theo yêu cầu của khách hàng. Với thời gian 1 ngày duy nhất cho quá trình vận chuyển hàng từ các tỉnh thành trên cả nước và chuyển phát nhanh uy tín tại sài gòn , chúng tôi sẽ nhận hàng của quý khách tại văn phòng hoặc tại nhà riêng, công ty sau đó sẽ kết nối vào Đà Nẵng và phát tận tay người nhận theo địa chỉ ghi trên bưu kiện.

stefaniekwoodard said...

Download the Bluestacks app from the official site as well as subsequently mount it. You TV Player This is exactly what You TV player can provide.

Unknown said...

PlayStation is the most popular gaming console right now from Sony with four gaming consoles in the market right now. The fifth one is on the cards with some awesome features and hardware support.
If you love playing games on your console then you must be interested to know more about the fifth installment. You just need to check out my site to get all the information you need
Playstation 5 price

orean said...

Currently, the 2nd most useful alternate for mega-box within our viewpoint is how terrarium tv. Some folks believe it better. This program has received some capabilities that assist you to see your favorite movies/TV shows.
know more about this movie application here
source to download movies app on firestick
The bonus purpose of the application is the fact that it supports all of the formats, for example, mp4, flv, mkv along with also others. It is thought of among the options for mega-box. It comes with a user interface that helps make it more easy to browse throughout the program.

It may be useful for either, Android along with iOS operating systems. Thus, as soon as you're currently browsing to get a mega-box choice in iOS, proceed for Terrarium tv Show Box was fashioned for Android and so is ideal because of this particular as.
look at most useful Terrarium tv Ad free Apk download
The process to download Terrarium tv isn't so difficult in any way and can be provided in content. You might discover that it's easy.

Designed by Posicionamiento Web