asp.net里面用appscan扫描部分漏洞与解决方法(一)
来源:互联网 发布:淘宝搞笑好评大全 编辑:程序博客网 时间:2024/05/17 23:57
1、sql注入攻击
使用参数方法录入,过滤单引号。
2、已解密登录请求
AppScan要求密码都要加密传输,最好是使用https。这个问题还可以使用ajax来触发帐号验证并登录,
function login() {
if ($("#txtUser").val() != '' && $("#txtPassWord").val() != '') {
$.ajax({
url: 'Login.ashx', //访问路径
data: 'username=' + $("#txtUser").val() + "&password=" + $("#txtPassWord").val() + "&cord=" + $("#txtVCode").val(), //需要验证的参数
type: 'post', //传值的方式
error: function() {//访问失败时调用的函数
alert("链接服务器错误!");
},
success: function(msg) {//访问成功时调用的函数,这里的msg是Login.ashx返回的值
if (msg == "登录成功!") {
window.location.href = '<%=url %>';
}
else {
alert(msg);
if (msg == "验证码不对!") {
$("#checkcordImg").attr("src", "validatecode.aspx?time=" + new Date());
$("#txtVCode").focus();
}
}
}
});
}
<table width="300" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td height="35" style="width: 47px">
</td>
<td width="18%">
用户名:
</td>
<td width="67%" align="left">
<input id="txtUser" type="text" maxlength="20" style=" width:135px" />
</td>
</tr>
<tr>
<td height="35" style="width: 47px">
</td>
<td>
密 码:
</td>
<td align="left">
<input id="txtPassWord" type="password" maxlength="50" style=" width:135px" />
</td>
</tr>
<tr>
<td height="54">
</td>
<td>
验证码:
</td>
<td align="left">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<asp:TextBox ID="txtVCode" runat="server" Width="80px"></asp:TextBox>
</td>
<td>
<img id="checkcordImg" src='validatecode.aspx' onclick="this.src='validatecode.aspx?abc='+Math.random()"
alt="图片看不清?点击重新得到验证码" style="cursor: hand;" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="验证码不能为空!"
ControlToValidate="txtVCode">*
</asp:RequiredFieldValidator>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3">
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
ShowSummary="False" />
</td>
</tr>
<tr>
<td style="width: 47px">
</td>
<td colspan="2" valign="bottom" align="center">
<img src="Img/imgLogin/btn_12.jpg" alt="" onclick="javascript:login();" />
<img src="Img/imgLogin/btn_14.jpg" alt="" width="59" height="25" onclick="reset();" />
</td>
</tr>
</table>
纯脚本提交登录
那个工具只会整个页面post
使用参数方法录入,过滤单引号。
2、已解密登录请求
AppScan要求密码都要加密传输,最好是使用https。这个问题还可以使用ajax来触发帐号验证并登录,
function login() {
if ($("#txtUser").val() != '' && $("#txtPassWord").val() != '') {
$.ajax({
url: 'Login.ashx', //访问路径
data: 'username=' + $("#txtUser").val() + "&password=" + $("#txtPassWord").val() + "&cord=" + $("#txtVCode").val(), //需要验证的参数
type: 'post', //传值的方式
error: function() {//访问失败时调用的函数
alert("链接服务器错误!");
},
success: function(msg) {//访问成功时调用的函数,这里的msg是Login.ashx返回的值
if (msg == "登录成功!") {
window.location.href = '<%=url %>';
}
else {
alert(msg);
if (msg == "验证码不对!") {
$("#checkcordImg").attr("src", "validatecode.aspx?time=" + new Date());
$("#txtVCode").focus();
}
}
}
});
}
<table width="300" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td height="35" style="width: 47px">
</td>
<td width="18%">
用户名:
</td>
<td width="67%" align="left">
<input id="txtUser" type="text" maxlength="20" style=" width:135px" />
</td>
</tr>
<tr>
<td height="35" style="width: 47px">
</td>
<td>
密 码:
</td>
<td align="left">
<input id="txtPassWord" type="password" maxlength="50" style=" width:135px" />
</td>
</tr>
<tr>
<td height="54">
</td>
<td>
验证码:
</td>
<td align="left">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<asp:TextBox ID="txtVCode" runat="server" Width="80px"></asp:TextBox>
</td>
<td>
<img id="checkcordImg" src='validatecode.aspx' onclick="this.src='validatecode.aspx?abc='+Math.random()"
alt="图片看不清?点击重新得到验证码" style="cursor: hand;" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="验证码不能为空!"
ControlToValidate="txtVCode">*
</asp:RequiredFieldValidator>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3">
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
ShowSummary="False" />
</td>
</tr>
<tr>
<td style="width: 47px">
</td>
<td colspan="2" valign="bottom" align="center">
<img src="Img/imgLogin/btn_12.jpg" alt="" onclick="javascript:login();" />
<img src="Img/imgLogin/btn_14.jpg" alt="" width="59" height="25" onclick="reset();" />
</td>
</tr>
</table>
纯脚本提交登录
那个工具只会整个页面post
所以改为纯脚本提交登录后它就无效了。
3、检测到隐藏目录
解决方法1:iis里面设置默认错误页面为我们指定的errpage.html页面,不要使用系统默认的错误页面。
解决方法2:在img文件夹里面放个空的默认页(比如空的index.aspx),这样就不会有【找不到页面或无权查看】的错误了。
- asp.net里面用appscan扫描部分漏洞与解决方法(一)
- 提供一些appscan漏洞解决方法(来自百度空间)
- AppScan Standard扫描漏洞处理方法
- AppScan扫描出的第一个漏洞
- Security Appscan Standard 漏洞扫描及补漏洞
- AppScan扫描“盲注”解决方法及“思路”。。。
- IBM Rational Appscan web漏洞扫描系统使用教程(图文)
- appscan(一)appscan环境的安装
- Asp.net MVC项目的部署(一):IIS以及Asp.net与IIS相关的部分
- Asp.net MVC项目的部署(一):IIS以及Asp.net与IIS相关的部分
- ASP.NET里面的身份验证和授权(一)
- Metasploit与漏洞扫描
- 一个WEB漏洞扫描系统的设计与实现(一)
- Asp.Net 小型网站的制作(一),涵盖了asp.net里面所有的基础知识
- 基于IBM Appscan 扫描的网站安全问题修改(.Net MVC)
- appscan漏洞--目录列表
- Appscan扫描器web漏洞
- 著名漏洞扫描工具IBM Rational AppScan 7.8.0.2 - 简体中文版下载(含破解补...
- 设计中不可忽略的产品状态
- C#如何给自定义控件添加说明(解释)
- 0.ring3-APC注入
- repeater插入,多选删除,条件查询实例(存储过程实现)
- Android的Window类
- asp.net里面用appscan扫描部分漏洞与解决方法(一)
- 雷锋科普:从HDMI到MHL,手机也走进高清输出的时代
- BS开发入门——Html
- 分类算法之logistic 回归模型
- Windows IOCP模型与Linux EPOLL模块之比较
- 10个时间管理技巧
- Adding and Removing Subviews(增加和删除子视图的官方文档)
- python的MD5实例
- 取当前日期上个月的月份再转化成varchar