検索
ホームページ運用・保守CentOSCentOS で Bash をアップグレードする方法 (シェル破壊の脆弱性を修正)

次のコラム centos チュートリアル では、CentOS の Bash アップグレード -- シェル破壊の脆弱性の修復について紹介します。

CentOS で Bash をアップグレードする方法 (シェル破壊の脆弱性を修正)

多くの企業が独自の yum ソースを持っているため、他の yum ソースを直接構成してアップグレードすることはできません。アップグレードを容易にして安全にテストするには、まずテスト用のテスト マシンを使用します。

CentOS 修復ソリューション

yum プラグインのインストール yum-downloadonly

注: yum-downloadonly プラグインの機能すべてをダウンロードするだけです 直接インストールせずにパッケージ化する必要があります

sudo yum -y install yum-downloadonly

CentOS の公式ソースを追加します CentOS-Base.repo

CentOS 5 の公式ソース

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the 
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#released updates 
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

CentOS 6 の公式ソース

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the 
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#released updates 
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

最新の bash パッケージをダウンロード

最新バージョンの bash の rpm パッケージを /tmp ディレクトリ

sudo  yum -y install --downloadonly --downloaddir=/tmp/ bash

ダウンロードしたパッケージ名は次のとおりです。

CentOS 5

bash-3.2-33.el5_10.4.x86_64.rpm

CentOS 6

bash-4.1.2-15.el6_5.2.x86_64.rpm

インストール最新の bash パッケージ

CentOS 5

sudo yum -y install bash-3.2-33.el5_10.4.x86_64.rpm

CentOS 6

sudo yum -y install bash-4.1.2-15.el6_5.2.x86_64.rpm

検証

env X='() { (a)=>\' sh -c "echo date"; cat echo 出力は次のとおりです:

date
Mon Sep 29 10:11:56 CST 2014

env VAR='() { :; }; echo Bash には脆弱性があります!' bash -c "echo Bash Hello" 出力は次のとおりです:

Bash Hello

修復が有効であることの証明成功しました

既存の rpm ソースを追加します

最後のステップは、テストされたパッケージを会社独自のソースに追加し、ネットワーク全体にプッシュすることです。

以上がCentOS で Bash をアップグレードする方法 (シェル破壊の脆弱性を修正)の詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

声明
この記事はsegmentfaultで複製されています。侵害がある場合は、admin@php.cn までご連絡ください。
Centosの後に来るもの:先の道Centosの後に来るもの:先の道Apr 16, 2025 am 12:07 AM

Centosの代替品には、Rockylinux、Almalinux、Oraclelinux、およびSLESが含まれます。 1)RockylinuxとAlmalinuxは、RHEL互換のバイナリパッケージと長期サポートを提供します。 2)Oraclelinuxは、エンタープライズレベルのサポートとKSPLICEテクノロジーを提供します。 3)SLESは長期的なサポートと安定性を提供しますが、商業ライセンスはコストを増やす可能性があります。

Centos:代替案の探索Centos:代替案の探索Apr 15, 2025 am 12:03 AM

Centosの代替品には、Ubuntuserver、Debian、Fedora、Rockylinux、およびAlmalinuxが含まれます。 1)Ubuntuserverは、ソフトウェアパッケージの更新やネットワークの構成など、基本操作に適しています。 2)Debianは、LXCを使用してコンテナを管理するなど、高度な使用法に適しています。 3)Rockylinuxは、カーネルパラメーターを調整することにより、パフォーマンスを最適化できます。

CentosシャットダウンコマンドラインCentosシャットダウンコマンドラインApr 14, 2025 pm 09:12 PM

Centos Shutdownコマンドはシャットダウンし、構文はシャットダウン[オプション]時間[情報]です。オプションは次のとおりです。-hシステムをすぐに停止します。 -pシャットダウン後に電源をオフにします。 -r再起動; -t待機時間。時間は、即時(現在)、数分(分)、または特定の時間(HH:mm)として指定できます。追加の情報をシステムメッセージに表示できます。

