News for hackers. Stuff that matters.
Re:Linux ransomware in the wild by wrycoder on Saturday October 21, 2017 @12:43PM (#15522441)
I use /usr/bin/sudo <>
Re:Linux ransomware in the wild by chrisfosterelli on Saturday October 21, 2017 @12:53PM (#15522482)
So they check .bash_history and then they realize they just need to also `alias /usr/bin/sudo`.
Re:Linux ransomware in the wild by kbp on Saturday October 21, 2017 @01:31PM (#15522634)
> So they check .bash_history and then they realize they just need to also `alias /usr/bin/sudo`.

    $ alias /usr/bin/sudo=whatever
    bash: alias: `/usr/bin/sudo': invalid alias name
Re:Linux ransomware in the wild by chrisfosterelli on Saturday October 21, 2017 @03:20PM (#15523158)
Oh, fair point. Not all shells support this apparently. zsh does:

    -> alias /usr/bin/sudo='ls -a'
    -> /usr/bin/sudo
     .  ..
Re:Linux ransomware in the wild by wrycoder on Saturday October 21, 2017 @01:08PM (#15522548)
Hm. How about ‘sudo’ <> ? i.e. quote the command?
Re:Linux ransomware in the wild by wallacoloo on Saturday October 21, 2017 @05:22PM (#15523683)
If they have access to your .bashrc they can also alter your PATH and create a script named sudo somewhere they have write access to that carries the malicious payload. So you're not gaining much by adding the quotes.
Re:Linux ransomware in the wild by chrisfosterelli on Saturday October 21, 2017 @03:24PM (#15523176)
Based on the sibling comment to yours, I don't think bash supports this. zsh allows you to make a \'sudo\' alias though, so it depends on your shell.
Re:Linux ransomware in the wild by wrycoder on Saturday October 21, 2017 @03:48PM (#15523293)
At least in bash, quoting the command disables any alias. Maybe also in zsh?
Re:Linux ransomware in the wild by chrisfosterelli on Saturday October 21, 2017 @03:54PM (#15523323)
zsh seems to have much more flexible alias rules than bash:

    > alias \'sudo\'='ls -a'
    > 'sudo'                
    .  ..