Handy Commands
Handy Commands
1. Connect using mssqlclient.py
mssqlclient.py sql_dev@10.129.43.30 -windows-auth2. Enable xp_cmdshell
EXEC sp_configure 'show advanced options', 1; RECONFIGURE;
EXEC sp_configure 'xp_cmdshell', 1; RECONFIGURE;3. Run OS commands with xp_cmdshell
xp_cmdshell 'whoami'4. Escalate privileges with JuicyPotato
5. Escalating privileges with PrintSpoofer
6. Take memory dump with ProcDump
7. Extract credentials from LSASS dump using Mimikatz
8. Checking ownership of a file
9. Taking ownership of a file
10. Confirm changed ownership of a file
11. Modifying a file ACL
12. Extract hashes with secretsdump.py
13. Copy files with ROBOCOPY
14. Searching security event logs
15. Passing credentials to wevtutil
16. Searching event logs with PowerShell
17. Generate malicious DLL
18. Loading a custom DLL with dnscmd
19. Finding a user's SID
20. Checking permissions on DNS service
21. Stopping a service
22. Starting a service
23. Querying a registry key
Last updated