联奕科技工程体系

 找回密码
 立即注册
查看: 167|回复: 3

【等保测评】

[复制链接]

35

主题

52

帖子

5338

积分

版主

Rank: 7Rank: 7Rank: 7

积分
5338
发表于 2019-9-6 09:54:11 | 显示全部楼层 |阅读模式
本帖最后由 gaotao 于 2019-10-24 20:17 编辑

1. Apache Tomcat examples 目录可访问导致多个漏洞
受影响站点
http://192.168.66.75:8080/lysdc;
详细描述
Apache Tomcat是一个流行的开放源码的JSP应用服务器程序。Apache Tomcat默认安装包含”/examples”目录,该目录下多个serverlet,jsp文件均可被执行,导致session、cookie操纵等漏洞。
解决办法
限制对example目录的访问权限。
威胁分值
8
危险插件
发现日期
2013-03-01
CVSS评分
7.3(CVSS:3.0/AV:N/AC/PR:N/UI:N/S:U/C/I/A)
解决办法:
直接删除对应目录

2. Microsoft Windows MHTML脚本代码注入漏洞(MS11-026)
受影响站点
http://192.168.66.75:8080/lysdc;
详细描述
Microsoft Windows是微软发布的非常流行的操作系统。Microsoft Windows使用MHTML时存在安全漏洞,远程攻击者可利用此漏洞将任意脚本代码注入到当前浏览器会话,获取敏感信息,欺骗内容或在目标网站执行任意操作。此漏洞源于MHTML解释MIME格式请求文档中内容块的方式。在某些情况下,此漏洞可能会允许攻击者在运行在受害者IE中的Web请求的响应中注入客户端脚本。该脚本可欺骗内容、泄露信息或以目标用户身份在受影响站点进行攻击。
解决办法
服务器端过滤参数中的回车换行。
威胁分值
6
危险插件
发现日期
2011-01-28
CVE编号
BUGTRAQ
NSFOCUS
CNNVD编号
CNCVE编号
CNCVE-20110096
CVSS评分
5.4(CVSS:3.0/AV:N/AC/PR/UI:R/S:C/C/I/A:N)
CNVD编号


解决办法:安装对应补丁

3. 检测到基于HTTP的基本认证
受影响站点
http://192.168.66.75:8080/lysdc;
详细描述
在HTTP中,基本认证是一种用来允许Web浏览器或其他客户端程序在请求时提供用户名和口令形式的身份凭证的一种登录验证方式。在发送之前是以用户名追加一个冒号然后串接上口令,并将得出的结果字符串再用Base64算法编码。例如,提供的用户名是Aladdin、口令是open sesame,则拼接后的结果就是Aladdinpen sesame,然后再将其用Base64编码,得到QWxhZGRpbjpvcGVuIHNlc2FtZQ==。最终将Base64编码的字符串发送出去,由接收者解码得到一个由冒号分隔的用户名和口令的字符串。由于基于HTTP的基本认证仅仅对用户名和口令形式的身份凭证进行了Base64编码,在传输过程中没有使用SSL/TLS这样的传输层安全的协议,因此,这些以明文方式传输的身份凭证很容易被拦截并破解,从而造成用户的身份凭证信息泄露。
解决办法
我们建议在HTTPS协议基础上使用基本认证。
威胁分值
5
危险插件
发现日期
2001-01-01
CVSS评分
5.3(CVSS:3.0/AV:N/AC/PR:N/UI:N/S:U/C/I:N/A:N)


解决方式:https需要域名来配置,学校申请到域名后,然后配置Tomcat,https协议

4.弱口令、有默认账号、登录sql注入

解决方式:通过单点登录解决,默认账户,去掉admin,添加lyadmin来解决
5.低微漏洞忽略,开发需要解决漏洞,请单独提前出来,类似需求,请先申请售后组同事解决




回复

使用道具 举报

35

主题

52

帖子

5338

积分

版主

Rank: 7Rank: 7Rank: 7

积分
5338
 楼主| 发表于 2019-10-24 20:18:04 | 显示全部楼层
