A good idea might be to set all php files and directories within the webroot to read-only, executable by their owner and group, this way it will be hard for the attacker to add content to the site. Directorys that allow file uploads should have the php_engine disabled.
You might also want to check through your weblogs for any suspicious activity.
If you stick that mod rewrite rule in place even .AVI and .TXT requests will flow through the "protected.php" script which can do the checks. If someone pastes a link to the AVI they wont be able to download it unless the have a valid session identifier
You might be able do do something along the lines of redirecting all requests via a PHP script. e.g.
RewriteEngine On
RewriteBase /
RewriteRule . /protected.php [L]
Then have the protected.php check for that session variable and if it exists use the readfile() function to fetch the file and return it to the user.
I think you need to make sure the DB table supports the correct charset and that when you display it from the DB its supporting the page you display it on sets the correct charset.
You need to make sure your PHP is being executed. It could be that your javascript is inside a .js file which isnt processed by php. An alternate solution might be to do <script src="bleh.php"> and have the php output something along the lines of <script>var x = 5</script> etc...
It might well be better to use AJAX but it depends on the situation...
Hi,
You have a few issues:
The activation of user accounts can easily be forged by guessing the activation id.
Password resets should send a link with which the user can use to reset their password and not a new password
There is SQL injection in some paramaters / forms.
Forms are vulnerable to CSRF
Password complexity is not enforced
Msg me if you want further details.
Your CMS has heaps of security issues. Without much effort I was able to obtain admin access. A few issues include:
Cross Site Request Forgeries
SQL Injection
Weak account policies
msg me if you want full details.
proof: http://cs1.ucc.ie/~jct1/cs1109/lab18/index.php?article_id=80 (check the sourcecode)
Other things to consider are the version of SSL your going to enable on your site, SSLv2 / SSLv3, the ciphers you are going to permit, if your cookies and sessions are going to have the Secure flag set. You might also want to consider that there is increased latency when using SSL and using SSL might put a more significant load on your server.
Hey everyone,
I've released a script I wrote about a year ago for hardening / securing PHP - its a PHP script that you run which goes through all your PHP.ini settings and alerts you to any settings that you might want to change in order to secure your PHP installation. Obviously the settings wont meet everyone needs and there isn't any support for the suhosin module yet but I'd like suggestions / comments / or any bugs you notice.
This link explains a little more about it:
http://www.idontplaydarts.com/2011/02/hardening-and-securing-php-on-linux/
You can download the code here:
http://www.idontplaydarts.com/wp-content/uploads/2011/02/Secure-PHP-conf.tar
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.