CVE-2015-0235 实验记录

一体机&linux  服务器漏洞分析修补!LINUX: 5.X 64  cell storage: 11.2.3.1.1

#漏洞需要的补丁包:

glibc-2.5-123.0.1.el5_11.1.i686.rpm

glibc-2.5-123.0.1.el5_11.1.x86_64.rpm

glibc-common-2.5-123.0.1.el5_11.1.x86_64.rpm

glibc-devel-2.5-123.0.1.el5_11.1.i386.rpm

glibc-devel-2.5-123.0.1.el5_11.1.x86_64.rpm

glibc-headers-2.5-123.0.1.el5_11.1.x86_64.rpm

glibc-utils-2.5-123.0.1.el5_11.1.x86_64.rpm

nscd-2.5-123.0.1.el5_11.1.x86_64.rpm

#漏洞补丁包下载地址:

http://public-yum.oracle.com/repo/OracleLinux/OL5/latest/x86_64/.

#漏洞修补准备:

[[email protected] ~]# mkdir 20150227

[[email protected] ~]# cd 20150227/

/root/20150227

[[email protected] 20150227]# rpm -qa --queryformat="%{name}-%{version}-%{release}.%{arch}\n" | egrep ‘glibc|nscd‘ > bak1

#检测操作系统是否有漏洞:

[[email protected] 20150227]# uname -r

2.6.18-274.el5

[[email protected] 20150227]# sh check.sh

Vulnerable glibc version <= 2.17-54

Vulnerable glibc version <= 2.5-122

Vulnerable glibc version <= 2.12-1.148

Detected glibc version 2.5 revision 65

This system is vulnerable to CVE-2015-0235. <https://access.redhat.com/security/cve/CVE-2015-0235>

Update the glibc and ncsd packages on your system using the packages released with the following:

yum install glibc

[[email protected] 20150227]#

#上传补丁

[[email protected] 20150227]# mkdir /tmp/glibc-update

[[email protected] 20150227]# cd /tmp/glibc-update

[[email protected] glibc-update]# ll

-rw-r--r-- 1 root root  5647080 Feb 27  2015 glibc-2.5-123.0.1.el5_11.1.i686.rpm

-rw-r--r-- 1 root root  5007817 Feb 27  2015 glibc-2.5-123.0.1.el5_11.1.x86_64.rpm

-rw-r--r-- 1 root root 17291271 Feb 27  2015 glibc-common-2.5-123.0.1.el5_11.1.x86_64.rpm

-rw-r--r-- 1 root root  2164300 Feb 27  2015 glibc-devel-2.5-123.0.1.el5_11.1.i386.rpm

-rw-r--r-- 1 root root  2547507 Feb 27  2015 glibc-devel-2.5-123.0.1.el5_11.1.x86_64.rpm

-rw-r--r-- 1 root root   616895 Feb 27  2015 glibc-headers-2.5-123.0.1.el5_11.1.x86_64.rpm

-rw-r--r-- 1 root root   143204 Feb 27  2015 glibc-utils-2.5-123.0.1.el5_11.1.x86_64.rpm

-rw-r--r-- 1 root root   182696 Feb 27  2015 nscd-2.5-123.0.1.el5_11.1.x86_64.rpm

#关闭相关服务Steps to power down or reboot a cell without affecting ASM:Note 1188080.1

1) By default, ASM drops a disk shortly after it is taken offline; however, you can set the DISK_REPAIR_TIME attribute to prevent this operation by specifying a time

interval to repair the disk and bring it back online. The default DISK_REPAIR_TIME attribute value of 3.6h should be adequate for most environments

(a)To check repair times for all mounted disk groups - log into the ASM instance and perform the following query:

SQL> select dg.name,a.value from v$asm_diskgroupdg, v$asm_attribute a where dg.group_number=a.group_number and a.name=‘disk_repair_time‘;

(b)If you need to offline the ASM disks for more than the default time of 3.6 hours then adjust the parameter by issuing the command below as an example:

SQL> ALTER DISKGROUP DATA SET ATTRIBUTE ‘DISK_REPAIR_TIME‘=‘8.5H‘;

2) Next you will need to check if ASM will be OK if the grid disks go OFFLINE. The following command should return ‘Yes‘ for the grid disks being listed:

