Live data from Hacker News

Hacking with environment variables

elttam.com

31–40 of 67 posts

Re: Hacking with environment variables

#33
post #32

When you control environment variables, can't you also LDPRELOAD scary stuff?

The second sentence of the blog post states:

   We were also unable to control the contents of a file on disk, and bruteforcing process identifiers (PIDs) and file descriptors found no interesting results, eliminating remote LD_PRELOAD exploitation.

Re: Hacking with environment variables

#34
post #32

When you control environment variables, can't you also LDPRELOAD scary stuff?

Or just set $PATH to a directory you control containing an "ls" binary. I don't understand what this post is on about at all - is it implying they've discovered a way to control environment variables of unrelated processes or users?

Re: Hacking with environment variables

#35

This was a huge component of a 2020 DEFCON CTF qualifier challenge that only Samurai and PPP solved, where you had to get code execution or arbitrary file read out of as many setuid binaries as possible, after installing basically every cli Debian package and changing them to setuid. There are some very interesting ways to load shared objects or read files with environment variables, and we even found ways to leverag…

Why would you change "every cli Debian package" to setuid and not expect hundreds of exploits? Solution is not to do something so silly.

Re: Hacking with environment variables

#36
post #34
post #32

When you control environment variables, can't you also LDPRELOAD scary stuff?

Or just set $PATH to a directory you control containing an "ls" binary. I don't understand what this post is on about at all - is it implying they've discovered a way to control environment variables of unrelated processes or users?

> On a recent project we gained the ability to specify environment variables

> We were also unable to control the contents of a file on disk

From the first and second sentence.

Re: Hacking with environment variables

#39

This was a huge component of a 2020 DEFCON CTF qualifier challenge that only Samurai and PPP solved, where you had to get code execution or arbitrary file read out of as many setuid binaries as possible, after installing basically every cli Debian package and changing them to setuid. There are some very interesting ways to load shared objects or read files with environment variables, and we even found ways to leverag…

glibc's gconv?

Re: Hacking with environment variables

#40
post #36
post #34

Earlier quoted context omitted.

Or just set $PATH to a directory you control containing an "ls" binary. I don't understand what this post is on about at all - is it implying they've discovered a way to control environment variables of unrelated processes or users?

> On a recent project we gained the ability to specify environment variables > We were also unable to control the contents of a file on disk From the first and second sentence.

That's my point. What "recent project"? Is there a CVE?
Post reply on HN