Comment by algo_lover
3 months ago
Any postinstall script can add anything to your bashrc. I sometimes wonder how the modern world hasn't fallen apart yet.
3 months ago
Any postinstall script can add anything to your bashrc. I sometimes wonder how the modern world hasn't fallen apart yet.
I don't think this solves the world but as a quickfix for this particular exploit I ran:
sudo chattr -i $HOME/.shrc
sudo chattr -i $HOME/.profile
to make them immutable. I also added:
alias unlock-shrc="sudo chattr -i $HOME/.shrc"
alias lock-shrc="sudo chattr +i $HOME/.shrc"
To my profile to make it a bit easier to lock/unlock.
realistically, how many times has this happened in eg homebrew? Hard to be worried tbh.