AD 枚舉 - PowerView PowerShell

 AD 枚舉 - PowerView PowerShell


靶機預設放了一堆工具





切記 powershell -ep bypass 執行後就可以匯入 PowerView 了

Import-Module .\PowerView.ps1

kali 有內建位置在 /usr/share/windows-resources/powersploit/Recon/PowerView.ps1





PowerView 工具完整介紹網站 https://powersploit.readthedocs.io/en/latest/Recon/

接下來使用幾個好用的指令,第一個 Get-NetDomain 抓取現有網域簡單資訊





接著使用 Get-NetUser,條列出網域中所有使用者屬性





PowerView 中可以直接使用 select 來過濾條件,例如 Get-NetUser | select cn

顯示出網域中 common name 的值而已,過濾方式採用類似 SQL 的條件




因為過濾就像資料庫的條件,所以可以在 select 後面加上我們想要看到的欄位

例如使用者最後修改密碼的時間與最後登入的時間

語法 : Get-NetUser | select cn,pwdlastset,lastlogon





接著改列舉群組 Get-NetGroup | select cn





列舉特定群組中的成員 Get-NetGroup "Sales Department" | select member







練習

列舉使用者fred正在工作的 Office 以取得標誌

指令 Get-DomainUser -Identity fred




留言

這個網誌中的熱門文章

Challenge 0 - Secura(2)

Challenge 0 - Secura(1)

Challenge 8 - Poseidon(0)