cellcli -e list griddisk attributes name,asmmodestatus,asmdeactivationoutcome

cellcli -e alter griddisk all inactive

cellcli -e list griddisk attributes name where asmdeactivationoutcome != ‘Yes‘

[[email protected] glibc-update]# rpm -Fvh /tmp/glibc-update/*rpm

warning: /tmp/glibc-update/glibc-2.5-123.0.1.el5_11.1.i686.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159

Preparing...                ########################################### [100%]

1:glibc-common           ########################################### [ 14%]

2:glibc                  ########################################### [ 29%]

3:nscd                   ########################################### [ 43%]

4:glibc-headers          ########################################### [ 57%]

5:glibc-devel            ########################################### [ 71%]

6:glibc                  ########################################### [ 86%]

7:glibc-devel            ########################################### [100%]

# check.sh 该文件见最下:

[[email protected] 20150227]# sh check.sh

Vulnerable glibc version <= 2.17-54

Vulnerable glibc version <= 2.5-122

Vulnerable glibc version <= 2.12-1.148

Detected glibc version 2.5 revision 123

Not Vulnerable.

[[email protected] 20150227]# cellcli

CellCLI: Release 11.2.3.2.0 - Production on Fri Feb 27 09:31:29 CST 2015

Copyright (c) 2007, 2012, Oracle.  All rights reserved.

Cell Efficiency Ratio: 1,000

CellCLI> alter cell shutdown services all

Stopping the RS, CELLSRV, and MS services...

The SHUTDOWN of services was successful.

[[email protected] 20150227]# shutdown -r -y now

Broadcast message from root (pts/2) (Fri Feb 27 09:33:06 2015):

The system is going down for reboot NOW!

[[email protected] 20150227]#

注意:打好补丁后必须立即重启操作系统,否则可能会造成应用业务无法使用。

[[email protected] 20150227]# cellcli

CellCLI: Release 11.2.3.2.0 - Production on Fri Feb 27 09:38:06 CST 2015

Copyright (c) 2007, 2012, Oracle.  All rights reserved.

Cell Efficiency Ratio: 1,000

CellCLI> alter cell startup services all

Starting the RS, CELLSRV, and MS services...

Getting the state of RS services...  running

Starting CELLSRV services...

The STARTUP of CELLSRV services was successful.

Starting MS services...

The STARTUP of MS services was successful.

CellCLI> list cell

localhost       online

CellCLI> list cell detail

name:                   localhost

bbuTempThreshold:       60

bbuChargeThreshold:     800

bmcType:                absent

cellVersion:            OSS_11.2.3.2.0_LINUX.X64_120713

cpuCount:               0

diagHistoryDays:        7

fanCount:               1/1

fanStatus:              normal

flashCacheMode:         WriteThrough

id:                     029e8a73-bcc2-4759-bed1-c596778dbca8

interconnectCount:      0

iormBoost:              0.0

ipaddress1:             192.168.175.138/24

kernelVersion:          2.6.18-274.el5

makeModel:              Fake hardware

metricHistoryDays:      7

offloadEfficiency:      1,000.0

powerCount:             1/1

powerStatus:            normal

releaseVersion:         11.2.3.2.0

releaseTrackingBug:     14212264

status:                 online

temperatureReading:     0.0

temperatureStatus:      normal

upTime:                 0 days, 0:00

cellsrvStatus:          running

msStatus:               running

rsStatus:               running

CellCLI> list griddisk

date_CD_disk01_localhost        inactive

date_CD_disk02_localhost        inactive

date_CD_disk03_localhost        inactive

date_CD_disk04_localhost        inactive

date_CD_disk05_localhost        inactive

date_CD_disk06_localhost        inactive

CellCLI>  alter griddisk all active

GridDisk date_CD_disk01_localhost successfully altered

GridDisk date_CD_disk02_localhost successfully altered

GridDisk date_CD_disk03_localhost successfully altered

GridDisk date_CD_disk04_localhost successfully altered

GridDisk date_CD_disk05_localhost successfully altered

GridDisk date_CD_disk06_localhost successfully altered

CellCLI> list griddisk

date_CD_disk01_localhost        active

date_CD_disk02_localhost        active

date_CD_disk03_localhost        active

date_CD_disk04_localhost        active

