burp_sqli

0x01 SQL injection vulnerability in WHERE clause allowing retreval of hidden data

没啥好说的,注入点在category, payload '+OR+1=1--

0x02 SQL injection vulnerability allowing login bypass

经典的登录框SQL注入

登录框的话, 因为有个登陆逻辑在里面。 所以除了可以利用SQL注入拿数据,还可以绕过认证的到权限。

也就是传说中的万能密码进后台。

这里有提示: To solve the lab, perform a SQL injection attack that logs in to the application as the administrator user.

官方payload是:administrator'--

登录模块的SQL语句一般情况下,where子句中有包含口令和不包含口令两种情况。 如果包含口令,那么口令也可以注入(select * from user where username=... and password=...)

此处也可以用口令: ' or 1=1#

0x03 Lab: SQL injection UNION attack, determining the number of columns returned by the query

联合注入

联合注入的好处是union子句是可以带回内容的,如果内容可以打印出来,那就有回显不用盲注了。

核心思想就是用你想查的内容挤掉原本系统中合法的查询内容。因此要该查的不查,不该查的查。

image-20230615203631824

看到这张表了没? 脑补哪些内容是数据库来的,很明显有一张物品表,他的名称价格会在这里显示(看网页,猜数据库的能力)。

看到提示:

This lab contains a SQL injection vulnerability in the product category filter,

注入点在category.

现用order by 排序,如果超出列数会报错,猜出是3个列,但是这里要填写三个null。。。

payload:

https://0ab500d303ac119c81962bc200450065.web-security-academy.net/filter?category=Clothing%2c+shoes+and+accessories%27%20union%20select%20null,%20null,%20null--%20a