Post Exploit Checks

Post Exploit

  • AutoLogon Credentials

reg query "HKLM\SOFTWARE\Microsoft\Windows NT\Currentversion\Winlogon" 2>null | findstr "DefaultUserName DefaultDomainName DefaultPassword"
  • Enumerate open ports

netstat -ano

Powershell

PSCredentials

  • The PSCredentital Object is used to perform authenticated action / actions as another user in the machine

# create a PSCredential object
$password = ConvertTo-SecureString "DNOscp1234!" -AsPainText -Force
$credential = New-Object System.Management.Automation.PSCredential("Dhanesh", $password)

# Export the credential to XML File
$credential | Export-CliXml -Path 'C:\Location'

# Import the xml file to obtain password
$file = Import-CliXml -Path "C:\Location\File.xml"
$file.GetNetworkCredential() | fl

# Extra
$file | Get-Member
  • Execute Command as another user ( RUN-AS)

Machine

Privilege Escalation

UAC

  • If a user belongs to the administrator groups and cannot execute the commands as Admin ( moving to Administrator's Desktop for eg.). Indicatest that there is a UAC is enabled

  • The bypass can also be checked with SharpUp.exe

Compiled Binaries
  • The output of the sharpup.exe suggests the UAC can be bypassed

Sharup.exe

UAC Bypass

General Methods by ivanitlearning - Here

1. Mounting

Mounting Bypass
  • With net use n: \\127.0.0.1\C$ -> mounts the C directory as a new share as n

2. DLL Hijacking

UAC Bypass Via DLL Hijacking
  1. Create a malicious dll file

2. Compile the generated malicious dll

3. GreatSCT takes care of the rest

3. Akagi

  • Compile the binary and use to bypass

Shell as Administrator

4. FileLess UAC Bypass

Windows 7

  • Fileless UAC bypass, without using any applications to bypass the UAC

  • The registries are being used to perform the action

  • The detailed blog can be found here.

Commands

  • Shell will be obtained as NT Authority\System

Last updated

Was this helpful?