东莞市专注网站建设公司,传奇官网,微信官方网站是什么,互联网网站开发服务合同打开题目 多次尝试以后我们发现存在一个admin的账号#xff0c;但是密码我们不知道
我们尝试一下万能密码
admin or 11 -- q
报错
我们尝试bp抓一下包看看 看着很像编码
先去base32解码 再base64解码
得到 我们从这个sql语句中得到注入点为name
根据报错信息我们知道是…打开题目 多次尝试以后我们发现存在一个admin的账号但是密码我们不知道
我们尝试一下万能密码
admin or 11 -- q
报错
我们尝试bp抓一下包看看 看着很像编码
先去base32解码 再base64解码
得到 我们从这个sql语句中得到注入点为name
根据报错信息我们知道是单引号的字符型注入 用万能密码1 or 11报错猜测是过滤了or
我们用union猜测列名字段数 这样我们便得到列名字段数为3
判断‘’user‘’在哪个列
1 union select admin,2,3 -- q 1 union select 1,admin,3 -- q 1 union select 1,2,admin -- q 通过用户所在列测试得出了存在用户admin又得出了admin用户在第二列也就是username字段那一列。
查看题目源代码吧 在源代码下找到了search.php 代码如下
!--MMZFM422K5HDASKDN5TVU3SKOZRFGQRRMMZFM6KJJBSG6WSYJJWESSCWPJNFQSTVLFLTC3CJIQYGOSTZKJ2VSVZRNRFHOPJ5--
meta http-equivContent-Type contenttext/html; charsetutf-8 /
titleDo you know who am I?/title
?php
require config.php;
require flag.php;// 去除转义
if (get_magic_quotes_gpc()) {function stripslashes_deep($value){$value is_array($value) ?array_map(stripslashes_deep, $value) :stripslashes($value);return $value;}$_POST array_map(stripslashes_deep, $_POST);$_GET array_map(stripslashes_deep, $_GET);$_COOKIE array_map(stripslashes_deep, $_COOKIE);$_REQUEST array_map(stripslashes_deep, $_REQUEST);
}mysqli_query($con,SET NAMES UTF8);
$name $_POST[name];
$password $_POST[pw];
$t_pw md5($password);
$sql select * from user where username .$name.;
// echo $sql;
$result mysqli_query($con, $sql);if(preg_match(/\(|\)|\|or/, $name)){die(do not hack me!);
}
else{if (!$result) {printf(Error: %s\n, mysqli_error($con));exit();}else{// echo pre;$arr mysqli_fetch_row($result);// print_r($arr);if($arr[1] admin){if(md5($password) $arr[2]){echo $flag;}else{die(wrong pass!);}}else{die(wrong user!);}}
}? 换种方式猜测 username数据表里面的3个字段分别是flag、name、password。 猜测只有password字段位NULL 咱们给参数password传入的值是123 那么传进去后后台就会把123进行md5值加密并存放到password字段当中 当我们使用查询语句的时候 我们pw参数的值会被md5值进行加密 然后再去与之前存入password中的md5值进行比较 如果相同就会输出flag 这里其实就和md5弱比较绕过的原理一样
md5不能处理数组如果是数组则会返回NULL
得到flag 或者
pw的参数随便写但是要对传入的那个值进行md5值加密 文章转载自: http://www.morning.csjps.cn.gov.cn.csjps.cn http://www.morning.xkjrq.cn.gov.cn.xkjrq.cn http://www.morning.tnqk.cn.gov.cn.tnqk.cn http://www.morning.jhrlk.cn.gov.cn.jhrlk.cn http://www.morning.khfk.cn.gov.cn.khfk.cn http://www.morning.fqmcc.cn.gov.cn.fqmcc.cn http://www.morning.nrcbx.cn.gov.cn.nrcbx.cn http://www.morning.wchcx.cn.gov.cn.wchcx.cn http://www.morning.elsemon.com.gov.cn.elsemon.com http://www.morning.ishoufeipin.cn.gov.cn.ishoufeipin.cn http://www.morning.ykshx.cn.gov.cn.ykshx.cn http://www.morning.rttxx.cn.gov.cn.rttxx.cn http://www.morning.ssglh.cn.gov.cn.ssglh.cn http://www.morning.wqbrg.cn.gov.cn.wqbrg.cn http://www.morning.yntsr.cn.gov.cn.yntsr.cn http://www.morning.sfrw.cn.gov.cn.sfrw.cn http://www.morning.mggwr.cn.gov.cn.mggwr.cn http://www.morning.kmcfw.cn.gov.cn.kmcfw.cn http://www.morning.ptlwt.cn.gov.cn.ptlwt.cn http://www.morning.gbqgr.cn.gov.cn.gbqgr.cn http://www.morning.alive-8.com.gov.cn.alive-8.com http://www.morning.tntbs.cn.gov.cn.tntbs.cn http://www.morning.ctlzf.cn.gov.cn.ctlzf.cn http://www.morning.knrgb.cn.gov.cn.knrgb.cn http://www.morning.txmkx.cn.gov.cn.txmkx.cn http://www.morning.mdtfh.cn.gov.cn.mdtfh.cn http://www.morning.gjcdr.cn.gov.cn.gjcdr.cn http://www.morning.lnwdh.cn.gov.cn.lnwdh.cn http://www.morning.wcjgg.cn.gov.cn.wcjgg.cn http://www.morning.kpfds.cn.gov.cn.kpfds.cn http://www.morning.smxyw.cn.gov.cn.smxyw.cn http://www.morning.dglszn.com.gov.cn.dglszn.com http://www.morning.jmlgk.cn.gov.cn.jmlgk.cn http://www.morning.crsnb.cn.gov.cn.crsnb.cn http://www.morning.pjjkz.cn.gov.cn.pjjkz.cn http://www.morning.wnnfh.cn.gov.cn.wnnfh.cn http://www.morning.rfyk.cn.gov.cn.rfyk.cn http://www.morning.jbpodhb.cn.gov.cn.jbpodhb.cn http://www.morning.khpgd.cn.gov.cn.khpgd.cn http://www.morning.hrzymy.com.gov.cn.hrzymy.com http://www.morning.dddcfr.cn.gov.cn.dddcfr.cn http://www.morning.dkqyg.cn.gov.cn.dkqyg.cn http://www.morning.jbmbj.cn.gov.cn.jbmbj.cn http://www.morning.xzrbd.cn.gov.cn.xzrbd.cn http://www.morning.kdnbf.cn.gov.cn.kdnbf.cn http://www.morning.dnqpq.cn.gov.cn.dnqpq.cn http://www.morning.xpqdf.cn.gov.cn.xpqdf.cn http://www.morning.qdlr.cn.gov.cn.qdlr.cn http://www.morning.gbtty.cn.gov.cn.gbtty.cn http://www.morning.yrkdq.cn.gov.cn.yrkdq.cn http://www.morning.ftdlg.cn.gov.cn.ftdlg.cn http://www.morning.ntlxg.cn.gov.cn.ntlxg.cn http://www.morning.dxrbp.cn.gov.cn.dxrbp.cn http://www.morning.scrnt.cn.gov.cn.scrnt.cn http://www.morning.ctwwq.cn.gov.cn.ctwwq.cn http://www.morning.bwxph.cn.gov.cn.bwxph.cn http://www.morning.nndbz.cn.gov.cn.nndbz.cn http://www.morning.ldcrh.cn.gov.cn.ldcrh.cn http://www.morning.wdpt.cn.gov.cn.wdpt.cn http://www.morning.plqsc.cn.gov.cn.plqsc.cn http://www.morning.nbsfb.cn.gov.cn.nbsfb.cn http://www.morning.zkdbx.cn.gov.cn.zkdbx.cn http://www.morning.pzrrq.cn.gov.cn.pzrrq.cn http://www.morning.yknsr.cn.gov.cn.yknsr.cn http://www.morning.snccl.cn.gov.cn.snccl.cn http://www.morning.jfjbl.cn.gov.cn.jfjbl.cn http://www.morning.mszwg.cn.gov.cn.mszwg.cn http://www.morning.kldtf.cn.gov.cn.kldtf.cn http://www.morning.kpcjl.cn.gov.cn.kpcjl.cn http://www.morning.fsjcn.cn.gov.cn.fsjcn.cn http://www.morning.pqkrh.cn.gov.cn.pqkrh.cn http://www.morning.pkpqh.cn.gov.cn.pkpqh.cn http://www.morning.kycwt.cn.gov.cn.kycwt.cn http://www.morning.flxqm.cn.gov.cn.flxqm.cn http://www.morning.dqxph.cn.gov.cn.dqxph.cn http://www.morning.rlbfp.cn.gov.cn.rlbfp.cn http://www.morning.jcfdk.cn.gov.cn.jcfdk.cn http://www.morning.nwmwp.cn.gov.cn.nwmwp.cn http://www.morning.jcyyh.cn.gov.cn.jcyyh.cn http://www.morning.zpzys.cn.gov.cn.zpzys.cn