HOW TO: Check Server Hack & Exim Spamming in Server Logs
Posted by on 12 February 2019 11:07 AM
|
|
This will probably help you to find out the IP which tried the malpractices in a server to get compromised. First, we can try to find the IP which I need to monitor 1. This netstat script will list out the number of connections made by an IP
2. Now you got the IP then you check it out in a. /var/log/messages b. /var/log/secure
Note :- In {print$5} value may change it can become 7, 8, 11, 12 etc …. eg:- {print$7}
The number of emails in the queue:
How many Frozen mails on the queue:
Deleting Frozen Messages:
To know the number of frozen mails in the mail queue:
In order to remove all frozen emails from the mail queue:
You can also use the command given below to delete all frozen mails
To flush the exim queue
Base64 injection scripts We can use this script to find out the PHP script:
——————————————————————— The spammer may use his home directory for spamming we can use a script to locate the top scripts on your server that send out the email. Then you can search the Exim mail log for those scripts to determine if it looks like spam, and even check your Apache access logs in order to find how a spammer might be using your scripts to send out spam.
—————————————– This will list the entries for the IP Address in question ( replace ip.add.re.ss with the suspicious IP address )
This script will provide you top 10 IP addresses that hit your apache access log ———————————————————————————————————–
This script will list the ten most accessed files on your site —————————————————————————— This script will Sort files and display the number of times that file was accessed
| |
|