摘要: How to access existing files safely FileInfo file = new FileInfo(Path.Combine(。。。。。在网站中如果使用get方法进行传递文件名称的时候,比如:http://localhost:4245/WebSite2/getfile.aspx?filename=example2.容易被攻击 如http://localhost:4245/WebSite2/getfile.aspx?filename=web.config也可以http://localhost:4245/WebSite2/getfile.aspx?filename=h 阅读全文
posted @ 2011-03-26 09:27 Sum_yang 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 1、通过写入 OR 1=1 等等形式进行注入 OR 1=1 '--- 这个写法使得后面的内容被去掉,比如 select * from News where uu='' or 1=1 '--- and uuu='' 后面将被省略2、为了获取整个数据表的表结构 使用 hava 1=13、可通union select sum(username) from logins-- 来获取某个字段的类型4、通过'; insert into logins values('yourUsername', 'yourPassword 阅读全文
posted @ 2011-03-26 06:32 Sum_yang 阅读(251) 评论(0) 推荐(0) 编辑
摘要: asp.net的每一个请求都包含一个身份验证,即使你没有使用。通过page.user属性来实现默认情况下,在web.config中是<authentication mode= “ Windows “ /> 因此User.Identity.Name 为计算机名称+\登录名 None Uses no authentication. Your application expects only anonymous users, or, if you wish, your application can provide its own authentication process. Form 阅读全文
posted @ 2011-03-26 06:06 Sum_yang 阅读(110) 评论(0) 推荐(0) 编辑