SQL Injection - HACKING 17 Most Dangerous Hacking Attacks (2017)

HACKING 17 Most Dangerous Hacking Attacks (2017)

Chapter 11 – SQL Injection

Before I begin to talk about code injection, you should understand the meaning of the SQL Server.

Think about Facebook for a moment, and when you log in at first and create a new account. Facebook, in fact, any other large platform would require you to provide bare minimum details such as your:

• First Name

• Surname

• Date of Birth

• Username

• Password

Then all these details would be stored in an organized manner. Next, you would begin to add additional information about yourself such as your relationship status, then add Family members, as well friends. Again all these details are kept in the background away from the users and would all be kept in the DBMS – Database Management System.

DBMS would refer to as a collection of programs that would help you to access the database, also manipulate individual data, and help you to represent your data. Facebook is a lot more than just keep your data, as it would also be stored as a storage for your video contents, images, messages, and so on. However anytime when you log in to Facebook using the right username and password, your details would be coming up first as well everything that is related to you. Therefore Relational DBMS would be used most times, as also is the most popular. Such systems are:


• Microsoft SQL

• Oracle Server

As I mentioned, these are the most traditional relational DBMS servers on the market.

SQL – Structured Query Language, and this would be defined as a standard language when it comes to relational DBMS-s.

So what is SQL Injection you might ask? Well, this type of attack is on the top 5 lists when it comes to web application attack, mainly because it is super easy to perform. Commonly would be done on login screens where you should provide your username and password. The attacker first would type a SQL quote instead of a username and press enter. This would cause an issue behind in the SQL Server, therefore would cause an error if the website wasn’t properly built. The point is the attacker now would know there is a SQL Server behind the web application and so now would begin to implement the code injection. The code that would be injected it can be a simple code such as that I would ask for the SQP Server to allow me to log in without a password. Again back to Facebook if I would confront and interact with the login page, and I would use your username and your password instead of mine, Facebook would load your profile, not mine. So my point is that once you are interacting with the login page by typing something in there, you are communicating with the SQL Server at the back end. While you are talking to the back end of the SQL Server, you are interacting with the code that has been written. Therefore you might as well type your code in the Login field instead of your username or password to Create a SQL Injection.

Unfortunately, bad job of coding could leave open doors for the bad guys and surely they would take advantage of it. The problem is that if someone would be able to log in as an admin, without a password, they could have potentially had access to everything behind the database. Imagine that you would have access to everyone’s messages within Facebook that would be crazy right? Facebook might not be the worse, however, if someone would break into a Bank’s SQL Database, and have access to everyone’s Bank account that would be an entirely different story.

Programmers when writing the code, before completion must have a double, even triple check the web application making sure they have tidy up properly the back end so the bad guys wouldn’t be able to implement SQL Injection.