本页面罗列了常见的安全漏洞相关处理方案
漏洞详情 | 解决方案 |
外网环境 | 因smartbi的系统功能众多,建议做好内外网隔离,避免在密码泄露的情况下,用户非法访问/菲菲接口调用,内外网隔离设置可参考wiki文档:内外网隔离最小化 该扩展包支持V8-V11,jdk 要1.7及以上,所有发包版本的war包需要在2023年9月22号以后的才生效、V87在2023年11月9号以后 |
index.jsp登录爆破 | 对于登录爆破,我们对外一直是提供登录验证码功能扩展包解决,https://history.wiki.smartbi.com.cn/pages/viewpage.action?pageId=52627212,用户可配置相关扩展包解决。 |
config.jsp登录爆破 | 通过smartbi.properties 文件新增配置项来限定ip访问,建议只对服务所在机器开放 1、进入到 tomcat\bin 目录找到 smartbi.properties 文件,在文件中新增如下配置项目 smartbi.allowedConfigIps=10.21.31.71,127.0.0.1 |
弱口令 | 用户配置密码过于简单,可以通过配置正在表达式限制用户输入密码过于简单,具体可参考Wiki文档:https://wiki.smartbi.com.cn/pages/viewpage.action?pageId=76679302 设置账号校验规则:^$|[a-zA-Z0-9]{6,32} 设置密码校验规则:^(?![^a-zA-Z]+$)(?!\D+$)[a-zA-Z0-9]{8,}$ |
查看smartbi版本信息 | 版本信息开放主要是用于日常问题分析,因为我们前端js是存在会话缓存,若无法确认版本信息,会导致问题分析比较难。再者我们过于经过第三方安全机构检测,相关检测报告也未对此类做安全漏洞判断。用户可以删除相关的txt文件,对产品功能使用不影响。【 war包路径:\smartbi\vision\packageinfo.txt 】 |
目录遍历 | 于2020-10-14已发布相关安全补丁,该问题可通过安装安全补丁后,配置限制config页面文件访问路径解决:https://history.wiki.smartbi.com.cn/pages/viewpage.action?pageId=50692623 |
信息泄露 | 为了监控用的页面,超级管理员才有的权限。建议用户配置IP限制,限制非允许IP访问,具体同2.3参考Wiki文档:https://wiki.smartbi.com.cn/pages/viewpage.action?pageId=50692623 |
接口泄露(直接访问wsdl无需401) | 相关接口信息可参考Wiki文档进行屏蔽:https://wiki.smartbi.com.cn/pages/viewpage.action?pageId=89033146 ,产品未直接限制主要是做成产品,很有项目需要调用相关接口进行二开,因此我们保留相关访问。 |
session劫持+重置用户密码(无需原密码) | session劫持的前提是访问到,https://127.0.0.1/vision/monitor/listsessions.jsp。 通过2.3的解决方案,可限制IP访问,非白名单IP无法访问到相关页面,https://wiki.smartbi.com.cn/pages/viewpage.action?pageId=50692623 |
heapdump缓存抓取密码 | 如session劫持,另外于2022-06-17对于相关密码已采取asc加密。 |
Tomcat存在登陆页面 | 删除webapps下的docs、examples、ROOT目录 |
会话超时 | 配置会话超时扩展包,产品默认实现不超时功能,若项目安全性要求高,建议配置会话超时扩展包,当用户对系统长时间未操作自动超时,具体可参考Wiki文档:https://wiki.smartbi.com.cn/pages/viewpage.action?pageId=76679004 |
不安全的http协议 | 配置https可参考:https://history.wiki.smartbi.com.cn/pages/viewpage.action?pageId=58101324 |
缺少X-Frame-Options标头属性 | webSecurityExt.ext扩展包 https://history.wiki.smartbi.com.cn/pages/viewpage.action?pageId=64783156 |
config.jsp页面内的密码项要勾选【加密保存】 | 密码安全 |
同一个账号在不同的地方登录使用 | 锁定账号扩展包LoginLock,不允许同一个账号在不同的地方登录使用,如果存在同时使用同一账号的情况,之前登录的账号在访问下一个请求的自动跳转到登录界面。https://wiki.smartbi.com.cn/pages/viewpage.action?pageId=52627243 |
报错页面泄漏信息 | V97 及以上版本的角色里有设置错误信息的操作权限 ,如V11的操作权限设置可查看: 操作权限列表 V95 及以下版本的报错信息权限控制使用扩展包SuccinctErrorMessage,https://wiki.smartbi.com.cn/pages/viewpage.action?pageId=62300080 |
会话固定 | 用户登录前与登录后的JSESSIONID是一样的,需要用修复会话固定漏洞扩展包SessionFixationHandler,https://wiki.smartbi.com.cn/pages/viewpage.action?pageId=52627136 |
Cookie的HttpOnly、secure 安全属性未启用 | 到Tomcat根目录下的conf/web.xml中添加如下配置 <session-config> <session-timeout>30</session-timeout> <cookie-config> <http-only>true</http-only> <secure>true</secure> </cookie-config> </session-config> 注意:设置secure需要开启https |
ip伪造、host头攻击、缺少X-Frame-Options响应头、cookie缺少httponly,secure,samesite问题 | 配置nginx,如: upstream smartbi_tomcat{ ip_hash; server 10.253.88.111:8080 weight=1; } server { listen 80; server_name 10.253.88.111; if ($host !~* ^10.253.88.111|127.0.0.1$){ return 403; } # 将http请求转发到https #if ($scheme = http) { # return 301 https://$host$request_uri; #} # https 证书配置 #ssl_certificate <证书所在路径>/<证书名称>.crt; #ssl_certificate_key <证书所在路径>/<证书名称>.key; location / { # 注意,这里不要使用集群,直接转发到 Tomcat 服务即可 proxy_pass http://10.253.88.111:8080; add_header 'Access-Control-Allow-Credentials' 'true'; add_header X-Frame-Options SAMEORIGIN; proxy_set_header Cookie $http_cookie; proxy_redirect off; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; # 需要https 的支持 #proxy_cookie_path ~^/(.+)$ "/$1; HttpOnly; secure; SameSite=none"; client_max_body_size 100m; client_body_buffer_size 1024k; proxy_connect_timeout 300; proxy_send_timeout 300; proxy_read_timeout 300; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } } |
Tomcat服务器版本号泄露 | 进入tomcat的配置目录下(%tomcatHome%\conf) 在 server.xml文件中的Host节点添加如下配置
|
HSTS开启 | hsts开启的前提条件是开启了https,(准备好域名、https证书) add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; Tomcat配置(需要 8.0.23 版本及之后的版本才支持): 1、保证Tomcat的配置已强制http转https,可参考 https://smartbi.feishu.cn/docx/A3vadSTbUo5NdgxPmUNcGsd7nzg#H0GCdu8Mgo46Kqx6W7PcL4kkn7g 2、进入tomcat的配置目录下(%tomcatHome%\conf)修改web.xml文件中添加以下配置。 <filter> <filter-name>httpHeaderSecurity</filter-name> <filter-class>org.apache.catalina.filters.HttpHeaderSecurityFilter</filter-class> <async-supported>true</async-supported> <init-param> <param-name>hstsEnabled</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>hstsMaxAgeSeconds</param-name> <!--这里设置的是有效期,生产环境测试时建议不要设置太大,测试没问题后再逐步提高这个值。如:1分钟、5分钟、10分钟、30分钟、60分钟、3个钟、6个钟、12个钟、18个钟、24个钟、半年、一年--> <!--单位是秒--> <!--一年是 31536000 --> <param-value>60</param-value> </init-param> <init-param> <param-name>hstsIncludeSubDomains</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>httpHeaderSecurity</filter-name> <url-pattern>/*</url-pattern> <dispatcher>REQUEST</dispatcher> </filter-mapping> |
IP伪造 | 需要到 系统运维/系统选项/高级设置 中新增如下配置 # 是否开启防止IP伪造,如果有前置代理的情况下不能开启。 |
跨站脚本攻击、csrf跨站请求伪造 | 通过加载安全扩展包来配置相关配置项防止 或者配置nginx: valid_referers none blocked 172.16.20.216 localhost; if ($invalid_referer) { return 403; } |
存在缓慢的HTTP拒绝服务攻击 | 通过配置中间件或nginx的连接超时时间 connectionTimeout="8000" 2、 nginx配置方式: http { |
启用了没必要的 http 请求类型 | 通过配置中间件或代理来禁用相关http方法。 <security-constraint>
nginx配置方式: if ($request_method ~ ^(PUT|DELETE|OPTIONS|HEAD)$) { return 403; } |