SQL Statements — SQL Injection Fundamentals — HTB Academy Walkthrough
TIER 0 MODULE: SQL INJECTION FUNDAMENTALS
SECTION: SQL Statements
Please open your pwnbox or connect to the vpn in order to complete the tasks.
If you are not registered in HTB Academy, then use this link to register now: https://referral.hackthebox.com/mzxKOJt
1. What is the department number for the ‘Development’ department?
First, establish a connection between you and the database.
mysql -u root -h <target-ip> -P <port> -p
Enter the password when asked.
Use the command to list all databases.
SHOW databases;
Then navigate into the employees
database.
USE employees;
After entring the database, list all tables in that database.
SHOW tables;
Now view the all records in the departments table.
SELECT * FROM departments;
Check the department number of the development department and submit as the answer.
Answer: d005
☣️ HAPPY ETHICAL HACKING ☣️
DISCLAIMER: THIS CONTENT DOES NOT BELONG TO ME, I AM JUST WRITING A WALK-THROUGH OF A FREE MODULE OF HACK THE BOX ACADEMY. (WRITING WALKTHROUGHS OF FREE MODULES IS PERMITTED BY HTB ACADEMY)