I often read articles saying something along the lines of
chmod 777 is bad!
I was wondering:
How do I become vulnerable when I execute chmod 777
on a file?
What is a real world example of this that I can reproduce?
It allows filesystem content to be viewed and/or modified by anyone: assuming the attacker already has general system access which is very common on shared hosting platforms .. some are more "hardened" than others from the start. Here is a small incomplete list of possible attack vectors:
In the above I also assume "group" to include the web-server principal and that there is a web-server (and/or shared hosting) involved which can be used as a primary attack vector and/or security vulnerability. However, and I stress this again: the list above is not complete.
While not "guaranteed safety", using the most specific permissions can mitigate some vulnerabilities / exposure.