Enumerating Log File (ine)
In this lab, we find an instance of the postfix mail server running whilst we are enumerating the running processes.
We can have a look at the log files for this service. Linux logs just about everything and by default stores the resulting files in /var/log In this case, the default location has been changed by somebody so we need to search elsewhere.
Log files help admin and other users know what is going on with the system - they often contain error messages. These files are therefore of interest to attackers as they can help us understand the compromised system and perhaps they will leak sensitive data.
There are lots of log files, though, so it makes sense to look into those which relate to running processes and services.
The files themselves can be quite long, so we can utilize the tail command - this is useful as often the most useful error messages are found towards the end of the log file.
The log file for the postfix mail service has leaked sensitive data - it was a good thing that we enumerated it!
It is now just a matter of exploiting the cronjob...
This lab shows us the importance of taking a look at log files for interesting running processes and services - we can include this step as a part of our initial enumeration of compromised machines after we have used the ps aux command.
I hope this post was of use.
puzz00