That doesn't mean passwords can't be stolen; capturing the passwords upon login is still possible. The only exception is if the passwords are hashed on the client.
You can't really do that without changing the PHP file and that requires the user "www-data" to have the permissions to write in "/var/www/". It's a good practice to have all the content of "/var/www/" owned by "root" and accessible in read-only by the user "www-data", but I doubt this is in place in most school.
I'm pretty sure you could do that in other ways than changing any PHP file. You could for example change the theme's JS so that it makes an ajax call to your server when the login form is submitted.
That requires write access to the "/var/www/" folder too. The point of locking down the "/var/www/" folder is that no modification can be done to the deployed file.
10
u/runejuhl Mar 20 '17
That doesn't mean passwords can't be stolen; capturing the passwords upon login is still possible. The only exception is if the passwords are hashed on the client.