I
I
Igor2016-04-05 01:00:54
HTML
Igor, 2016-04-05 01:00:54

Unauthorized access to the site, how to protect yourself?

Hello!
There was a suspicion that the attackers gained access to the distribution kit with the site.
I checked the antivirus on the hosting (ClamAV), nothing was found.
Changed passwords from the admin panel and ftp.

The hoster recommends checking the scripts, I don't know how to do this.
It may have been accessed using a web shell.

Tell me how to be safe and check?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
T
ThunderCat, 2016-04-05
@ThunderCat Curated HTML Tag

if there is a backup or the original code is not uploaded to the server - download and check for matching files (for starters, at least in size). If everything is ok - check for availability more seriously, check file modification dates on the server, check for content matches, somewhere a utility for checking file hashes flashed, google it.

X
xmoonlight, 2016-04-05
@xmoonlight

And how can you be sure that the web-shell is located exactly in the files?!)
It can also be in the database.
The best option (if there is no "clean" copy of the backup): logging incoming and outgoing requests marked "good" packets, all "bad" - block and alert to mail.
All incoming requests must go to a single entry point to the application: we configure this filter there.
PHP security tips

R
Roman Dvoryanov, 2016-04-05
@Raxen

https://www.revision.com/ai/

A
Andrey Mikhalev, 2016-04-05
@Endru9

1. The first thing to do is to set normal rights to files and directories:

#для директорий
find /path/to/dir/ -type d -exec chmod 775 {} \;
#для файлов
find /path/to/dir/ -type f -exec chmod 664 {} \;

The process may take a long time, depending on the number of files.
2. Access to the admin panel should be limited to entering only from a specific IP (htaccess to help).
3. look at the structure of the entire site, and find a possible place where malware can be located
4. open the web server logs, and review what resources are being accessed, there may be a hint where and what to look for.
ps I will add that most of the problems on the site arise due to incorrect file permissions. a shell is poured and a bunch of third-party ones appear on your site ... I got one site like that ... I accidentally scored a domain in Google and received in response more than 10 pages that the attackers used to spread their virus ...

K
keslo, 2016-04-05
@keslo

I also had such questions. To begin with, I decided to introduce control over changes to CMS files on the hosting. For this, I found a good solution SANTI . The solution is free.
As part of a lot of additional buns in the form of backups and self-healing. I've been using for a couple of months. The flight is normal.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question