CentosとUbuntuの違いCentosとUbuntuの違いApr 14, 2025 pm 09:09 PM

Centosとubuntuの重要な違いは次のとおりです。起源(CentosはRed Hat、for Enterprises、UbuntuはDebianに由来します。個人用のDebianに由来します)、パッケージ管理(CentosはYumを使用し、安定性に焦点を当てます。チュートリアルとドキュメント)、使用(Centosはサーバーに偏っています。Ubuntuはサーバーやデスクトップに適しています)、その他の違いにはインストールのシンプルさが含まれます(Centos is Thin)

CentOS構成IPアドレスCentOS構成IPアドレスApr 14, 2025 pm 09:06 PM

CentosでIPアドレスを構成する手順:現在のネットワーク構成を表示します:IP ADDRネットワーク構成ファイルを編集するファイル:Sudo VI/etc/sysconfig/network-scripts/ifcfg-eth0変更IPアドレス:iPaddr =編集マスクとゲートウェイの変更(オプション):Netmask = and edit edit gatewway = neters rettart rettart the sudo system system systemctrat

Centosをインストールする方法Centosをインストールする方法Apr 14, 2025 pm 09:03 PM

Centosのインストール手順:ISO画像をダウンロードし、起動可能なメディアを燃やします。起動してインストールソースを選択します。言語とキーボードのレイアウトを選択します。ネットワークを構成します。ハードディスクをパーティション化します。システムクロックを設定します。ルートユーザーを作成します。ソフトウェアパッケージを選択します。インストールを開始します。インストールが完了した後、ハードディスクから再起動して起動します。

Centos8はsshを再起動しますCentos8はsshを再起動しますApr 14, 2025 pm 09:00 PM

SSHサービスを再起動するコマンドは次のとおりです。SystemCTL再起動SSHD。詳細な手順:1。端子にアクセスし、サーバーに接続します。 2。コマンドを入力します:SystemCtl RestArt SSHD; 3.サービスステータスの確認:SystemCTLステータスSSHD。

Centos8でネットワークを再起動する方法Centos8でネットワークを再起動する方法Apr 14, 2025 pm 08:57 PM

Centos 8のネットワークの再起動には、次の手順が必要です。ネットワークサービス(NetworkManager)を停止し、ネットワークモジュール(R8169)をリロードし、ネットワークサービス(NetworkManager)を開始し、ネットワークステータスを確認します(Ping 8.8.8.8)

See all articles

ホットAIツール

Undresser.AI Undress

Undresser.AI Undress

リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover

AI Clothes Remover

写真から衣服を削除するオンライン AI ツール。

Undress AI Tool

Undress AI Tool

脱衣画像を無料で

Clothoff.io

Clothoff.io

AI衣類リムーバー

AI Hentai Generator

AI Hentai Generator

AIヘンタイを無料で生成します。

ホットツール

VSCode Windows 64 ビットのダウンロード

VSCode Windows 64 ビットのダウンロード

Microsoft によって発売された無料で強力な IDE エディター

DVWA

DVWA

Damn Vulnerable Web App (DVWA) は、非常に脆弱な PHP/MySQL Web アプリケーションです。その主な目的は、セキュリティ専門家が法的環境でスキルとツールをテストするのに役立ち、Web 開発者が Web アプリケーションを保護するプロセスをより深く理解できるようにし、教師/生徒が教室環境で Web アプリケーションを教え/学習できるようにすることです。安全。 DVWA の目標は、シンプルでわかりやすいインターフェイスを通じて、さまざまな難易度で最も一般的な Web 脆弱性のいくつかを実践することです。このソフトウェアは、

SublimeText3 Linux 新バージョン

SublimeText3 Linux 新バージョン

SublimeText3 Linux 最新バージョン

ドリームウィーバー CS6

ドリームウィーバー CS6

ビジュアル Web 開発ツール

MantisBT

MantisBT

Mantis は、製品の欠陥追跡を支援するために設計された、導入が簡単な Web ベースの欠陥追跡ツールです。 PHP、MySQL、Web サーバーが必要です。デモおよびホスティング サービスをチェックしてください。