|
please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".。
解决方案:
(1) IIS管理器中找到Asp.Net网站->右键权限->给予Network Service所需的权限即可。
(2) 当前网站的根目录下编辑或新建一个web.config配置文件,在<System.web>中添加<customErrors mode="Off"/>
,注意备份,以免出现网站崩溃等情况!
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.。
解决方案:
(1) 在当前Aspx Webshell脚本文件里的@page属性处添加:enableEventValidation="false" enableViewStateMac="false"
。
(2) web.config配置文件里的<System.web>中添加<pages enableEventValidation="false" enableViewStateMac="false" />
。
<configuration>
<system.web>
<customErrors mode="Off"/>
<pages enableEventValidation="false" enableViewStateMac="false" />
</system.web>
</configuration>
注:如果访问报错后会在以下目录中生成一个记录文件,注意路径中的.NET版本,别忘了删除哦!
C:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesroot26676eb792c7e946cmd.aspx.cdcab7d2.compiled
The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.。
解决方案:
这种报错可能是因为IIS里的某些ASP.NET相关配置引起的,笔者没有找到具体原因,但在以前渗透测试案例中有遇到过,如果大家在遇到时可以尝试以下方法看是否能够绕过?
-
ashx一句话木马脚本;
-
AspxClient木马脚本;
-
SharPyShell木马脚本;
-
aspx msf执行shellcode脚本;
-
......
fatal error JS2008:保存编译状态时出错:未找到cvtres.exe。或者System.ComponentModel.Win32Exception: 拒绝访问。
解决方案:
这种报错是因为“网站安全狗的禁止IIS执行程序防护“引起的,只需将安全狗中的白名单文件作为参数来执行就不会再被拦截,这里简单记录下,会单独写在防护绕过专题里!
meterpreter > execute -Hi -f "c:windowssystem32cmd.exe" -a "C:WINDOWSMicrosoft.NETFrameworkv1.1.4322csc.exe"
本文始发于微信公众号(潇湘信安):常见ASPX木马报错原因及解决方案
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论