如何确定Ubuntu下是否对某个CVE打了补丁
前些日子在月赛中,拿到了一台Ubuntu14.04的服务器,但并不是root权限,需要提权。我Google了一下,找到了CVE-2015-1318,CVE-2015-1328,CVE-2015-1338这些可以用来提权的CVE和POC。当我用CVE-2015-1328来提权时,并没有成功,我当时就想知道我这台服务器到底打没打上这个CVE的补丁呢?
后来,我在网上查了下,稍微琢磨了下,就有了这个方法,可能不一定是最方便最好用的。我在Google直接搜索CVE-2015-1328,找到了如下这个链接:
http://people.canonical.com/~ubuntu-security/cve/2015/CVE-2015-1328.html 我在里面看到了受影响的package以及修复信息。截了一部分的图:

我们可以看到是受影响的是Linux的内核。所以执行dpkg –l |grep linux 就可以找到Linux内核的package的名字。在我的Ubuntu 12.02上,截下部分图:

紧接着,使用apt-get changelog linux-image-3.2.0-97-generic就可以看到当前内核版本的changelog,然后直接在里面搜索CVE-2015-1328就可以知道是否打上了补丁。如果打上了补丁,那么这个提权的POC就不能起作用了。其他的CVE也可以利用这种方法来确定是否打上了补丁。
最后来解释几个Linux下的名词:
Upstream kernel:
来自www.kernel.org的kernel, 我们称为upstream kernel,这个Linux kernel由Linus Torvalds领导下的Linux Kernel Organization来维护。我们用的Ubuntu,CentOS等都是Linux的发行版(distribution),这些Linux distribution对由Linux Kernel Organization维护的内核做了些修改,这些内核并不是直接从www.kernel.org得到的内核,称从www.kernel.org 得到的内核为这些发行版内核的Upstream kernel。
我在StackOverflow上也找到了一个比较通俗的介绍。
Using Ubuntu as an example.
Ubuntu is a distribution which packs a lot of software together, small and large. There are graphic drivers, the X server, and Gnome, among others. Ubuntu itself is not developing those software. Ubuntu is "just" packing the software together, making sure that the individual components work together. All that software which Ubuntu is packing together are called upstream from Ubuntu's point of view.
In the process of combining all that software together bugs might pop up. The bug might be in one of the software components, for example gnome, or it might be in the very special way Ubuntu is doing things. After all, a distribution is a distribution because it does some things in it's own very special way.
If the bug is caused by the way Ubuntu is doing things, then Ubuntu will have to fix that bug for itself. If the bug is in fact in one of the software components, for example Gnome, then Ubuntu will have to patch Gnome. When Ubuntu sends the patch back to Gnome, so others can also benefit from the patch, then Ubuntu is sending that patch upstream.
If Ubuntu decides to not send that patch upstream, or the upstream project rejects the patch (but Ubuntu decides to still keep the patch), then Ubuntu has technically forked the project.
The opposite of upstream would be downstream, Ubuntu is downstream from Gnome. I do not hear/read that term used often.
Ubuntu Changelog:
Ubuntu的Changelog记录了软件包随版本的变化。Changelog也有一定的格式,可以从下面的这个链接了解到。
http://packaging.ubuntu.com/html/debian-dir-overview.html
如何确定Ubuntu下是否对某个CVE打了补丁的更多相关文章
- 在Ubuntu下搭建ASP.NET 5开发环境
在Ubuntu下搭建ASP.NET 5开发环境 0x00 写在前面的废话 年底这段时间实在太忙了,各种事情都凑在这个时候,没时间去学习自己感兴趣的东西,所以博客也好就没写了.最近工作上有个小功能要做成 ...
- 在Ubuntu下搭建Spark群集
在前一篇文章中,我们已经搭建好了Hadoop的群集,接下来,我们就是需要基于这个Hadoop群集,搭建Spark的群集.由于前面已经做了大量的工作,所以接下来搭建Spark会简单很多. 首先打开三个虚 ...
- Ubuntu下开启php调试模式,显示报错信息
在Ubuntu下php的缺省设置是不显示错误信息的,如果程序出错会显示“无法处理此请求的错误提示”,这在开发环境下非常不方便. 其实我们只要编辑下apache的配置文件就好 1.我的apache 配置 ...
- 在Ubuntu下安装ovs-dpdk
在Ubuntu下安装ovs-dpdk 参考资料:https://software.intel.com/zh-cn/articles/using-open-vswitch-with-dpdk-on-ub ...
- Ubuntu 下安装QT
Ubuntu 下安装QT 本文使用的环境 QT Library: qt-everywhere-opensource-src-4.7.4.tar.gz QT Creator: qt-creator-li ...
- Torch7在Ubuntu下的安装与配置
Torch7的本系列教程的主要目的是介绍Torch的入门使用.今天首先分享一下Torch7的安装.(在Ubuntu14.04安装torch7) 为什么选择Torch Torch的目标是在建立科学算法的 ...
- Ubuntu 下ibus拼音输入法启用 (ubuntu 16.04
Ubuntu 下ibus拼音输入法启用 我安装的是英文版的ubuntu 16.04,打开只带英文,并没有中文. 设置输入法为iBus 从system settings 进入language suppo ...
- Ubuntu下git的安装与使用
Ubuntu下git的安装与使用 Ubuntu下git的安装与使用与Windows下的大致相同,只不过个人感觉在Ubuntu下使用git更方便. 首先,确认你的系统是否已安装git,可以通过git指令 ...
- 在ubuntu下安装google chrome
由于手上有两台电脑,再加上我那个选择困难症加上纠结劲.所以果断把其中一台电脑只装linux系统,另一台电脑只装windows了.免得我老纠结!于是linux便选择了ubuntu. 由于浏览器一直用的是 ...
随机推荐
- IOS 调用系统发邮件Api
// 判断设备是否有发送邮件功能 NSString *deviceType = [UIDevice currentDevice].model; if([deviceType isEqualToStri ...
- 浏览器缓存相关http头
近期看雅虎黄金34条,学习下优化站点性能的方法. 当中有一条:"为文件头指定Expires或Cache-Control",详细来说指对于静态内容:设置文件头过期时间Expires的 ...
- SpringMVC的值传递
值的传递分为从页面传到到controller和从controller传递到页面,下面分别进行介绍: package com.springmvc.web; import java.util.Map; i ...
- stagefright框架(二)- 和OpenMAX的運作
Stagefright的編解碼功能是利用OpenMAX框架,而且用的還是OpenCORE之OMX的實作,我們來看一下Stagefright和OMX是如何運作的. (1) OMX_Init OMXCli ...
- NET基础课--JIT编译器如何工作1
1..Net运行时调用JIT编译器,用来把由C#编译器生成的IL指令编译成机器代码.这一任务在应用程序的运行期间是分步进行的.JIT并不是在程序一开始就编译整个应用程序,取而代之的是,CLR是一个函数 ...
- 创建一个基本的 Win32 窗口
#include <Windows.h> //Forward declarations bool InitMainWindow(HINSTANCE, int); LRESULT CALLB ...
- Windows 端口和任务 查看 相关命令
netstat -aon|findstr " //查看端口 tasklist|findstr " //根据PID找到对应的程序 taskkill /f /t /im netbox. ...
- mysql模拟插入数据表
由于测试或者学习需要,我们要经常向一个新建的数据表插入几百万行以上的数据来验证我们的一些想法,比如索引的合理构建,表字段类型的设计等等,下面跟大家演示如何往一个新建的数据表插入N多条数据. 1.新建一 ...
- 发现一个不错的学习git的地方
Git入门:http://rogerdudler.github.io/git-guide/index.zh.html 简洁.实用.高效的学习git基本操作的方式
- 关于tomcat的远程调试
最近做项目开发发现,在本地运行好好的项目发布到测试服务器既然不好使了,很是郁闷,周围的大神们就给了一条明路:远程调试 查看了网上例子太多了,好像自己真的不会使用,就查了一些简单的资料发现其实很简单 下 ...