Jump to content

looks like the {php}evaL(base64_decode are returning


Recommended Posts

If you are hosted on a cpanel server install mod security and you can filter them at the firewall, the request will be rejected.

 

Can you elaborate on how you would do that exactly please?

I only allow site visitors to raise tickets via the browser (not email).

Link to comment
Share on other sites

You could use modsec to filter {php} or base64decode, though that may raise some false positives.

 

Could you not use a hook to block them?

 

http://www.webhostingtalk.com/showpost.php?p=7882265&postcount=67

 

EDIT: Updated code to prevent issues with email template saving

 

    $file = pathinfo($_SERVER['SCRIPT_NAME']);
   $callingScript = $file['basename'];

   $checkvars = array(‘subject’, ‘message’);
   foreach ($checkvars AS $checkvar) if ($callingScript != ‘configemailtemplates.php’ && strpos($_REQUEST[$checkvar], ‘{php}’) !== false) die(“We’re sorry, but you cannot use \”{php}\” in a ticket submission. If you do have a legitimate issue, please press the back button in your browser and then change any instances of \”{php}\” to \”(php)\” so that your ticket may be submitted. Keep in mind that neither {php} nor (php) will function.”);

Edited by LDHosting
add modified code
Link to comment
Share on other sites

Install the mod_sec plugin to allow you to manage the rule sets, Download the latest mod_sec ruleset it should already have the rule in place that blocks the request. you just copy and paste the rule set into your mod_sec plugin.

 

If you are using any firewall you should always keep its definitions fresh and mod_sec is no different.

 

- - - Updated - - -

 

will not work as the strings are different on each one

 

It doesnt filter the string, it filters a required part of the string, base64_decode, if that is present in the request it is rejected. Doing this via exim or mod_sec has an added bonus, you can ban an ip at the server rather than at application level.

Link to comment
Share on other sites

I believe the patch released in 2012 resolved these issues though, and its included in all new updates. it doesnt prevent a submission but i believe it does prevent the php executing.

 

That said, i see no reason for not using mod_sec, if these are being submitted there is just cause to block the user, they could try other methods of attack that you can mitigate.

Edited by CDJ Hosting
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated