githubEdit

Handy Commands

Handy Commands

1. Connect using mssqlclient.py

Command:

mssqlclient.py sql_dev@10.129.43.30 -windows-auth

Description: Connect using mssqlclient.py

2. Enable xp_cmdshell

Command:

EXEC sp_configure 'show advanced options', 1; RECONFIGURE;
EXEC sp_configure 'xp_cmdshell', 1; RECONFIGURE;

Description: Enable xp_cmdshell

3. Run OS commands with xp_cmdshell

Command:

xp_cmdshell 'whoami'

Description: Run OS commands with xp_cmdshell

4. Escalate privileges with JuicyPotato

Command:

Description: Escalate privileges with JuicyPotato

5. Escalating privileges with PrintSpoofer

Command:

Description: Escalate privileges with PrintSpoofer

6. Take memory dump with ProcDump

Command:

Description: Take memory dump with ProcDump

7. Extract credentials from LSASS dump using Mimikatz

Command:

Description: Use MimiKatz to extract credentials from LSASS memory dump

8. Checking ownership of a file

Command:

Description: Check ownership of a file

9. Taking ownership of a file

Command:

Description: Take ownership of a file

10. Confirm changed ownership of a file

Command:

Description: Confirm changed ownership of a file

11. Modifying a file ACL

Command:

Description: Modify a file ACL

12. Extract hashes with secretsdump.py

Command:

Description: Extract hashes with secretsdump.py

13. Copy files with ROBOCOPY

Command:

Description: Copy files with ROBOCOPY

14. Searching security event logs

Command:

Description: Search security event logs

15. Passing credentials to wevtutil

Command:

Description: Pass credentials to wevtutil

16. Searching event logs with PowerShell

Command:

Description: Search event logs with PowerShell

17. Generate malicious DLL

Command:

Description: Generate malicious DLL

18. Loading a custom DLL with dnscmd

Command:

Description: Load a custom DLL with dnscmd

19. Finding a user's SID

Command:

Description: Find a user's SID

20. Checking permissions on DNS service

Command:

Description: Check permissions on DNS service

21. Stopping a service

Command:

Description: Stop a service

22. Starting a service

Command:

Description: Start a service

23. Querying a registry key

Command:

Description: Query a registry key

Last updated