Dirty Cow (CVE-2016-5195) Privilege Escalation Demo

Dirty Cow (CVE-2016-5195) Privilege Escalation Demo.

Dirty COW (CVE-2016-5195) is a privilege escalation vulnerability in the Linux Kernel.
A race condition was found in the way the Linux kernel’s memory subsystem handled the copy-on-write (COW) breakage of private read-only memory mappings. An unprivileged local user could use this flaw to gain write access to otherwise read-only memory mappings and thus increase their privileges on the system.

Lets move to the demo:

Step 1:
Download the cowroot and save it as cowroot.c

Check username you logged in as using command whoami. you can see in pic i am logged in as juniour.

Step 2:
Check you system arch, using command uname -a.
you can see in setp 1 screenshot mine arch is x86_64.

According to the arch your system arch un-comment unsigned char sc[] ….. as show in screenshot below and save it.

Step 4:
Compile the cowroot.c and save it as cowroot.
$ gcc cowroot.c -o cowroot -pthread
compile cowroot

Step 5:
Time to get root privilege.
dirty cow root privilege
Type whoami to check you got root or not.

I hope you enjoyed Dirty COW (CVE-2016-5195) demo.

Credit: dirtycow.ninja

Plz Share Share on FacebookShare on Google+Share on LinkedInTweet about this on TwitterEmail this to someoneShare on RedditShare on TumblrDigg thisBuffer this pagePrint this pagePin on PinterestShare on StumbleUponFlattr the author
Bookmark the permalink.

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *