Flux rss
Bookmark Bookmark & Share
Attacchi da iniezione di comandi SQL Ataques por injeção de encomendas SQL Angriffe durch die Einschleusung von SQL Befehlen Attaques par injection de commandes SQL Ataques de inyección SQL

SQL Injection

SQL injection attacks are attacks against websites that rely on relational databases.

In this type of site, parameters are passed to the database in the form of an SQL query. As such, if the designer does not verify the parameters passed in the SQL query, a hacker can modify the query in order to access the entire database and even to modify its content.

Some characters make it possible to string together several SQL queries or to ignore the rest of the query. By inserting this type of character in the query, a hacker can potentially execute the query of his choice.

Given the following query, waiting for a user name as a parameter:

SELECT * FROM users WHERE name="$name";

A hacker simply needs to enter a name such as "toto" OR 1=1 OR name ="titi" for the query to become as follows:

SELECT * FROM users WHERE name="toto" OR 1=1 OR name ="titi";

With the above query, the WHERE clause is always performed, which means it will return records that correspond to all users.

Stored procedures

Moreover, some database management systems such as Microsoft SQL Server have stored procedures that make it possible to launch administration commands. These stored procedures are potentially dangerous in that they can make it possible for a malicious user to execute system commands that may lead to a possible intrusion.

Countermeasures

A number of rules can help you protect yourself against SQL injection attacks:

  • Verify the format of input data and particularly the presence of special characters;
  • Do not display explicit error messages displaying the query or a part of the SQL query;
  • Delete unused user accounts, and particularly default accounts;
  • Avoid accounts without passwords;
  • Keep the privileges of used accounts to a minimum;
  • Delete stored procedures.


Last update on Thursday October 16, 2008 02:43:15 PM.This document entitled « SQL injection attacks » from Kioskea (en.kioskea.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the licence, as this note appears clearly.
Cross-Site Scripting attacks Malicious code injection Cross-Site Scripting (sometimes abbreviated XSS or CSS) attacks are attacks targeting websites that dynamically display user content without checking and encoding the information entered by users. Cross-Site Scripting... en.kioskea.net/contents/attaques/cross-site-scripting.php3
Nuke attack Nuke attack Nukes are Window crashes caused by dimwitted users (who know your IP address) who decide to use a Windows 95 (not 98) bug where if someone repeatedly sends information packets to port 139, Windows displays a lovely and impressive blue... en.kioskea.net/contents/attaques/nuke.php3
Teardrop attack Fragment attack A "fragment attack" is a network saturation (denial-of-service) attack that exploits the fragmentation principle of the IP protocol. The IP protocol is used to fragment large packets into several IP packets each having a sequence... en.kioskea.net/contents/attaques/attaque-teardrop.php3
Visual FoxPro and SQL ServerVisual FoxPro and SQL Server Visual Foxpro 9 and SQL Server 2005 Is there a better alternative than using Visual FoxPro to manage efficiently a SQL Server? Here's an interesting question! For more information see the article:... en.kioskea.net/faq/sujet-1061-visual-foxpro-and-sql-server
Remote Access to SQL express dbHello, I have microsoft sql express installed on one computer running on windows authentication. I am trying to access the tables in one of the databases on it from another computer. When i enter the server ip and use windows authentication, it logs... en.kioskea.net/forum/affich-94992-remote-access-to-sql-express-db
Database connectivity with sql server 2005Hello, Hii freiends, i just want to know how to make the database connectivity with sql server 2005 in c# and asp.net website? please help me, thanx in advance. en.kioskea.net/forum/affich-64782-database-connectivity-with-sql-server-2005
Use sql query in excel macroHello, i have created a sql query using "new database query" in excel. i need to use that query in a macro and use variables in the query. the bold text needs to be substituted with variable which i get as user input. for example fd00000001 needs to... en.kioskea.net/forum/affich-63451-use-sql-query-in-excel-macro
Download SQL Script BuilderSQL Script Builder is a program which allows to design an SQL script with the MySql format, MS SQL, Oracle, Pervasive or PostgreSQL from a database. This script will move all or a part of the tables of the specified database to the desired... en.kioskea.net/telecharger/telecharger-3430-sql-script-builder
Download SQL ExportSQL Export is a database application which allows you to view and export data formats like : CSV, HTML, TXT, XLS, XML .You can create visually and manually queries and format the output of the individual fields .It also allows you to save and re-use... en.kioskea.net/telecharger/telecharger-2241-sql-export
Download Quick sql db changerThis software allows you to modify the default database associated with a SQL source (defined in the ODBC 32). The program is in the small taskbar (on the left side of the clock) and is quickly accessible, so that there is no need going back to the... en.kioskea.net/telecharger/telecharger-2478-quick-sql-db-changer
NATO boosts cyber-attack response force: senior officialA man is looking at his computer screen. NATO has put in place special emergency response teams to deal with cyber terrorism following a serious attack on member state Estonia last year, a senior official said on Friday. NATO has put in place... en.kioskea.net/actualites/nato-boosts-cyber-attack-response-force-senior-official-10266-actualite.php3
Sri Lanka army website hacked: defence ministrySri Lankan soldiers stand guard two kilometers from the front line on Puthukkudiyiruppu on April 24, 2009. The Sri Lankan army's website has been targeted in a "cyber terrorism" attack by Tamil rebels, the defence ministry said Friday, and replaced... en.kioskea.net/actualites/sri-lanka-army-website-hacked-defence-ministry-12708-actualite.php3
Amazon's Google phone alliance ramps up attack on iTunesInternet retail titan Amazon has ramped up its attack on Apple's iTunes by having links to its MP3 online music and movie store built into a "Google phone" due out next month. Internet retail titan Amazon has ramped up its attack on Apple's iTunes... en.kioskea.net/actualites/amazon-s-google-phone-alliance-ramps-up-attack-on-itunes-10719-actualite.php3
SYN attackSYN attack The "SYN attack" (also called "TCP/SYN Flooding") is a network saturation (denial-of-service) attack that exploits the Three-way handshake mechanism of the TCP protocol. The three-way handshake is the way in which any "reliable"... en.kioskea.net/contents/attaques/attaque-syn.php3
Denial of service attackIntroduction to denial-of-service attacks A "denial-of-service attack" (abbreviated DoS) is a type of attack that aims to make an organization's services or resources unavailable for an indefinite amount of time. Most of the time, these attacks are... en.kioskea.net/contents/attaques/dos.php3
Ping of death attackPing of death attack The ping of death attack is one of the oldest network attacks. The principle of ping of death simply involves creating an IP datagram whose total size exceeds the maximum authorized size (65,536 bytes). When such a packet is... en.kioskea.net/contents/attaques/attaque-ping-de-la-mort.php3