前些日子在月赛中,拿到了一台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打了补丁的更多相关文章

  1. 在Ubuntu下搭建ASP.NET 5开发环境

    在Ubuntu下搭建ASP.NET 5开发环境 0x00 写在前面的废话 年底这段时间实在太忙了,各种事情都凑在这个时候,没时间去学习自己感兴趣的东西,所以博客也好就没写了.最近工作上有个小功能要做成 ...

  2. 在Ubuntu下搭建Spark群集

    在前一篇文章中,我们已经搭建好了Hadoop的群集,接下来,我们就是需要基于这个Hadoop群集,搭建Spark的群集.由于前面已经做了大量的工作,所以接下来搭建Spark会简单很多. 首先打开三个虚 ...

  3. Ubuntu下开启php调试模式,显示报错信息

    在Ubuntu下php的缺省设置是不显示错误信息的,如果程序出错会显示“无法处理此请求的错误提示”,这在开发环境下非常不方便. 其实我们只要编辑下apache的配置文件就好 1.我的apache 配置 ...

  4. 在Ubuntu下安装ovs-dpdk

    在Ubuntu下安装ovs-dpdk 参考资料:https://software.intel.com/zh-cn/articles/using-open-vswitch-with-dpdk-on-ub ...

  5. Ubuntu 下安装QT

    Ubuntu 下安装QT 本文使用的环境 QT Library: qt-everywhere-opensource-src-4.7.4.tar.gz QT Creator: qt-creator-li ...

  6. Torch7在Ubuntu下的安装与配置

    Torch7的本系列教程的主要目的是介绍Torch的入门使用.今天首先分享一下Torch7的安装.(在Ubuntu14.04安装torch7) 为什么选择Torch Torch的目标是在建立科学算法的 ...

  7. Ubuntu 下ibus拼音输入法启用 (ubuntu 16.04

    Ubuntu 下ibus拼音输入法启用 我安装的是英文版的ubuntu 16.04,打开只带英文,并没有中文. 设置输入法为iBus 从system settings 进入language suppo ...

  8. Ubuntu下git的安装与使用

    Ubuntu下git的安装与使用 Ubuntu下git的安装与使用与Windows下的大致相同,只不过个人感觉在Ubuntu下使用git更方便. 首先,确认你的系统是否已安装git,可以通过git指令 ...

  9. 在ubuntu下安装google chrome

    由于手上有两台电脑,再加上我那个选择困难症加上纠结劲.所以果断把其中一台电脑只装linux系统,另一台电脑只装windows了.免得我老纠结!于是linux便选择了ubuntu. 由于浏览器一直用的是 ...

随机推荐

  1. PHP 文件打开/读取

    PHP Open File - fopen() 打开文件的更好的方法是通过 fopen() 函数.此函数为您提供比 readfile() 函数更多的选项. 在课程中,我们将使用文本文件 "w ...

  2. USACO Section 2.1 Sorting a Three-Valued Sequence

    /* ID: lucien23 PROG: sort3 LANG: C++ */ #include <iostream> #include <fstream> #include ...

  3. 并行任务task

    http://msdn.microsoft.com/zh-cn/library/dd537609(v=vs.110).aspx http://www.cnblogs.com/yangecnu/p/So ...

  4. ACdreamOJ 1154 Lowbit Sum (数字dp)

    ACdreamOJ 1154 Lowbit Sum (数位dp) ACM 题目地址:pid=1154" target="_blank" style="color ...

  5. SQL*Plus break与compute的简单用法

    SQL*Plus break与compute的简单用法在SQL*Plus提示符下输出求和报表,我们可以借助break与compute两个命令来实现.这个两个命令简单易用,可满足日常需求,其实质也相当于 ...

  6. 【初级坑跳跳跳】[NULLException] findViewById() id 引用错误,导致空指针

    在学习Intent页面切换,几个页面切换,导致view id 写错,写成另一个xml里的id去了,导致空指针异常 setContentView(R.layout.activity_second); B ...

  7. 实现android4.4新特性:沉浸式状态栏

    先放效果图: 所谓沉浸式状态栏,就是android4.4以后新加入的ui效果,能使最顶部的状态栏自动适宜app顶部的颜色,使两者看起来更像融为一体.下面放上实现代码: requestWindowFea ...

  8. Oracle学习之常见错误整理

    一.ORA-12154: TNS: 无法解析指定的连接标识符 在程序中连接Oracle数据库的方式与其他常用数据库,如:MySql,Sql Server不同,这些数据库可以通过直接指定IP的方式连接, ...

  9. phonegap退出android程序

    最近用android做了一个程序,在点“后退”的时候,会不停地后退,感觉不好. 查了些资料有这么些: 一.toast_plugin插件 <script type="text/javas ...

  10. png压缩工具-PngoutWin

          PngoutWin是一款聪明的png图片压缩工具,别的压缩工具压缩PNG是通过丢弃透明层来达到减肥的目的.可是不能透明的PNG还能叫PNG吗?PngoutWin它不会丢弃原本的透明,而是通 ...