date_CD_disk05_localhost        active

date_CD_disk06_localhost        active

CellCLI>

#####################################################################################################################################

If a rollback is required, it should be done with Oracle Support guidance via an SR.

The information gathered in step 1 above should be provided to the SR.

对于一体机的补丁,如果打补丁失败,需要求助sr:

注:

建议使用make_cellboot_usb创建应急镜像。cd /opt/oracle.SupportTools   ./make_cellboot_usb

如果CELL 安装失败,可以使用USB闪存驱动器的备份来恢复:不过这方面实验无法模拟需要其他技术人员支持。一体机(x2-2)升级需要时间保守估计6~12小时。

对于linux 其他数据库服务器,直接安装系统补丁重启系统就可以了。普通数据库库服务器补丁需要1小时左右。

[[email protected] 20150227]# more check.sh

#!/bin/bash

vercomp () {

if [[ $1 == $2 ]]

then

return 0

fi

local IFS=.

local i ver1=($1) ver2=($2)

# fill empty fields in ver1 with zeros

for ((i=${#ver1[@]}; i<${#ver2[@]}; i++))

do

ver1[i]=0

done

for ((i=0; i<${#ver1[@]}; i++))

do

if [[ -z ${ver2[i]} ]]

then

# fill empty fields in ver2 with zeros

ver2[i]=0

fi

if ((10#${ver1[i]} > 10#${ver2[i]}))

then

return 1

fi

if ((10#${ver1[i]} < 10#${ver2[i]}))

then

return 2

fi

done

return 0

}

glibc_vulnerable_version=2.17

glibc_vulnerable_revision=54

glibc_vulnerable_version2=2.5

glibc_vulnerable_revision2=122

glibc_vulnerable_version3=2.12

glibc_vulnerable_revision3=148

echo "Vulnerable glibc version <=" $glibc_vulnerable_version"-"$glibc_vulnerable_revision

echo "Vulnerable glibc version <=" $glibc_vulnerable_version2"-"$glibc_vulnerable_revision2

echo "Vulnerable glibc version <=" $glibc_vulnerable_version3"-1."$glibc_vulnerable_revision3

glibc_version=$(rpm -q glibc | awk -F"[-.]" ‘{print $2"."$3}‘ | sort -u)

if [[ $glibc_version == $glibc_vulnerable_version3 ]]

then

glibc_revision=$(rpm -q glibc | awk -F"[-.]" ‘{print $5}‘ | sort -u)

else

glibc_revision=$(rpm -q glibc | awk -F"[-.]" ‘{print $4}‘ | sort -u)

fi

echo "Detected glibc version" $glibc_version" revision "$glibc_revision

vulnerable_text=$"This system is vulnerable to CVE-2015-0235. <https://access.redhat.com/security/cve/CVE-2015-0235>

Update the glibc and ncsd packages on your system using the packages released with the following:

yum install glibc"

if [[ $glibc_version == $glibc_vulnerable_version ]]

then

vercomp $glibc_vulnerable_revision $glibc_revision

elif [[ $glibc_version == $glibc_vulnerable_version2 ]]

then

vercomp $glibc_vulnerable_revision2 $glibc_revision

elif [[ $glibc_version == $glibc_vulnerable_version3 ]]

then

vercomp $glibc_vulnerable_revision3 $glibc_revision

else

vercomp $glibc_vulnerable_version $glibc_version

fi

case $? in

0) echo "$vulnerable_text";;

1) echo "$vulnerable_text";;

2) echo "Not Vulnerable.";;

esac

##########################################################################################################################

时间: 2024-11-10 18:47:11

CVE-2015-0235 实验记录的相关文章

【伊利丹】Hadoop2.0 NN HA实验记录

1.关于Hadoop2.2.0中HA的介绍 NameNode 简称: NN DateNode 简称: DN JournalNode  简称: JN Zookeeper  简称: ZK 从上面的图里,我们可以知道HA的大致架构: 01.利用共享存储来在两个NN之间同步元数据信息. 在NN中有两个重要的文件:一个是fsimage,一个是edits,其中fsimage指的是元数据镜像文件,存在磁盘中用来保持文件系统的目录树,然而edits指的是元数据操作日志,针对目录树的修改操作,被写入共享存储系统中

实验记录:vsftp整合mysql-pam管理虚拟账号

为了提高系统的安全性,我们采用虚拟用户而非系统(匿名)用户的形式访问FTP.整体思路是通过开启vsftp中的虚拟账户功能并调用新的pam认证模块,然后再修改pam模块使得可以通过mysql验证用户的合法性.以下为实验过程. 第一步装包: yum install -y vsftpd mysql-server mysql-devel pam-devel yum groupinstall -y Development tools tar -xf pam_mysql-0.7RC1.tar.gz -C /

实验记录三 通用输入输出(GPIO)

之前把所有程序都跑了一次后,得到了导师下一步的安排.如下: 1.编写一个程序,实现在LCD上显示一个万年历,包括年月日 星期 还有室内的温度.2.编写一个程序,将原来的交通灯改为跑马灯. 期限是这学期. 好吧.一学期编两个程序.还真是从0做起.虽然是用C编程,但是用的库函数却是相应工程开发自带的API.于是,开始从第一个基础程序做起,以便熟悉相应的API函数操作. GPIO 通用输入输出函数 函数名真长 参数也是两三个以上,不习惯.忙乎了大概两三个小时才基本把常用的六七个函数弄明白,真是白痴透了

CSAPP缓冲区溢出实验记录(三)

Level 5 Nitroglycerin (10 分) 题目说明:这一关是一道加分题.在bufbomb程序中还有一个'-n'的选项,使用这个选项时,bufbomb会运行Nitro模式,此时程序不会调用getbuf,而是调用getbufn: int getbufn() {     char buf[512];     Gets(buf);     return 1; } 这个函数与getbuf所不同的是,分配了512字节的字符数组,而调用getbufn的函数会在栈中随机分配一段存储区,这导致ge

RHCE实验记录总结

不管是运维还是开发系统的了解下Linux或者系统的温习整理一下Linux知识点无疑是较好的,这篇文章是对RHCSA&RHCE实验进行一个汇总,是我为了做实验方便(并分享给朋友)的一篇文章. 前言 开卷有益 准备考RHCSA(红帽认证系统管理员)RHCE(红帽认证工程师) 想做下Linux实验巩固下实操技能 测试下自己现在Linux的技能掌握度 环境提示 系统版本:Centos7 虚拟环境:文章下方 虚拟环境安装 虚拟环境常用管理命令 整体总结 1.看下第一个实验的例子,其实要是重置密码步骤:第一

corosync+pacemaker实验记录

OS: RHEL 6.5 64bitcorosync: 1.4.7 --yum方式安装pacemaker: 1.1.2 --作为corosync依赖包自动安装 pacemaker是heartbeat发展到3.0独立出来的产物,红帽6.0系列上,使用yum安装corosync,默认会安装pacemaker作为CRM. pacemaker常用配置工具:crmsh pcscrmsh需要独立安装rpm包 主要配置文件: /etc/corosync/corosync.conf /etc/crm/crm.c

CentOS 7系统升级备份恢复实验记录

一.系统版本 1) CentOS 7.1.1503 2) CentOS 7.2.1511 二.通过tar命令备份当前操作系统 #tar cvpzf /mnt/linuxbackup.tgz--exclude=/proc --exclude=/lost+found --exclude=/mnt/linuxbackup.tgz--exclude=/mnt --exclude=/sys / 命令解释: tar:linux常用的打包程序 cvpzf:是tar的参数 c-创建新文档 v-处理过程中输出相关

CSAPP缓冲区溢出实验记录(二)

Level 2: firecracker(30分) bufbomb中存在一个bang函数, int global_value = 0; void bang(int val) {     if (global_value == cookie) {         printf("Bang!: You set global_value to 0x%x\n", global_value);         validate(2); } else     printf("Misfir

UNITY 2015 大会 观展记录

div#cpmenu {height:200px;float:left;} div#cpcontent {height:200px;width:150px;float:left;} 文章作者:松阳 原文链接:http://blog.csdn.net/fansongy/article/details/45133909 题记 折折腾腾的晃了一天,感觉这次会议干货还是挺多的.听了不少有的没的,记录一下,走过撸过不要错过.所谓无图无真相,先上一张跟Unity大叔的合影: 上午主会 开场高富帅CEO出来各