SQL Database Creation and Code Analysis

SQL stands for structured query language. It is a language used to query databases. SQL is used in many different applications, and being able to understand and interpret SQL code is a fundamental skill for a SOC Analyst.

My understanding of SQL was very basic at the beginning of this project, only knowing the purpose of SQL and what the code looked like. I’m a very hands on learner so I decided I would do some research on the basics of SQL and then get straight into the hands on programming on my HomeLab.

To practice I am going to install MySQL on my Ubuntu Desktop VM running on my home computer. I simply used “sudo apt install mysql-server” to download it and I had a functional SQL database up and running.

I started by making a SQL database where I would document the virtual machines on my Proxmox server. I made a column for the VM-ID, the VM name, and the IP address associated with the VM. Once done making the table I filled in the data columns. And like that I completed my first database.

Now that my simple database was complete, I practiced with SQL syntax, querying my database, and just getting comfortable with SQL. In the query below I specified that I wanted to see the machine with a vmid of 100, and I got a successful response.

I continued to practice with SQL by updating entries in the table, as well as adding and deleting additional entries

With this practice and hands on experience, I feel I am more confident in my ability to query SQL databases. I am also confident in my ability to analyze SQL code, which is very useful in a cyber security role, and to help me better defend from a SQL injection attack.