Try Hack Me – Advent of Cyber 3 – Day 11 – Network Analysis & RDBMS

MS SQL Server is a Relational Database Management System (RDBMS). One simple way to think of a relational database is a group of tables that have relations.

This was a pretty basic lab. My key learnings were how to use the sqsh command to connect to MS SQL.

Syntax – sqsh -S server -U username -P password

and the xp_cmdshell command to interact with the Windows command prompt from SQL.

Syntax – xp_cmdshell ‘whoami’;

Note – MS Windows hosts block pings by default, so we need to add -Pn for the nmap command, e.g. nmap -Pn MACHINE IP.