
Menu 


Home 
 

Discussions 
 

Tools 
 

Affiliates 
 

Content 
 

Info 
 






User Info 

Membership:
Latest: MichaelSnaRe
New Today: 0
New Yesterday: 0
Overall: 9145
People Online:
Visitors: 430
Members: 0
Total: 430






PacketStorm News 

Currently there is a problem with headlines from this site 











IT Security and Insecurity Portal 


XE decryt 

Posted: Sat Jun 03, 2006 6:15 am 


dzu 
Regular user 


Joined: Apr 27, 2006 
Posts: 6 







can some one give me code to decrypt this? 





Re: XE decryt 

Posted: Sat Jun 03, 2006 5:57 pm 


waraxe 
Site admin 


Joined: May 11, 2004 
Posts: 2407 
Location: Estonia, Tartu 






dzu wrote:  can some one give me code to decrypt this? 
Gimme original "encrypted" source and then lets see 








Posted: Sun Jun 04, 2006 11:45 am 


dzu 
Regular user 


Joined: Apr 27, 2006 
Posts: 6 







Thealgorithm is a relatively simple algorithm and so is easy understand.To try and get you to understand it, I will walk you through exploringit. First of all you should get an ASCII Table as you will need one inmost cases in this sort of task. There is one included at the bottom ofthe article for reference.
To start off with we will use nopassword when exploring the algorithm. Lets encrypt the letter 'A'(uppercase). Done it? Well I got 3 numbers seperated by dots. Just makea note of these three numbers for later use. Try to encrypt 'A' againwith no password. I get 3 numbers seperated by dots again but adifferent set of numbers. Thats something to note. Once again note downthese numbers.
Lets try encrypting 'AB' with no password. I havegot 6 numbers seperated by dots. Well I think we may have our firstpattern appearing here. With 1 character we have 3 dots, with 2characters we have 6 dots we can confirm the pattern if 3 charactersencrypted produce 9 numbers. Try encrypting 'ABC' with no password. YesI get 9 numbers. Going on this, I think we can safely say that eachgroup of 3 numbers is for each character encrypted. Using thisinformation lets go back to encrypting 'A' with no password. The firsttime I got .24.25.16, second time I got .15.34.16 and this time I got18.20.27. You should have different numbers to me but what you noticeabout them should be the same.
.24.25.16
.15.34.16
.18.20.27
Wellafter fiddling about with these sets of numbers (adding each set,multiplying each set, subtracting etc) I noticed that the sum of thenumbers of each set is the same.
24 + 25 + 16 = 65
15 + 34 + 16 = 65
18 + 20 + 27 = 65
Wellfor me this is a breakthrough, I know what this number is but for allof you who don't its time to whip out those ASCII tables i told youabout. Look up what character is represents the number 65.
You should realise that the ASCII value 65 is an 'A'. The character we where encrypting.
Somaybe every group of 3, sums up to the ascii value for that character.Lets check. We will encrypt the text 'ABCD'. The ASCII value for 'A' is65, 'B' is 66, 'C' is 67, 'D' is 68. So the first set of three numbersshould sum up to 65, the second 66, third 67 and final set 68.
18.30.17  38.20.8  37.16.4  34.15.19
__65______ 66__ __ 67_____ 68
___A_______B______C______ D
Youshould of got different starting numbers from mine above but theyshould sum up the same. Well as you can see we are correct. So thealgorithm must take the ASCII value of each characters and split it upinto 3 numbers which add up to make it.
Well we figured out partof the algorithm but how about the password? We will have to figure outhow the password effects it. We will start with something simple again.Lets encrypt 'A' with the password 'A'.
Lets note again, thatthere is only 3 numbers, we would be wise again to note that it adds upto 130. If we encrypt the same again, we get different numbers but itstill adds up to 130. Lets encrypt 'A' with the password 'B'. The 3numbers sum up to 131 and if we encrypt 'A' with 'C' the numbers sum to132. Just to summarise this in a table:
Text _ Password  Sum of 3 Numbers
A(65)  _A ( 6 5 ) _  __ 1 3 0
A(65)  _B ( 6 6 ) _  __ 1 3 1
A(65)  _C ( 6 7 ) _  __ 1 3 2
I'veseen straight away that if you add the ASCII value of the text with theASCII value of the password it gives the sum of the 3 numbers.
So if we encrypt 'E' with the password 'F' we should get 69 + 70 = 139. Check it!
Solets have a look how the password effects it if more than one characteris encrypted. Lets encrypt 'AB' with the password 'A'. I get:
___25.78.27___  ___55.70.6
25+78+27 = 130  55+70+6=131
_13065= 65(A)_  _13165= 66(B)
Asyou can see if we take the ASCII value of the password (A) which is 65from both of them we get the ASCII values for 'A' and 'B' which is whatwe encrypted.
Now for the last situation we have to consider tofully understand the algorithm. Lets encrypt text with passwords longerthan 1 character. Lets encrypt 'A' with 'AB', 'A' with 'ABC', 'AB' with'AB' and finally 'AB' with 'ABC'. The summary of my results is shown inthe table below.
__Text__  __Password__ Sum of Groups of 3 numbers
A ( 6 5 ) __ AB ( 65 , 66 )__ 196
A ( 6 5 ) __ ABC (65,66,67)  263
AB (65,66)  AB ( 65 , 66 )__ 196,197
AB (65,66)  ABC (65,66,67)  263,264
Letsjust look at the last one. There where 6 numbers produced altogetherand the sum of the first three numbers was 263 and the sum of the lastthree numbers was 264.
We know these numbers must represent A, Brespectively. So lets take away the ASCII values of A and B from eachone respectively:
263  65 (A) = 198
264  66 (B) = 198
Soit looks like the same number has been added to each ASCII value of thecharacter (65(A) + 198, 66(B) + 198). Now to determine where the 198has came from.
Repeat the above procedure with each of the 3 remaining 3 tests, to determine what number has been added on to each character.
__Text__  P a s s w o r d  Number Added on to each character
_ A ( 6 5 )_ AB ( 6 5 , 6 6 )_ 131
_ A ( 6 5 )_ ABC (65,66,67)  198
AB (65,66)  AB ( 6 5 , 6 6 )_ 131
AB (65,66)  ABC (65,66,67)  198
Test1 and 3 has the same number added on aswell as the same password and 2and 4 also shows this. This probably means the number added on to eachcharacter depends on the password. Well if you haven't noticed yet thesum of the ASCII values of the password equals the number added on toeach character.
So if the password is 'ABCBA' then the number added on to each character would be 65 + 66 + 67 + 66 + 65 = 329.
Fromnow on when I refer to the password sum I mean the sum of ASCII valuesof each character in the password. For example the one above for ABCBAthe password sum is 65 + 66 + 67 + 66 + 65 = 329.
If we would encrypt the text 'HELLO' with this password then:
______H______ _____E______ ______L______ _____L_______ ____O
______72_____ _____6 9_____ _____7 6_____  _____7 6_____ ____80
72 + 329 = 401  69 + 329 = 398  76 + 329 = 405  76 + 329 = 405  80 + 329 = 409
These numbers would then be split up into 3 numbers which equal it when added together.
So do you now understand the algorithm? You should do if I've explained it well enough.
Nowwe can work on reversing the encrypted text in the mission. First ofall, to help you realise something I will ask you to decrypt the belowgiven that the first character is meant to be an E.
.75.68.124.63.101.99.96.85.100.63.112.112
First of all group the numbers into sets of 3 and sum them.
75.68.124  63.101.99  96.85.100  63.112.112
___267__ ___263___ ___281 __ ___287
Weknow that the first character is meant to be an E so we can work outwhat has been added on to the ASCII Value, which will be the passwordsum.
E has an ASCII value of 69. If we subtract this from 267 weget 198. Note this is the password sum which is added onto eachcharacter's ASCII value. So we don't actually need the password todecrypt it but the password sum to decrypt it, which we now have (198).So lets take 198 and from each value and we get:
____267____ ____ 263_____ ____ 281 ____ 287
267198 = 69  263  198 = 65  281  198 = 83  287  198 = 89
If we look up the ASCII Values we get, you will see that it makes 'EASY'.
WhatI wanted you to realise from this example is that its not the passwordthat we need to decrypt it, but the password sum. Also that if we knowa character is meant to be a certain position we can find the passwordsum by subtracting the ASCII Value of the character its supposed to befrom the sum of the 3 numbers which represent that position.
Whatwe now need to do is figure out a way to find out what character ismeant to be a particular position. There are only 256 characters, so ata given position that could only be 1 of the 256 characters and sothere will only be 256 possible password sums and hence 256 possibledecryptions of the text. You could use this information if you can'tfigure out what a character at a particular position. It would be verytedious
to do this manually so you would be best writing a computerprogram to do this for you and then see which one makes most sence. Asit happens I have done this and there is a link to my program at thebottom of the article.
Now this is the clever bit. It cuts downthe possibilities significantly. You could probably guess what the mostfrequent character is depending on the context or atleast make a smalllist of possible most frequent characters. Knowing this you could seewhat is the most frequent sum of the groups of 3 is and this will mostprobably be one of your listed most frequent characters. You can thenmake a list of the possible password sum's and try each one until itmakes sense. Atleast this way you will only have about 45possibilities. Of course this would still be tedious with long text sowriting a program to do this for you would be best, a link to my one isgiven at the bottom.
In the context of the mission it is meantto be a letter to someone so the most frequent character(s) could be aspace, an 'e', an 'a', etc. If you would like to do it without myprogram i would suggest using a spreadsheet to help you.
Appendix
Angelfire doesn't allow downloading executables so i've renameed it as an .obj when downloading save it as an .exe
ASCII Tabe 





www.waraxe.us Forum Index > Javascript
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum

All times are GMT
Page 1 of 1






Powered by phpBB © 20012008 phpBB Group





