Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Big problem with encrypted file
Old 02-16-2010, 01:09 PM Big problem with encrypted file
Novice Talker

Posts: 5
Name: Remuel Rivera
Trades: 0
Hi Guys,

Im new here, but i've been using webmaster-talk for a lot of years.

To make a long story short, a company hired me a few days ago to modify a php application,

I received the code today and found that is encrypted!!

What can i do? The person who did this code no longer works for the company and is MIA.

Please help, copy of the code:

http://slexy.org/raw/s21rZ5j06O

or

http://www.heypasteit.com/clip/GY6

They hire me to change a email message thats apparently is inside that obfuscated code, not the entire application.

Can someone help me here.


thanks

Remuel

Last edited by ing.rivera; 02-16-2010 at 01:29 PM.. Reason: forgot to include the code.
ing.rivera is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-16-2010, 01:20 PM Re: Big problem with encrypted file
lynxus's Avatar
Awesomeo-Maximo

Posts: 1,618
Location: UK
Trades: 1
Looks like its been obfuscated.

No easy way out tbh.

It doesnt look like a huge bit of code, so may just be better to re-write it based on the companys requirements?
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


lynxus is offline
Reply With Quote
View Public Profile Visit lynxus's homepage!
 
Old 02-16-2010, 02:58 PM Re: Big problem with encrypted file
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
It looks like its been encoded. You should be able to backtrack through the encoding to get to the real code. Replace the line:
PHP Code:
eval(base64_decode(stripslashes($_CMD))); 
with
PHP Code:
echo base64_decode(stripslashes($_CMD)); 
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 02-16-2010, 04:29 PM Re: Big problem with encrypted file
Novice Talker

Posts: 5
Name: Remuel Rivera
Trades: 0
i tried that but i only get this:

?>=0;$i--) { $_CHAR2.=chr($i); } $_DECODE64=base64_decode($_DECODE); $_DECRYPT=strtr($_DECODE64,$_CHAR2,$_CHAR); eval($_DECRYPT); return; die(); ?>

im really lost here.

thanks
ing.rivera is offline
Reply With Quote
View Public Profile
 
Old 02-16-2010, 08:31 PM Re: Big problem with encrypted file
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
There was more to it to hacking it. I finished the hack to check your story and it does seem to not be a copyrighted code, so here's the answer:

Where you see return;, replace it with

PHP Code:
echo '<pre>'.htmlspecialchars($_DECRYPT).'</pre>'
And, you'll have the full code... beware of copy-and-pasting as there are UTF8 entities in there.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 02-16-2010, 08:32 PM Re: Big problem with encrypted file
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
Quote:
Originally Posted by lynxus View Post
Looks like its been obfuscated.

No easy way out tbh.

It doesnt look like a huge bit of code, so may just be better to re-write it based on the companys requirements?
FYI: Obfuscated code can generally be de-obfuscated, so there's a relatively easy way out. Hashed values on the otherhand really have no easy way out.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 02-17-2010, 02:26 PM Re: Big problem with encrypted file
lynxus's Avatar
Awesomeo-Maximo

Posts: 1,618
Location: UK
Trades: 1
Quote:
Originally Posted by JeremyMiller View Post
FYI: Obfuscated code can generally be de-obfuscated, so there's a relatively easy way out. Hashed values on the otherhand really have no easy way out.
Thats good then ( I assume you managed to decode it for him? )

Glad to see it was retrievable.

Hope he says thanks!


How did you figure out how to decode it?
Are you just REALLLLLY fcuking good? or have you seen that kind of output before? or a bit of both
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE



Last edited by lynxus; 02-17-2010 at 02:27 PM..
lynxus is offline
Reply With Quote
View Public Profile Visit lynxus's homepage!
 
Old 02-17-2010, 07:22 PM Re: Big problem with encrypted file
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
Quote:
Originally Posted by lynxus View Post
How did you figure out how to decode it?
Anytime you see eval( base64_decode( something ) ) change it to echo base64_decode( something ) and it will output the decoded code.

There is a difference between obfuscated code and encoded text. Obfuscated code may be hard to understand and change, but it can still be executed directly (without any decoding). The code the OP posted is just normal PHP code that has been encoded.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 02-21-2010, 05:56 PM Re: Big problem with encrypted file
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
There was a second layer to the obfuscation in this case. Using multi-layer obfuscation is common, though virtually pointless.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 02-22-2010, 10:31 AM Re: Big problem with encrypted file
Novice Talker

Posts: 5
Name: Remuel Rivera
Trades: 0
hey thanks a lot, but how do i decrypt the second multi layer of obfuscation?
ing.rivera is offline
Reply With Quote
View Public Profile
 
Old 02-22-2010, 02:05 PM Re: Big problem with encrypted file
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
By reading my posts in this thread carefully.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 02-24-2010, 11:52 PM Re: Big problem with encrypted file
Novice Talker

Posts: 5
Name: Remuel Rivera
Trades: 0
thanks you very much, how can i pay you?
ing.rivera is offline
Reply With Quote
View Public Profile
 
Old 02-24-2010, 11:53 PM Re: Big problem with encrypted file
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
No payment needed. Glad to be of help.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Reply     « Reply to Big problem with encrypted file
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.43959 seconds with 12 queries