November 22, 2022 at 10:05 PM
[color=#cccccc][font=roboto, sans-serif]Found this thread on other blackhat forum.[/font][font=roboto, sans-serif]I see it very interesting and very good explained for the all people who wants to understand the whole process of SQLi, becoming a succesfull hacker who dump databases.[/font][/color][hide][b][u][color=#eeeeee][size=x-large]Table of contents[/size][/color][/u][/b]SQL InjectionSQL Injection threatsSQLI : ConclusionSQL Injection AttacksHow Web Applications WorkServer-side TechnologiesHTTP Post RequestSQL Injection DetectionSQL Injection Attack CharactersTesting for SQL InjectionTypes of SQL InjectionBlind SQL InjectionBlind SQL Injection - Extract Database UserBlind SQL Injection - Extract Database NameBlind SQL Injection - Extract Table Column NameBlind SQL Injection - Extract Data from ROWSSQL Injection MethodologyAdvanced SQL InjectionBypass Website Logins Using SQL InjectionMD5 Hash PasswordFeatures of different DBMSSQL Injection ToolsRecommended ToolsOther ToolsEvasion TechniqueEvading IDSsHow to Defend Against SQL Injection AttacksWord of AdviceFinal WordsSQL Injection Detection Tools[color=#afafaf][font=roboto, sans-serif] [/font][/color][color=#eeeeee][size=x-large][u][b]1. SQL Injection[/b][/u][/size][/color]SQL injection is a type of web application vulnerability where an attacker can manipulate and submit a SQL command to retrieve the database information. This type of attack mostly occurs when a web application executes by using the user-provided data without validating or encoding it. It can give access to sensitive information such as social security numbers, credit card numbers, or other financial data to the attacker and allows an attacker to create, read, update, alter, or delete data stored in the backend database. It is a flaw in web applications and not a database or web server issue. Most programmers are still not aware of this threat.[color=#afafaf][font=roboto, sans-serif][img]https://i.gyazo.com/d1ae8f9456b64da34cd124dbb541b26e.png[/img][/font][/color][color=#afafaf][font=roboto, sans-serif]Fig 1.1: A recent study shows, above 40% of web attacks are still based on SQLI.[/font][/color][color=#afafaf][font=roboto, sans-serif] [/font][/color][color=#eeeeee][size=x-large][b][u]1.1 SQL Injection threats[/u][/b][/size][/color]Spoofing identity: Identity spoofing is a method followed by attackers. Here people are deceived into believing that a particular email or website has originated from the source which actually is not true.Changing prices: One more of problem related to SQL injection is it can be used to modify data. Here the attackers enter into an online shopping portal and change the prices of product and then purchase the products at cheaper rates.Tamper with database records: The main data is completely damaged with data alteration; there is even the possibility of completely replacing the data or even deleting the data.Escalation of privileges: Once the system is hacked, the attacker seeks the high privileges used by administrative members and gains complete access to the system as well as the network.Denial-of-service on the sewer: Denial-of-service on the server is an attack where users aren't able to access the system. More and more requests are sent to the sewer, which can't handle them. This results in a temporary halt in the services of the server.Complete disclosure of all the data on the system: Once the network is hacked the crucial and highly confidential data like credit card numbers, employee details, financial records, etc. are disclosed.Destruction of data: The attacker, after gaining complete control over the system, completely destroys the data, resulting in huge losses for the company.Voiding system's critical transaction: An attacker can operate the system and can halt all the crucial transactions performed by the system.Modifying the records: Attackers can modify the records of the company, which proves to be a major setback for the company's database management system.[color=#afafaf][font=roboto, sans-serif] [/font][/color][color=#eeeeee][size=x-large][u][b]1.2 SQLI : Conclusion[/b][/u][/size][/color]Structured Query Language (SQL) is basically a textual language that enables interaction with a database server. SQL commands such as INSERT, RETRIEVE, UPDATE, and DELETE are used to perform operations on the database. Programmers use these commands to manipulate data in the database server. SQL injection is defined as a technique that takes advantage of non-validated input vulnerabilities and injects SQL commands through a web application that are executed in a back-end database. Programmers use sequential SQL commands with client-supplied parameters making it easier for attackers to inject commands. Attackers can easily execute random SQL queries on the database server through a web application. Attackers use this technique to either gain unauthorized access to a database or to retrieve information directly from the database.[color=#afafaf][font=roboto, sans-serif] [/font][/color][color=#eeeeee][size=x-large][u][b]2. SQL Injection Attacks[/b][/u][/size][/color]On the basis of application used and the way it processes user supplied data, SQL injection can be used to implement the attacks mentioned below:Authentication bypass : Here the attacker could enter into the network without providing any authentic user name or password and could gain access over the network. he or she gets the highest privilege in the network.Information disclosure : After the unauthorized entry into the network, the attacjer gets access to sensitive data stored in the database.Compromised data integrity : The attacker changes the main content of the website and also enters malicious content into it.Compromiused availibility of data : The attacker uses this type of attack to delete the data related to audit information or any other crucial database information.Remote code execution : An attacker could modify, delete, or create data or even can create new accounts with full user rights on the server that shares files and folders. It allows an attacker to compromise the host operating system.[color=#afafaf][font=roboto, sans-serif] [/font][/color][color=#eeeeee][size=x-large][u][b]2.1 How Web Applications Work[/b][/u][/size][/color][color=#afafaf][font=roboto, sans-serif][img]https://i.gyazo.com/2746a0feb2b2d9283e022b328393f879.png[/img][/font][/color]A web application is a software program accessed by users over a network through a web browser. Web applications can be accessed only through a web browser (Internet Explorer, Mozilla Firefox, etc.). Users can access the application from any computer of a network. Based on web applications, web browsers also differ to some extent. Overall response time and speed is dependent on connection speed.Step 1: The user requests through the web browser from the Internet to the web server.Step 2: The Web Server accepts the request and forwards the request sent by the user to the applicable web application server.Step 3: The web application server performs the requested task.Step 4: The web applications accesses the entire database available and responds to the web server.Step 5: The web server responds back to the user as the transaction is complete.Step 6: Finally the information that the user requested appears on the monitor of the user. [color=#eeeeee][size=x-large][u][b]2.2 Server-side Technologies[/b][/u][/size][/color]This technology is used on the server side for client/server technology. For achieving business success, not only information is important, but we also need speed and efficiency. Server-side technology helps us to smoothly access, deliver, store, and restore information. Various server-side technologies include: ASP, ASP.Net, Cold Fusion, JSP, PHP, Python, and Ruby on Rails. Server side technologies like ASP.NET and SQL can be easily exploited by using SQL injections.Powerful server-side technologies like ASP.NET and database servers allow developers to create dynamic, data-driven websites with incredible ease.All relational databases, SQL Server, Oracle, IBM DB2, and MySQL, are susceptible to SQL injection attacks.SQL injection attacks do not exploit a specific software vulnerability; instead they target websites that do not follow secure coding practices for accessing and manipulating data stored in a relational database.The power of ASP.NET and SQL can easily be exploited by attackers using SQL injection attacks.[color=#afafaf][font=roboto, sans-serif] [/font][/color][color=#eeeeee][size=x-large][u][b]2.3 HTTP Post Request[/b][/u][/size][/color]An HTTP POST request creates a way of passing larger sets of data to the server. The HTTP POST requests are ideal for communicating with an XML web service. These methods are designed for data submission and retrieval on a web server.When a user provides information and clicks Submit, the browser submits a string to the web server that contains the user's credentials. This string is visible in the body of the HTTP or HTTPS POST request as: [code]select * from Users where (username = 'bart‘ and password = ‘simpson'


