<?xml version="1.0" encoding="GB2312"?>
<rss VERSION="2.0">
<channel>
<title>涂丫论坛</title>
<link>http://www.nuoya.org/bbs</link>
<description>诺亚安全 论坛最新发言.</description>
<item><title>对杭州人才网的测试</title>
<link>http://www.nuoya.org/bbs/forum_posts.asp?TID=97</link>
<description><![CDATA[<P>六期我正好没收到</P>
<P>多谢</P>]]></description>
<pubDate>星期五, 19 十一月 2004 16:10:33 GMT</pubDate>
<comments total="1">http://www.nuoya.org/bbs/forum_posts.asp?TID=97</comments>
<category domain="http://www.nuoya.org/bbs/forum/default.asp?C=8"></category>
</item>
<item><title>ASP+ACESS的防范</title>
<link>http://www.nuoya.org/bbs/forum_posts.asp?TID=88</link>
<description><![CDATA[<P>ASP+ACESS的防范&nbsp;&nbsp;&nbsp; by ZeTa</P>
<P><BR> 前日无聊，在baidu里找了下“ASP安全”，结果却查到N多入侵的教程而安全配置的资料相对很少很少，介于现在的文章都是教 怎么入侵，那我就献丑下，把我自己如何防护的方法说一下吧.。更希望能引出更多的安全防范方面的讨论。 <BR> 我现在所假设的是asp整站系统+access数据库的情况，至于SQL+asp的，风清扬有过发表，高手的二篇文章真的精彩极 了；可惜目前个人网站基本都没有这个条件，所以我讲下asp+access的组合，如果有表达错误的地方，希望大家严厉地批评并 指出，多谢：）</P>
<P> 1.&nbsp;第一个应该是管理员登陆时的密码较验了，如输入1’or’1’=’1等就可以直接进入管理员页面。虽说这个漏洞 很老了，但是目前存在这个漏洞的系统很多，尤其是新闻系统，二年前开发的ASP程序基本都存在着这个漏洞；其实只要把’用别的符 号代替下就可以避免类似错误的。</P>
<P><BR>2.&nbsp;第二个是大家用烂的对于参数过滤不严而导致的跨表查询。如x.asp?id=2 and  1=1很多人都知道怎么攻击，却不知道如何堵住这漏洞，这倒是个很奇怪的现象，既然由于id参数过滤没有过滤引起的攻击，那我们 就应该在出现漏洞的那个页面中加入这样一段代码<BR>&lt;%<BR>dim ZeTa<BR>ZeTa=request("id")<BR>if isnumeric(ZeTa)=0 or ZeTa="" then<BR>response.write "oh my god!!!there's a hack!!!"<BR>response.end<BR>end if<BR>%&gt;<BR>如果你愿意，可以把进行类似攻击的人重定向到别的页面去，这里就不多说了。</P>
<P><BR> 3.&nbsp;session认证不得不说是个对付cookie伪造的好方法。而且可以严格根据用户的级别使用户进入相应页面 。具体可以参照动网的后台验证代码。</P>
<P>&nbsp;</P>
<P> 4.&nbsp;把数据库进行MD5加密。下载回来的ASP源程序，有多半是没有加密的，密码明文躺在那儿，看着怪不舒服的，为 了你的安全，别懒了，动手吧。</P>
<P>A.&nbsp;从动网那里拉个MD5.ASP过来，作为加密你数据库用的</P>
<P>B.&nbsp;然后在你的用户登陆页面最上边插入这样一句：&lt;!--#include file="md5.asp"--&gt;</P>
<P> C.&nbsp;接着找到大概这样一句话：pass=Request("pass")，把它改成pass=md5(Reques t("pass"))<BR> 这样一来，你的数据库就算被下载，也有一段时间让对方破解了，如果你的密码够强壮，那你嘿嘿嘿地笑吧。由于采用了session 认证防止了cookie伪造，安全系数又加强了很多。</P>
<P><BR> 5.&nbsp;数据库防下载。在第四期的X档案LCX提到了一个暴网站数据库的方法，很痛苦地，我的小站也被暴了下。其实网络 上早有资料介绍更改数据库结构从而防止下载。<BR> 首先在你的MDB文件中建一个表，表中取一个字段名随便叫什么，接着在表里建一个字段。字段中填入:&lt;%=’a’-1%& gt;，最后在数据库名前加个#，个人认为，这样更改的话应该相对比较安全。当然也不能保证绝对安全，现在的网络，牛人太多，说 不定文章出来时已经又有别的方法下载咯。</P>
<P><BR> 6.&nbsp;post攻击。常见的就是把登录页面拉到自己本地去，然后修改一些参数再次提交，如果你的全部数据过滤都在表单 上，那么你就可能不幸了；常见的例子就是留言本，可以进行post提交数据。那么如何防止呢？这样一段代码可以检查对方提交的u rl是否来自外部。</P>
<P><BR>&lt;%<BR>dim server_v1,server_v2<BR>server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))<BR>server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))<BR>if mid(server_v1,8,len(server_v2))&lt;&gt;server_v2 then<BR>response.write "不要从站点外提交参数"<BR>response.end<BR>end if<BR>%&gt;</P>
<P> 7.&nbsp;文件上传。LCX大哥的hackbook里收集了好几个关于上传漏洞利用的文章。又很大地扩充了我的防范思路。 个人感觉如果不怕麻烦的话可以把上传的文件全部读出，如文件格式，文件大小，文件里是否包含有恶意字符等。当然我们不是专业的代 码编写者，可以向写的好的程序借鉴的呀。</P>
<P> 文章写到结尾的时候动网的上传文件出了一个很大的漏洞，大致地看了下，很多网站的上传程序都有这种类似的错误，也就是说一个AS P后门就轻轻把所以的防范一指弹破，可怕ing……</P>
<P>后来到幻影看了下，应该是文件名字符串截断的问题，如果想让没有破坏力，路径中不允许包含 . 就可以了。因此就这个漏洞，这样段代码应该可以了<BR>If inStr(Request("formPath",".")) &gt; 0 Then Response.write "漏洞已补" :Response.end</P>
<P> 这篇文章是看到了很多网站被涂了页面才写的，个人以为，找漏洞是好事，但找出后何必把人家改得面目全非？当然我们没本事叫人家不 改，所以只有先动手改自己了。</P>
<P> 文章写出后也感觉有些地方不是很完美，希望大家把我没说好的地方补全；也感谢lilo在我写动网漏洞补救时给的帮助，以前我老是 损你，呜呜呜~~~真的对不起哦，借这宝贵的版面再次感谢你：）</P>
<P>附风清扬的文件类型校验代码</P>
<P><BR>'判断文件类型是否合格<BR>Private Function CheckFileExt (fileEXT)<BR>dim Forumupload<BR>Forumupload="gif,jpg,bmp,jpeg"<BR>Forumupload=split(Forumupload,",")<BR>&nbsp;for i=0 to ubound(Forumupload)<BR>&nbsp;&nbsp;if lcase(fileEXT)=lcase(trim(Forumupload(i))) then&nbsp;&nbsp;&nbsp;CheckFileExt=true<BR>&nbsp;&nbsp;&nbsp;exit Function<BR>&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;CheckFileExt=false<BR>&nbsp;&nbsp;end if<BR>&nbsp;next<BR>End Function</P>
<P>‘验证文件内容的合法性<BR>set MyFile = server.CreateObject ("Scripting.FileSystemObject")<BR>set MyText = MyFile.OpenTextFile (sFile, 1) ' 读取文本文件<BR>sTextAll = lcase(MyText.ReadAll): MyText.close '判断用户文件中的危险操作<BR>sStr ="8|.getfolder|.createfolder|.deletefolder|.createdirectory|<BR>.deletedirectory"<BR>sStr = sStr &amp; "|.saveas|wscript.shell|script.encode"<BR>sNoString = split(sStr,"|")<BR>for i = 1 to sNoString(0) <BR>if instr(sTextAll, sNoString(i)) &lt;&gt; 0 then<BR>sFile = Upl.Path &amp; sFileSave: fs.DeleteFile <BR>sFileResponse.write "&lt;center&gt;&lt;br&gt;&lt;big&gt;"&amp; sFileSave &amp;"文件中含有与操作目录等有关的命令"&amp;_<BR>"&lt;br&gt;&lt;font color=red&gt;"&amp; mid(sNoString(i),2)  &amp;"&lt;/font&gt;，为了安全原因，&lt;b&gt;不能上传。&lt;b&gt;"&amp;_"&l t;/big&gt;&lt;/center&gt;&lt;/html&gt;" <BR>Response.end <BR>end if<BR>next<BR></P>]]></description>
<pubDate>星期三, 30 六月 2004 19:23:53 GMT</pubDate>
<comments total="0">http://www.nuoya.org/bbs/forum_posts.asp?TID=88</comments>
<category domain="http://www.nuoya.org/bbs/forum/default.asp?C=8"></category>
</item>
<item><title>劫持西祠胡同讨论版</title>
<link>http://www.nuoya.org/bbs/forum_posts.asp?TID=84</link>
<description><![CDATA[晕&nbsp; 谢谢你哎]]></description>
<pubDate>星期日, 23 五月 2004 21:09:22 GMT</pubDate>
<comments total="4">http://www.nuoya.org/bbs/forum_posts.asp?TID=84</comments>
<category domain="http://www.nuoya.org/bbs/forum/default.asp?C=8"></category>
</item>
<item><title>NC.exe的参数及使用</title>
<link>http://www.nuoya.org/bbs/forum_posts.asp?TID=165</link>
<description><![CDATA[不太懂<IMG src="smileys/smiley17.gif" border="0">]]></description>
<pubDate>星期三, 29 八月 2007 15:27:30 GMT</pubDate>
<comments total="1">http://www.nuoya.org/bbs/forum_posts.asp?TID=165</comments>
<category domain="http://www.nuoya.org/bbs/forum/default.asp?C=19"></category>
</item>
<item><title>从西亚购物得到后门</title>
<link>http://www.nuoya.org/bbs/forum_posts.asp?TID=132</link>
<description><![CDATA[意料之中<IMG src="smileys/smiley2.gif" border="0">]]></description>
<pubDate>星期二, 04 十月 2005 10:27:56 GMT</pubDate>
<comments total="3">http://www.nuoya.org/bbs/forum_posts.asp?TID=132</comments>
<category domain="http://www.nuoya.org/bbs/forum/default.asp?C=8"></category>
</item>
<item><title>诺亚安全前三关过关说明</title>
<link>http://www.nuoya.org/bbs/forum_posts.asp?TID=109</link>
<description>sogood!</description>
<pubDate>星期四, 30 十二月 2004 20:55:39 GMT</pubDate>
<comments total="9">http://www.nuoya.org/bbs/forum_posts.asp?TID=109</comments>
<category domain="http://www.nuoya.org/bbs/forum/default.asp?C=12"></category>
</item>
<item><title>dvbbs7.1简单得到shell的方法</title>
<link>http://www.nuoya.org/bbs/forum_posts.asp?TID=124</link>
<description><![CDATA[<P>&nbsp;没怎么明白!!!&nbsp; 人太笨了 没办法!</P>]]></description>
<pubDate>星期日, 03 七月 2005 16:13:28 GMT</pubDate>
<comments total="2">http://www.nuoya.org/bbs/forum_posts.asp?TID=124</comments>
<category domain="http://www.nuoya.org/bbs/forum/default.asp?C=6"></category>
</item>
<item><title>MP3,猫噎着了～</title>
<link>http://www.nuoya.org/bbs/forum_posts.asp?TID=123</link>
<description><![CDATA[当然假的&nbsp;&nbsp; 傻子]]></description>
<pubDate>星期一, 30 五月 2005 09:28:23 GMT</pubDate>
<comments total="8">http://www.nuoya.org/bbs/forum_posts.asp?TID=123</comments>
<category domain="http://www.nuoya.org/bbs/forum/default.asp?C=13"></category>
</item>
<item><title>发个帖子~利用554端口入侵</title>
<link>http://www.nuoya.org/bbs/forum_posts.asp?TID=43</link>
<description><![CDATA[<P>445，去年年底公开的漏洞</P>
<P>溢出就是好，直接得到shell，大都且是ADMIN SHELL</P>
<P>下面的再写就有看头了，嘿嘿</P>]]></description>
<pubDate>星期六, 06 三月 2004 03:31:46 GMT</pubDate>
<comments total="2">http://www.nuoya.org/bbs/forum_posts.asp?TID=43</comments>
<category domain="http://www.nuoya.org/bbs/forum/default.asp?C=8"></category>
</item>
<item><title>再谈sql注入</title>
<link>http://www.nuoya.org/bbs/forum_posts.asp?TID=125</link>
<description><![CDATA[<P><A href="http://hackvip.cn/more.asp?name=tiantang&amp;id=2729" target="_blank">http://hackvip.cn/more.asp?name=tiantang&amp;id=2729</A></P>
<P>这里有<A href="http://hackvip.cn/more.asp?name=tiantang&amp;id=2729" target="_blank">SQL注入与ASP木马上传</A><BR></P>]]></description>
<pubDate>星期一, 04 七月 2005 17:28:04 GMT</pubDate>
<comments total="2">http://www.nuoya.org/bbs/forum_posts.asp?TID=125</comments>
<category domain="http://www.nuoya.org/bbs/forum/default.asp?C=6"></category>
</item>
</channel>
</rss>