Follow us on Twitter!
Your life is ending one minute at a time. If you were to die tomorrow, what would you do today?
Thursday, April 24, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 16
Guests Online: 12
Members Online: 4

Registered Members: 82895
Newest Member: kevy90
Latest Articles
View Thread

HellBound Hackers | Computer General | Hacking in general

Author

Problem while trying to hack flah...


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 10-05-09 19:40
Hi,

I am new here. I apologize if I poste this in the wrong section but I need a little help...

I download a game swf file and try to hack the game but I found part of the code has been obfuscated...


Here is part of the code...

Code
#initclip 2
function ()
{
    \x03 = 2772 % 511 * true;
    return (eval("\x03"));
} // End of the function
var \x01 = 714 + \x04\x05();
while (\x01 = eval("\x01") + 12, eval("\x01") == 907)
{
    \x01 = eval("\x01") + 39;
    break;
} // end while
if (eval("\x01") == 691)
{
    \x01 = eval("\x01") - 235;
   
} // end if
\x01 = eval("\x01") + 621;
...




I am thinking there ma be a way to decrypt the code but does anyone have any idea what I can do?
Author

RE: Problem while trying to hack flah...

p4plus2
Member

Your avatar

Posts: 167
Location:
Joined: 31.03.08
Rank:
Newbie
Posted on 10-05-09 20:03
When flash is compiled into byte code(kinda like java) name mashing occurred. This is also what happens in other languages like C/C++ making them difficult to be decompiled(as well as several other factors). The compiler will sometimes use a basic naming structure to help make things easier but it will never be easy. On top of this there are also other transformations applied to the code when compiled such as changing datatypes around into a more computer legible version.

This data has not been obfuscated, this is just what happens from decompiling a swf file. Furthermore, it would have required a password if it was truly obfuscated.


"You can't be something your not,
Be yourself by yourself
Stay away from me" ~Walk, Pantera

"Playing an acoustic guitar is like having sex with your clothes on" ~Dave Mustaine
p4plus2@hotmail.com
Author

RE: Problem while trying to hack flah...


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 10-05-09 20:26
Hi p4plus2,

Thanks for the explanations. I am curious if there is a way to revert all those weird codes back to their orginal form?

I have seen someone uploaded another swf but all the codes are visible in their origial form...
Author

RE: Problem while trying to hack flah...

p4plus2
Member

Your avatar

Posts: 167
Location:
Joined: 31.03.08
Rank:
Newbie
Posted on 10-05-09 20:53
Older versions of the swf did not mangle names nearly as much. With the introduction of actionscript 3 is when we begin to see code which is much less human readable. The best thing I could suggest would be trying various decompilers until you come across one that will give variables and functions artificial names, but don't hold your breathe odds are there probably is not one out there yet. Sothink, trillix, and flash decompiler gold all had no successes for me.


"You can't be something your not,
Be yourself by yourself
Stay away from me" ~Walk, Pantera

"Playing an acoustic guitar is like having sex with your clothes on" ~Dave Mustaine
p4plus2@hotmail.com
Author

RE: Problem while trying to hack flah...


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 12-05-09 00:49
Thanks for the detailed explanation. Grin

I think I found out what program what used to produced such codes...

Knowing what program it is originated from, would it be possible to reverse engineer the program to obtain the encryption routine or help decrypt the encoded actionscript in someway?
Author

RE: Problem while trying to hack flah...

p4plus2
Member

Your avatar

Posts: 167
Location:
Joined: 31.03.08
Rank:
Newbie
Posted on 12-05-09 01:05
In some situations knowing the program used can help but in the case of flash, from my experience at least, this does not seem to apply. Flash seems to have a very distinct naming structure that must be followed in order for the idea to function properly. The following links may be of particular interest you if the internal workings of flash works.
http://www.adobe.com/devnet/swf/pdf/swf_file_format_spec_v10.pdf

EDIT:
be prepared its 278 pages long. I have not read the document myself(but I plan to), and it will likely go way more in depth than you need. Remember ctrl-f is your friend.


"You can't be something your not,
Be yourself by yourself
Stay away from me" ~Walk, Pantera

"Playing an acoustic guitar is like having sex with your clothes on" ~Dave Mustaine

Edited by p4plus2 on 12-05-09 01:09
p4plus2@hotmail.com