``` for f in /proc/*/environ ; do sudo strings $f | >/dev/null grep LD_PRELOAD && echo $f; done ```
2. I'd suggest against using `strings` (let alone with sudo) on attacker controlled inputs
#include <stdio.h>
#include <stdlib.h>
static void begin() __attribute__((constructor));
void begin() {
unsetenv("LD_PRELOAD");
}
Build with: gcc -shared -fpie -o library.so library.c
Test: LD_PRELOAD=~/library.so env | grep LD_PRELOADUnless the ld_preload patches the process you are using to read the maps file, and gives you a false maps file.
However, on my Fedora 36 machine at least, it doesn't do so by default and I'd have to specify the `-d` flag for it to do this.
• libinput-gestures has spawned a /usr/lib/libinput/libinput-debug-events process with LD_PRELOAD=/usr/lib/coreutils/libstdbuf.so
• Firefox has spawned many /opt/firefox-nightly/firefox-bin processes with LD_PRELOAD=libmozsandbox.so
LD_PRELOAD=libmozsandbox.soRemoving it would just mean it gets hidden from the 'good guys' as well.
Most companies modify their detection rules because generic rules tend to cause false positives that could potentially overwhelm the SOC (security operations center). It really depends on your environment a lot.
My guess is the suppression held back the tide of Windows malware a year or two, but also gave MSFT a few years of fat, dumb and happy ignorance. Nimda, Code Red, Word macro viruses, etc hit Windows hard. If jokey small threats had been as available as they are today, MSFT might have been able to ramp up rather than get buried.
Sad state of affairs when people routinely ask for more censorship on what was supposed to be the freest technology to ever exist.
Since Linux is open source, how about not only “allowing” things like this to stay up, but encouraging everyone know about them?
I did this and it passed every anti virus on virustotal. I could have wrote the virus myself in a weekend but I thought it was funny that anti virus can't detect a virus thats modified ever so slightly I think we just need a better way of scanning for this stuff.
You train like you fight, you can't do research and build detections if you don't have some examples.
It seems all the old Windows techniques are now recycled on Linux.
Nothing here looks special, there are a plenty of these:
https://github.com/chokepoint/Jynx2
https://github.com/chokepoint/jynxkit
https://github.com/NexusBots/Umbreon-Rootkit
https://github.com/chokepoint/azazel
https://github.com/unix-thrust/beurk
https://github.com/mempodippy/vlany
https://github.com/nopn0p/rkorova
And presumably tens more I've forgotten about. Highschoolers write stuff like this.