6.http的put /delete 等方法使用漏洞
常见主机漏洞检测
高风险:测试HTTP危险方法
主机列表(共3项)
a.主机及端口:218.198.32.212 [ tcp / 8081 ]
输出信息:
Although we could not exploit this it seems that the PUT method is enabled
(auth protected) at this web server for the following directories:
http://218.198.32.212:8081/
Although we could not exploit this it seems that the DELETE method is
enabled (auth protected) at this web server for the following directories:
http://218.198.32.212:8081/
b.主机及端口:218.198.32.212 [ tcp / 5010 ]
输出信息:
Although we could not exploit this it seems that the PUT method is enabled
(auth protected) at this web server for the following directories:
http://218.198.32.212:5010/
Although we could not exploit this it seems that the DELETE method is
enabled (auth protected) at this web server for the following directories:
http://218.198.32.212:5010/
c.主机与端口:218.198.32.212 [ tcp / 5001 ]
输出信息:
Although we could not exploit this it seems that the PUT method is enabled
(auth protected) at this web server for the following directories:
http://218.198.32.212:5001/
http://218.198.32.212:5001/info/
Although we could not exploit this it seems that the DELETE method is
enabled (auth protected) at this web server for the following directories:
http://218.198.32.212:5001/
http://218.198.32.212:5001/info/
风险描述
配置错误的Web服务器允许远程客户端执行危险的HTTP方法,如PUT和DELETE。此脚本检查它们是否已启用,并且可能被滥用以上载或删除文件。
- 启用PUT方法:这可能允许攻击者在此Web服务器上上载和运行任意代码。
- 启用DELETE方法:这可能允许攻击者删除此Web服务器上的其他文件。
解决方案
修改软件配置或者禁止设备远程访问或者参考引用网页或者使用铱迅安全防护设备
相关编号:CVE\CNVD\CNNVD
参考信息:OWASP:OWASP-CM-001
代码增加


/**
         *
            * @Title: servletContainer  
            * @Description: 等保测评要求,屏蔽http协议无用的put delete等方法,如果配置了https协议则无需这样做
            * 风险描述
                        配置错误的Web服务器允许远程客户端执行危险的HTTP方法,如PUT和DELETE。此脚本检查它们是否已启用,并且可能被滥用以上载或删除文件。
                        - 启用PUT方法:这可能允许攻击者在此Web服务器上上载和运行任意代码。
                        - 启用DELETE方法:这可能允许攻击者删除此Web服务器上的其他文件
            * @param @return    参数  
            * @return EmbeddedServletContainerFactory    返回类型  
            * @throws
         */
        @Bean  
        public EmbeddedServletContainerFactory servletContainer() {  
            TomcatEmbeddedServletContainerFactory tomcat = new TomcatEmbeddedServletContainerFactory() {// 1  
                protected void postProcessContext(Context context) {  
                    SecurityConstraint securityConstraint = new SecurityConstraint();  
                    securityConstraint.setUserConstraint("CONFIDENTIAL");  
                    SecurityCollection collection = new SecurityCollection();  
                    collection.addPattern("/*");  
                    collection.addMethod("HEAD");  
                    collection.addMethod("PUT");  
                    collection.addMethod("DELETE");  
                    collection.addMethod("OPTIONS");  
                    collection.addMethod("TRACE");  
                    collection.addMethod("COPY");  
                    collection.addMethod("SEARCH");  
                    collection.addMethod("PROPFIND");  
                    securityConstraint.addCollection(collection);  
                    context.addConstraint(securityConstraint);  
                }  
            };
            
            return tomcat;
        }
回复 支持 反对

使用道具 举报

35

主题

52

帖子

5338

积分

版主

Rank: 7Rank: 7Rank: 7

积分
5338
 楼主| 发表于 2019-11-7 09:17:22 | 显示全部楼层
Tomcat漏洞可以更新Tomcat版本到指定大分支下的最新版本,既可以解决所有漏洞问题,下面是Tomcat最新分支下,修复完漏洞的版本:
下载最新版本的Tomcat

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 支持 反对

使用道具 举报

35

主题

52

帖子

5338

积分

版主

Rank: 7Rank: 7Rank: 7

积分
5338
 楼主| 发表于 2019-11-18 20:56:07 | 显示全部楼层
本帖最后由 gaotao 于 2019-11-18 20:59 编辑

Tomcat的web配置,等保测评
  1. <filter-mapping>
  2.                 <filter-name>httpHeaderSecurity</filter-name>
  3.                 <url-pattern>/*</url-pattern>
  4.                 <dispatcher>REQUEST</dispatcher>
  5.         </filter-mapping>
  6.         

  7.     <filter>
  8.             
  9.         <filter-name>httpHeaderSecurity</filter-name>
  10.         <filter-class>org.apache.catalina.filters.HttpHeaderSecurityFilter</filter-class>
  11.         <async-supported>true</async-supported>
  12.                         
  13.                 <init-param>
  14.                         <param-name>antiClickJackingEnabled</param-name>
  15.                         <param-value>true</param-value>
  16.                 </init-param>
  17.                 <init-param>
  18.                         <param-name>antiClickJackingOption</param-name>
  19.                         <param-value>SAMEORIGIN</param-value>
  20.                 </init-param>
  21.                 <init-param>
  22.                         <param-name>blockContentTypeSniffingEnabled</param-name>
  23.                         <param-value>true</param-value>
  24.                 </init-param>
  25.     </filter>
复制代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|ly-sky.com

GMT+8, 2025-12-17 23:41 , Processed in 0.112745 second(s), 20 queries .

快速回复 返回顶部 返回列表