m0_72585393 2023-08-13 13:56 采纳率: 0%
浏览 138

sqlmap扫不出来漏洞,如何解决?

为什么存在一个sql注入漏洞的网页用sqlmap上扫不出来?
我用的是DVWA的low级别,在浏览器上确定了确实有sql注入漏洞,但是用sqlmap就扫不出来?
在命令行中输入

 python sqlmap.py -u "http://127.0.0.1/DVWA/vulnerabilities/sqli/" --cookie="security=low; PHPSESSID=o5f53p3bgnu9d41h3c2iubjla0"

输出

        ___
       __H__
 ___ ___[(]_____ ___ ___  {1.7.8.2#dev}
|_ -| . [,]     | .'| . |
|___|_  ["]_|_|_|__,|  _|
      |_|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 @ 13:50:40 /2023-08-13/

[13:50:45] [WARNING] you've provided target URL without any GET parameters (e.g. 'http://www.site.com/article.php?id=1') and without providing any POST parameters through option '--data'
do you want to try URI injections in the target URL itself? [Y/n/q]

[13:50:49] [INFO] testing connection to the target URL
[13:50:49] [INFO] testing if the target URL content is stable
[13:50:49] [INFO] target URL content is stable
other non-custom parameters found. Do you want to process them too? [Y/n/q]

[13:50:51] [INFO] testing if URI parameter '#1*' is dynamic
[13:50:51] [WARNING] URI parameter '#1*' does not appear to be dynamic
[13:50:51] [WARNING] heuristic (basic) test shows that URI parameter '#1*' might not be injectable
[13:50:51] [INFO] testing for SQL injection on URI parameter '#1*'
[13:50:51] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[13:50:51] [WARNING] reflective value(s) found and filtering out
[13:50:51] [INFO] testing 'Boolean-based blind - Parameter replace (original value)'
[13:50:51] [INFO] testing 'MySQL >= 5.1 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (EXTRACTVALUE)'
[13:50:51] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[13:50:51] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause (IN)'
[13:50:51] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLType)'
[13:50:52] [INFO] testing 'Generic inline queries'
[13:50:52] [INFO] testing 'PostgreSQL > 8.1 stacked queries (comment)'
[13:50:52] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries (comment)'
[13:50:52] [INFO] testing 'Oracle stacked queries (DBMS_PIPE.RECEIVE_MESSAGE - comment)'
[13:50:52] [INFO] testing 'MySQL >= 5.0.12 AND time-based blind (query SLEEP)'
[13:50:52] [INFO] testing 'PostgreSQL > 8.1 AND time-based blind'
[13:50:52] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind (IF)'
[13:50:52] [INFO] testing 'Oracle AND time-based blind'
it is recommended to perform only basic UNION tests if there is not at least one other (potential) technique found. Do you want to reduce the number of requests? [Y/n]

[13:50:53] [INFO] testing 'Generic UNION query (NULL) - 1 to 10 columns'
[13:50:53] [WARNING] URI parameter '#1*' does not seem to be injectable
[13:50:53] [CRITICAL] all tested parameters do not appear to be injectable. Try to increase values for '--level'/'--risk' options if you wish to perform more tests. If you suspect that there is some kind of protection mechanism involved (e.g. WAF) maybe you could try to use option '--tamper' (e.g. '--tamper=space2comment') and/or switch '--random-agent'
[13:50:53] [WARNING] HTTP error codes detected during run:
404 (Not Found) - 43 times, 403 (Forbidden) - 30 times

[*] ending @ 13:50:53 /2023-08-13/

完全找不到!但是确实网站是存在这个漏洞的!我该怎么办

img

  • 写回答

1条回答 默认 最新

  • ChatGPTᴼᴾᴱᴺᴬᴵ 2023-08-20 16:27
    关注

    该回答引用ChatGPT-3.5,仅供参考,不保证完全正确
    虽然你确定目标网站存在SQL注入漏洞,但是在使用sqlmap扫描时未能成功找到漏洞。这可能是由于多种因素引起的。以下是可能导致此问题的一些原因和解决方法:

    1. 漏洞检测限制: 一些网站可能会有安全机制,例如 Web 应用程序防火墙(WAF)或其他防御机制,可以检测和阻止SQL注入扫描。这可能会导致sqlmap无法正常工作。尝试使用sqlmap的 --tamper 参数来绕过这些保护机制,或者尝试使用 --random-agent 参数以模仿不同的用户代理。

    2. 漏洞参数错误: 在命令行参数中,你使用了 #1* 作为注入参数,但实际上可能应该使用其他参数。确保你已经正确标识了漏洞的参数,并在命令中使用正确的参数。

    3. 请求类型: 检测SQL注入漏洞时,HTTP 请求的类型(GET 或 POST)以及相应的参数位置都很重要。确保你已经设置了正确的请求类型和参数位置,以便sqlmap能够正确地注入。

    4. 漏洞级别和风险设置: sqlmap 的 --level--risk 参数决定了测试的深度和风险级别。尝试使用更高的级别和风险值,以便更广泛地测试可能的注入点。

    5. 漏洞环境变化: 如果目标网站在你扫描期间进行了变更,例如修复了漏洞,那么sqlmap可能无法找到漏洞。确保你的测试环境是稳定的。

    6. 数据库类型: sqlmap 默认会根据检测到的数据库类型进行测试。如果你知道目标网站使用的是特定的数据库类型,可以尝试使用 --dbms 参数来指定数据库类型,以便sqlmap能够更准确地进行测试。

    7. 自定义脚本和手工测试: 如果所有尝试都没有成功,你可以考虑编写自定义的脚本或手动测试漏洞,以便更深入地探索注入点。

    在尝试解决问题时,确保你遵循适用的法律法规并获得了授权来测试目标网站的安全性。未经授权的攻击是违法行为。如果你是网站的所有者或管理员,你可以考虑使用专业的渗透测试工具和专家来评估网站的安全性。


    该回答引用NewBing,仅供参考,不保证完全正确
    根据我搜索的结果,您可能遇到了以下几种情况之一:

    • 您的目标URL没有任何GET参数(例如 http://www.site.com/article.php?id=1 ),也没有通过选项'--data'提供任何POST参数。这意味着sqlmap无法找到注入点。您可以尝试在目标URL本身进行URI注入,或者提供正确的参数¹。
    • 您的目标网站有某种保护机制(例如WAF),阻止了sqlmap的注入请求。您可以尝试使用选项'--tamper'(例如'--tamper=space2comment')和/或切换'--random-agent'来绕过它¹。
    • 您的目标网站使用了不同的数据库管理系统(DBMS),而sqlmap默认使用MySQL。您可以使用选项'--dbms'来指定正确的DBMS²。
    • 您的目标网站使用了不同的编码方式,而sqlmap默认使用UTF-8。您可以使用选项'--charset'来指定正确的编码方式³。

    源: 与必应的对话, 2023/8/20
    (1) DVWA 1.9+: Blind SQL Injection with SQLMap - Medium. https://medium.com/hacker-toolbelt/dvwa-1-9-viii-blind-sql-injection-with-sqlmap-ee8d59fbdea7.
    (2) SQL Injection (DVWA - Low Level) with SQLMap - YouTube. https://www.youtube.com/watch?v=i1yle_9cJXw.
    (3) sqlmap工具的使用(DVWA)_salmap怎么连接dvwa_吃_早餐的博客-CSDN博客. https://bing.com/search?q=sqlmap+DVWA+low+level.
    (4) sqlmap问题及解决办法_sqlmap不好用_陌橙的博客-CSDN博客. https://blog.csdn.net/weixin_43590262/article/details/117229524.
    (5) Sqlmap自动化注入(dvwa从low到high) - FreeBuf网络安全行业门户. https://www.freebuf.com/articles/web/219101.html.
    (6) sqlmap工具的使用(DVWA)_salmap怎么连接dvwa_吃_早餐的博客-CSDN博客. https://blog.csdn.net/m0_52923241/article/details/115588173.

    评论

报告相同问题?

问题事件

  • 创建了问题 8月13日

悬赏问题

  • ¥15 系统 24h2 专业工作站版,浏览文件夹的图库,视频,图片之类的怎样删除?
  • ¥15 怎么把512还原为520格式
  • ¥15 MATLAB的动态模态分解出现错误,以CFX非定常模拟结果为快照
  • ¥15 求高通平台Softsim调试经验
  • ¥15 canal如何实现将mysql多张表(月表)采集入库到目标表中(一张表)?
  • ¥15 wpf ScrollViewer实现冻结左侧宽度w范围内的视图
  • ¥15 栅极驱动低侧烧毁MOSFET
  • ¥30 写segy数据时出错3
  • ¥100 linux下qt运行QCefView demo报错
  • ¥50 F1C100S下的红外解码IR_RX驱动问题