frida / frida-core

Frida core library intended for static linking into bindings
https://frida.re
Other
609 stars 193 forks source link

SElinux API #205

Open romainthomas opened 6 years ago

romainthomas commented 6 years ago

Hi! Thank you @oleavr for Frida.

As far I known only frida_selinux_patch_policy is exposed in the frida-core devkit. What about exposing more SELinux API like setfilecon ?

romainthomas commented 6 years ago

Here is a workaround:

#include "frida-core.h"

extern "C" {
extern int _frida_setfilecon(const char *path, const char *con);
}

frida_selinux_patch_policy();
_frida_setfilecon("libpath", "u:object_r:frida_file:s0");
oleavr commented 6 years ago

Hey!

That would be nice indeed. It should just be a matter of adding something similar to this in devkit.py. (PR welcome!)

Note however that the build system is undergoing some maintenance right now so building Frida is currently very hard. I'm working through the remaining issues, hoping to have it fixed later today.

Cheers!

romainthomas commented 6 years ago

Ok I'll do the PR