如何确认SQL注入 [英] How to confirm SQL injection

查看:46
本文介绍了如何确认SQL注入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以确认特定的安全漏洞是通过 SQL 注入完成的吗?

Is there any way to confirm that a particular breach of security was done through SQL injection?

推荐答案

这里没有简单的方法,但是如果您启用了用于记录每个 sql 语句的 SQL 服务器,请点击此处这是我会做的.

There is no easy way here, but if you have the enabled the SQL server you use to log every single sql statement, here is what I would do.

通常,当我在某处进行 SQL 注入时,我会使用其中一个作为在结束前一个字符串后传递 Where 子句的始终正确的语句.

Normally, when I SQL inject somewhere, i use one of these as my always true statement for passing throgh the Where clause, after ending the former string.

1=1 
0=0

两者都用作:

blahblahblah' or 1=1 --

您不会在日常代码中使用此子句.所以如果你在你的历史中发现其中一个,那么,它是一个很好的候选者.测试sql历史找到:

You would not use this clauses in everyday code. So if you spot one of these in your history, well, it is a high candidate. Test the sql history to find :

(space)(number)(optional spaces)(equal)(optional spaces)(same number)(space)

请记住,这是启发式,并不总是有效,但可能是在发生后给出提示的唯一方法.另外,如果您对SQL注入有疑问,您应该检查字符串连接和参数使用的代码.

Keep in mind that is heuristical, and will not always work, but could be the only way to give a hint after it had happened . Also, if you are in doubt about SQL injection, you should check the code for string concatenation and use of parameters.

这篇关于如何确认SQL注入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