Tricks and Tips
In active directory environment if we want to pivot to internal windows host from a compromised windows host check if you can receive reverse connection on attacking host on port 53 since AD is usually configured to allow DNS port 53 to communicate to external hosts. eg:
Invoke-Command -Computer internal.host.local -Credential $cred -ScriptBlock { tcp-one-liner-from-nishang }Identify active hosts on network
Enumerating windows version,hostname,domain
sudo smbmap -H <ip> -vsudo crackmapexec smb <ip>Nmap ports scan at faster rate
Nmap tcp connect scan
Nmap udp verbose scan
Wordpress verberose scan
To find install locations of programs
Find where log files are located in linux hosts(access.log and error.log)
Error clock skew too great
If powershell reverseshell doesn't work convert it to windows base64 and try executing
Adding DNS entry in AD environment for stealing ntlm hashes
Enabling PS-Remoting
Creating powershell credential object
Moving laterally to another computer on domain
Windows shell upload via website
Decrypt Powershell SecureString password
If mimikatz doesn't work on the host we can save the sam,system and security hive transfer it to our attacking machine via smb and use secretsdump.py to extract all hashes
Windows can execute executable files directly from UNC path
To perform tcp port scan On old linux systems where nmap does not run(May need to run more than once to filter good results)
To perform udp port scan on old linux where nmap does not work(May need to run more than once to filter good results)
Change smb password remotely from linux
Bypass UAC
Powershell Command History file location
If powershell errors during execution of PrivEsc scripts(eg: Access to the path is denied, operation might require other privileges, etc)
Hashcat with salt
MSSQL configuring xp_cmdshell if not enabled
MSSQL Injection xp_cmdshell RCE
MSSQL Injection capture credentials when xp_cmdshell doesnot work
MySql Injection RCE in windows when smb is running:
MySql injection php wrapper trick
MySql Injection OUTFILE RCE:
MySql Injection load_file() read system files
Wireshark Group
Enabling WDigest authentication to force system to store credentials in plaintext so that next time some employee logs in their creds will get cached in memory
Sqlmap force ssl
Shell as another user on windows host
First Way
Second Way
Last updated