I think the most profitable use of your time be to swap some underlying method Zoom is using to get OS data.
You start with what you want your 'hook' to do and what you want to hook. This is a simple hook that just swaps out whatever really is in /etc/os-release with a short string "ZV" by replacing the implementation of open. You need to use the program strace to really figure out how Zoom is doing it.
#define _GNU_SOURCE
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <dlfcn.h>
int open(const char *path, int oflag) {
if (strcmp(path, "/etc/os-release")) {
int (*nopen)(const char *path, int oflag);
nopen = dlsym(RTLD_NEXT, "open");
return nopen(path, oflag);
} else {
int *fildes = calloc(2, sizeof(int));
pipe(fildes);
const char *fake = "ZV";
write(fildes[1], fake, strlen(fake));
return fildes[0];
}
}
To use this, you must write out the file you've created from the code above to a file (I've named it fakeread.c) and compile it:
Then you just need to call your command with an environment variable that instructs the dynamic linker to preferentially use the symbols exported by your new shared object.
You can hook other library functions like exec or even system calls like uname with the same principle.
incidentally, if you've run strace on the program and you've found it does actually inspect /etc/os-release, you can use the following as an acceptable fake value instead of "ZV" to trick zoom.
I think the most profitable use of your time be to swap some underlying method Zoom is using to get OS data.
You start with what you want your 'hook' to do and what you want to hook. This is a simple hook that just swaps out whatever really is in
/etc/os-releasewith a short string "ZV" by replacing the implementation ofopen. You need to use the programstraceto really figure out how Zoom is doing it.To use this, you must write out the file you've created from the code above to a file (I've named it
fakeread.c) and compile it:Then you just need to call your command with an environment variable that instructs the dynamic linker to preferentially use the symbols exported by your new shared object.
You can hook other library functions like
execor even system calls likeunamewith the same principle.incidentally, if you've run
straceon the program and you've found it does actually inspect/etc/os-release, you can use the following as an acceptable fake value instead of "ZV" to trick zoom.End of this list.
Back to top