
Cobalt Strike系列教程分享如約而至,新關注的小伙伴可以先回顧一下前面的內容:

Cobalt Strike系列教程第四章:文件/進程管理與鍵盤記錄
今天我們將繼續分享Cobalt Strike系列教程的其他章節內容,希望對大家的學習有所幫助,快速提升實用技能。
提權
1、右鍵菜單提權
選擇beacon,右鍵,執行-->提權。

筆者由於加載了插件,所以比官方多了幾種提權方式。

ms14-058/ms15-051/ms16-016/ms16-032
這些都是大家耳熟能詳的Windows本地提權漏洞,在此插件中都已經集成。
UAC-DLL
這是一種繞過UAC的攻擊,它試圖將本地管理員運行的有效負載從低權限提升到高權限。此攻擊使用UAC漏洞將ArtifactKit生成的DLL復制到特權位置。此攻擊適用於Windows7和Windows8及更高版本的未修補版本。
uac-token-duplication
這是另一種繞過UAC的攻擊,將其從低權限提升到高權限(作為本地管理員)。這種攻擊使用一個UAC漏洞,允許非提升進程使用從提升進程中竊取的token啟動任意進程。此漏洞要求攻擊刪除分配給提升token的多個權限。此攻擊適用於Windows7及更高版本。如果AlwaysNotify處於其最高設置,則此攻擊要求提升的進程已在當前桌面會話中運行(作為同一用戶),此漏洞使用PowerShell生成會話。
Uac-eventvwr
這種提權方法是利用時間查看器eventvwr,通過注冊表之后,執行Eventvwr.exe會自動加載我們的A.exe(exp),這個時候它的權限就是高了,成功繞過UAV。

Uac-wscript
這種繞過uac提權的方法最初是在Empire框架中現身的,該方法只針對Windows7有效。
2、自用EXP提權
這種方式就是比較常規的方法,自己上傳最新的EXP進行提權,至於文件上傳和執行的方法,之前已經講過,請查看公眾號相關文章。
最近測試CVE-2019-0803的提權效果不錯,影響版本非常廣。
Microsoft Windows Server 2019 0
Microsoft Windows Server 2016 0
Microsoft Windows Server 2012 R2 0
Microsoft Windows Server 2012 0
Microsoft Windows Server 2008 R2 for x64-based Systems SP1
Microsoft Windows Server 2008 R2 for Itanium-based Systems SP1
Microsoft Windows Server 2008 for x64-based Systems SP2
Microsoft Windows Server 2008 for Itanium-based Systems SP2
Microsoft Windows Server 2008 for 32-bit Systems SP2
Microsoft Windows Server 1803 0
Microsoft Windows Server 1709 0
Microsoft Windows RT 8.1
Microsoft Windows 8.1 for x64-based Systems 0
Microsoft Windows 8.1 for 32-bit Systems 0
Microsoft Windows 7 for x64-based Systems SP1
Microsoft Windows 7 for 32-bit Systems SP1
Microsoft Windows 10 Version 1809 for x64-based Systems 0
Microsoft Windows 10 Version 1809 for ARM64-based Systems 0
Microsoft Windows 10 Version 1809 for 32-bit Systems 0
Microsoft Windows 10 Version 1803 for x64-based Systems 0
Microsoft Windows 10 Version 1803 for ARM64-based Systems 0
Microsoft Windows 10 Version 1803 for 32-bit Systems 0
Microsoft Windows 10 version 1709 for x64-based Systems 0
Microsoft Windows 10 Version 1709 for ARM64-based Systems 0
Microsoft Windows 10 version 1709 for 32-bit Systems 0
Microsoft Windows 10 version 1703 for x64-based Systems 0
Microsoft Windows 10 version 1703 for 32-bit Systems 0
Microsoft Windows 10 Version 1607 for x64-based Systems 0
Microsoft Windows 10 Version 1607 for 32-bit Systems 0
Microsoft Windows 10 for x64-based Systems 0
Microsoft Windows 10 for 32-bit Systems 0
用法:CVE-2019-0803.exe cmd cmdline,可能需要多執行幾次才可以成功。

3、Powershell提權
在此需要使用beacon中的命令-powershell-import。
beacon> help powershell-import
Use: powershell-import [/path/to/local/script.ps1]
Import a powershell script which is combined with future
calls to the powershell command. You may only use one
imported script at a time.
使用 powershell-import 本地導入我們的腳本。
powershell執行,PowerUp.ps1 這個模塊是個提權輔助模塊。
下載鏈接:https://github.com/HarmJ0y/PowerUp
橫向移動
1、橫向滲透概念
橫向滲透攻擊技術是復雜網絡攻擊中廣泛使用的一種技術,特別是在高級持續威脅(Advanced Persistent Threats,APT)中更加熱衷於使用這種攻擊方法。攻擊者可以利用這些技術,以被攻陷的系統為跳板,訪問其他主機,獲取包括郵箱、共享文件夾或者憑證信息在內的敏感資源。
攻擊者可以利用這些敏感信息,進一步控制其他系統、提升權限或竊取更多有價值的憑證。借助此類攻擊,攻擊者最終可能獲取域控的訪問權限,完全控制基於Windows系統的基礎設施或與業務相關的關鍵賬戶。
在提權后,我們可以用mimikatz dump目標機的憑證,並進行內網橫向移動。
2、P**ec橫向移動
在執行端口掃描后,目標視圖中,選擇一個目標,右鍵-->登錄--p**ec,即可選擇憑證進行橫向移動。


如果該機使用了和之前的目標機一樣的憑證,則會成功返回一個system beacon。

3、竊取token
在進程列表中,尋找以域管理員身份運行的進程,並選定進行steal token,如果成功,則會返回域管權限的beacon。

4、其他手段橫向移動
①使用各種系統漏洞:比如說用ms17-010,ms08-067批量檢測一下內網。
之前發過cobaltstrike中ms17-10的利用腳本,貌似是從Empire框架上拔下來的。如圖,該腳本集成了掃描與漏洞利用,可謂是非常方便。

②弱口令檢測
內網中ssh弱口令,各種數據庫的弱口令可謂是層出不窮。Mysql可以mof提權,sqlserver可以xp_cmdshell,redis寫shell,oracle也有方法執行系統命令。
③中間件漏洞
這個就非常常見了,比如weblogic各種rce漏洞等等。
④Web端漏洞
挖掘Web端漏洞。
以上是今天的內容,大家看懂了嗎?后面我們將持續更新Cobalt Strike系列的知識點,希望大家及時關注。