How to protect Ubuntu 14 from Dirty Cow

katopz
3 min readOct 22, 2016

--

poor dirty cow!

Here’s noob step for protect your DigitalOcean’s Ubuntu 14 from Dirty COW Linux Vulnerability!

TLDR

First try, didn’t work.

I use DigitalOcean so may be it differents somehow but below link still didn’t work. (╯°□°)╯︵ ┻┻

DIY

So I come up with step I gathering from comment on post above which seem to be working for me so I hope this will save someone else time (including myself later).

1. Get in server via terminal

Do replace foo.bar with yours domain or ip

$ ssh root@foo.bar

Output

Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 3.13.0–79-generic x86_64)

2. Update patch

Maybe you’ll need sudo

# apt-get update && apt-get upgrade && apt-get dist-upgrade

3. Force droplet to use GrubLoader

This step is no need for Ubuntu 16, you’ll need only # reboot

Go to https://cloud.digitalocean.com/droplets and navigate to Kernel

4. Hard reboot by power off and on

Yes, you’ll need hard reboot sorry for that

Navigate to Power section.

Output (after you getting in again as #1)

Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-100-generic x86_64)

5. Cleanup

This is optional, you can let your home dirty anyway.

# apt-get autoremove && apt-get autoclean

6. More cleanup

This is also optional, use at your own risk!

List current packages.

# dpkg --list | grep linux-image

Clean which mark as “rc”

r: the package is marked for removal.
c: the configuration files are currently present in the system

# dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge

Ensure things is clean.

# dpkg --list | grep linux-image

Ensure kernel is up and running atm

# uname -mrs

Output

Linux 3.13.0-100-generic x86_64

And it’s done!

Note (ref)

Don’t miss a chance to get free $10 for DigitalOcean ← 2 months free hosting!
And do claim your cheapest .io name before it’s gone at NameCheap.

Happy Dirty Cow!

--

--

Responses (1)