|
|
|
|
|
by pdkl95
2347 days ago
|
|
> For some of them, the www-data's home directory is the DocumentRoot “Well, there’s your problem.” Don't expose any ${HOME} to the world! SSH keys are not the only exploitable file in a typical homedir (or even auto-generated from /etc/skel/)! A few files that come to mind: # other keys
~/.gnupg/
# probably lots of app-specific risks
# (e.g. saved login info)
~/.cache/
~/.config/
~/.local/share/
# if it's also a desktop system running X
~/.Xauthority
~/.mozilla/
Yes, protecting ~/.id* with a passphrase is important and leaking ~/.ssh/known_hosts can have consequences, but this type of exploit shouldn't even be possible. Don't share your homedir - which contains most user-level config files on UNIX systems - with the world. DocumentRoot needs to be contained in a subdir. (edit: or even better, contained somewhere outside of /home where it won't overlap with common file paths) |
|