基线检查策略
1、禁止特权管理帐号在多个用户间共享。
参考配置
描述
特权管理帐号在多个用户间共享,会引发很多安全问题,企业无法控制配置上的安全,不易定位安全事件责任人,同时特权帐号非法使用者还可抹去审计信息
(1) cd /opt/IBM/WebSphere
(2) vim $WAS_APP/config/cells/localhostCell01/fileRegistry.xml
(3)
1、在Group标识下,wim:cn表示组名,wim:members下表示用户,uid=后是用户名,可能存在多组多用户的情况
2、判断是否存在一个用户存在多个组的情况,如果存在,则违规
2、不得在自动运行脚本、控制命令等地方出现Websphere明文口令,例如cron脚本
参考配置
(1)进入后台 $WAS_APP/properties/目录
(2)备份配置文件: cp soap.client.props soap.client.props.bak
(2)执行加密命令:sh $WAS_APP/../../bin/PropFilePasswordEncoder.sh soap.client.props com.ibm.SOAP.loginPassword
3、WebSphere控制台安全
1、参考配置
配置违规情况:Cosnaming服务权限设置过大。
(1)执行命令:
find $WAS_APP/config -name naming-authz.xml| xargs cat |awk '/authorizations xmi|specialSubjects/ {print $0}'
(2) sed -i '/ALL_AUTHENTICATED/d' $WAS_APP/config/cells/localhostCell01/naming-authz.xml
sed -i '/rolebasedauthz/d' $WAS_APP/config/cells/localhostCell01/naming-authz.xml
4、WebSphere控制目录权限
1、参考配置
(1)进入目录:$WAS_HOME/<profilepath>/
(2)修改config和properties文件的权限,执行如下命令:
#chown -R root config
#chmod -R 750 config
#chown -R root properties
#chmod -R 750 properties
5、启用日志可以回溯事件进行检查或审计,日志详细信息级别如果配置不当,会缺少必要的审计信息
参考配置
(1)执行命令:
vim $WAS_APP/config/cells/localhostCell01/nodes/localhost.localdomain/servers/dmgr/server.xml |grep -v "^#" | grep "traceservice:TraceService"
(2)
sed -i 's/xmi:id="TraceService_1" enable="false"/xmi:id="TraceService_1" enable="true"/g' $WAS_APP/config/cells/localhostCell01/nodes/localhost.localdomain/servers/dmgr/server.xml
sed -i 's/startupTraceSpecification="\*=info"/startupTraceSpecification="*=info:SecurityManager=all:SystemOut=all"/g' $WAS_APP/config/cells/localhostCell01/nodes/localhost.localdomain/servers/dmgr/server.xml
6、启用全局安全性
参考配置
描述
启用全局安全性,控制登录管理控制台,同时应用程序将可以使用WebSphere的安全特性,Java2安全性在J2EE基于角色的授权之上提供访问控制保护的额外级别。它特别处理系统资源和API的保护,不启用Java2安全性会极大减弱应用的安全强度。
(1)执行命令:
vim $WAS_APP/config/cells/localhostCell01/security.xml
(2) sed -i 's/enforceJava2Security="false"/enforceJava2Security="true"/g' $WAS_APP/config/cells/localhostCell01/security.xml
sed -i 's/appEnabled="false"/enforceJava2Security="true"/g' $WAS_APP/config/cells/localhostCell01/security.xml
7、控制台会话超时不大于10分钟
参考配置
(1)执行命令:
find $WAS_APP/config/cells/ -name server.xml |xargs cat |grep -v "^#" | grep invalidationTimeout
(2) 用文本编译器打开设置引号值为:10 invalidationTimeout=""
8、sample例子程序会泄露系统敏感信息,存在较大的安全隐患
参考配置
(1)执行命令:
find $WAS_APP/config/cells/ -name blas |xargs ls
(2)如果存在下列文件全部删除执行: rm -rf
DefaultApplication、PlantsByWebSphere、SamplesGallery、ivtApp
9、定义默认错误网页
1、参考配置
描述
如果没有定义默认错误网页,则当应用程序出错时会显示内部出错信息,暴露系统和应用的敏感信息
(1)用文本编辑器打开 $WAS_HOME/<profilepath>/config/cells/<hostname>/applications/ <yourapplication>.ear/deployments/<yourapplication>/<yourapplication>.war/WEB-INF/ibm-web-ext.xmi,在文件中空白行设置:
defaultErrorPage="filename of user defined"
2、补充操作说明
(1)filename of user defined配置内容为用户自定义的报错页面。
(2)执行如下两条命令($WAS_APP请根据实际路径替换):
find $WAS_APP/config/ -name ibm-web-ext.xmi|grep ibm-web-ext.xmi|wc -l
grep defaultErrorPage $WAS_APP/config/ -R|wc -l
如果返回的统计数字不一致,请将返回文件中defaultErrorPage关键字的数量配置为两边一致.
(3)执行grep defaultErrorPage $WAS_APP/config/ -R命令,配置检索到的文件中的所有defaultErrorPage的值,确保不为空.
10、禁止WebSphere列表显示文件
参考配置
(1)用文本编辑器打开 $WAS_HOME/<profilepath>/config/cells/<hostname>/applications/ <yourapplication>.ear/deployments/<yourapplication>/<yourapplication>.war/WEB-INF/ibm-web-ext.xmi,设置:
fileServingEnabled="false"
(2)执行如下两条命令($WAS_APP请根据实际路径替换):
find $WAS_APP/config/ -name ibm-web-ext.xmi|grep ibm-web-ext.xmi|wc -l
grep fileServingEnabled $WAS_APP/config/ -R|wc -l
如果返回的统计数字不一致,请将返回文件中fileServingEnabled关键字的数量配置为两边一致.
(3)执行grep fileServingEnabled $WAS_APP/config/ -R命令,配置检索到的文件中的所有fileServingEnabled的值,确保为false,设置
11、WebSphere目录列表限制
1、参考配置
(1)用文本编辑器打开 $WAS_HOME/<profilepath>/config/cells/<hostname>/applications/ <yourapplication>.ear/deployments/<yourapplication>/<yourapplication>.war/WEB-INF/ibm-web-ext.xmi,设置:
directoryBrowsingEnabled="false"
12、ebsphere更新必要的补丁
参考配置
(1)请参考如下链接,进行相关补丁更新:
http://www-945.ibm.com/support/fixcentral/options
选择对应安装的产品及版本号,查找下载相应补丁进行安装
最后更新于
这有帮助吗?