Um hacker alemão demonstrou uma vulnerabilidade crítica no maior site de eStore do mundo
de acordo com o hacker David Vieira-Kurz descobridor da vulnerabilidade, é um problema no type-cast combinado com uma complexa e desarrumada syntax que permite que o atacante execute o código malicioso no Ebay.
de acordo com a explicação em seu blog:
Um URL legitima do Ebay:
e modificada, para "passar" qualquer valor de array, incluindo o payload:
[ame]www.youtube.com/watch?v=ZpuLbdSiRGc[/ame]
Porém ainda não esta claro onde a falha reside no Ebay, porque como um parâmetro GET estático pode ser convertido para aceitar um valor de array ?
de acordo com Mohit Kumar(Unix_Root) só é possível se o parâmetro 'q' esteja usando uma função de loop como "foreach()", é provável que o código do Ebay seja algo parecido com isso(lógico que não vai funcionar -.-'):
David já reportou a falha aos analistas de segurança do Ebay e a falha já foi fixada.
Source: thehackernews
Segundo o próprio David o código seria o seguinte:
de acordo com o hacker David Vieira-Kurz descobridor da vulnerabilidade, é um problema no type-cast combinado com uma complexa e desarrumada syntax que permite que o atacante execute o código malicioso no Ebay.
de acordo com a explicação em seu blog:
Um URL legitima do Ebay:
Código:
https://sea.ebay.com/search/?q=david&catidd=1
Código:
https://sea.ebay.com/search/?q[0]=david&q[1]=sec{${phpinfo()}}&catidd=1
Porém ainda não esta claro onde a falha reside no Ebay, porque como um parâmetro GET estático pode ser convertido para aceitar um valor de array ?
de acordo com Mohit Kumar(Unix_Root) só é possível se o parâmetro 'q' esteja usando uma função de loop como "foreach()", é provável que o código do Ebay seja algo parecido com isso(lógico que não vai funcionar -.-'):
Código:
foreach($_GET['q'] as $data){ If $data is successfully able to bypass some input filter functions { eval("execute thing here with $data"); } }
Source: thehackernews
Segundo o próprio David o código seria o seguinte:
Código:
$cat = $_GET['catidd']; $q = $_GET['q']; if(is_string($q)) {$q=filter_str($q);} else{ $orig_value = array(0 => "$q" ); $str_value = array_shift($orig_value); } function filter_str($string){ return preg_match("[regex]", "somefilter", $string); }