<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>goldcattle的专栏 - .Net </title><link>http://blog.csdn.net/goldcattle/category/298108.aspx</link><description>.Net related topic</description><dc:language>zh-CN</dc:language><lastUpdateTime>Thu, 20 Sep 2007 01:43:24 GMT</lastUpdateTime><ttl>60</ttl><item><dc:creator>goldcattle</dc:creator><title>SQL injection </title><link>http://blog.csdn.net/goldcattle/archive/2007/08/02/1721893.aspx</link><pubDate>Thu, 02 Aug 2007 01:34:00 GMT</pubDate><guid>http://blog.csdn.net/goldcattle/archive/2007/08/02/1721893.aspx</guid><wfw:comment>http://blog.csdn.net/goldcattle/comments/1721893.aspx</wfw:comment><comments>http://blog.csdn.net/goldcattle/archive/2007/08/02/1721893.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/goldcattle/comments/commentRss/1721893.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1721893</trackback:ping><description>SQL injection 
  
最近自己折腾一个数据库的东西，自己研究了一下SQL injection.

SQL injection 看起来还是挺有意思。可以看看youtube 上的一个SQL injection的实例还是比较简单的。http://www.youtube.com/watch?v=MJNJjh4jORY 

 

当然这是最基本的SQL injection了。这种最基本的问题一般都出在query的字段连接上。

SqlCommand cmd = new SqlCommand(
  "SELECT ID, FullName FROM User WHERE Login='"
  + Login.Text
  + "' AND Password='" 
  + Password.Text 
  + "'");

 
这种类型的错误相当常见，在一般情况下这个SQL语句执行没有任何问题，但是如果往用户的密码框里填上

' OR ''='

那么这个验证就被跳过去了。

当然高级的injecition 需要不停的试最终找到你的se&lt;img src ="http://blog.csdn.net/goldcattle/aggbug/1721893.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>