I will have a LAMP web server with CentOS and cPanel. With this setup, is it possible for any server log files, whether regular or error logs, to contain sensitive information in them, such as passwords or url variables (GET data)?
What I'm trying to avoid is having sensitive information stored in a plain text log file.
If the server does do this, how do I stop this? Is it a good idea to do so for security?
|
|
|||
|
|
Yes, it's possible it may contain sensitive information. A lot depends on what you consider 'sensitive'. That the IP address 123.123.123.123 access www.hotpron.xxx at 7pm on Sunday contains no user identifiable information but might be extremely sensitive to someone. The normal logging provided by Apache will only record
It will also record usernames used for authentication by the webserver (rather than the code itself) via the mod_auth add ons. Again this is configurable. And the error log will contain anything your application chooses to write to it. It's possible to get it to log POST variables as well using (e.g.) mod_security - but this is more involved. Generally most people would consider it very bad practice to pass authentication tokens (usernames, passwords, session identifiers) via GET variables. |
|||
|
|
|
First, I would do my best to try to not log sensitive information outside of the (protected/encrypted) database. This can typically be accomplished by
Still sensitive information can inadvertantly get into your log files. A common example is user authentication via ssh. Every now and then a user will be in a rush to login and type their password in the (logged) username field press enter, and their password will be logged in the user field Finally, have a look at your log files and see what you are logging. Search ( |
|||||||||||
|