[Q] Android 4.3, upgrading file's permissions

I have an app, pushing it to in /data/local/tmp/myapp

I have root access for a while in exploit, so my goal is to setup "privileges" to /data/local/tmp/myapp, so it will be running as root even if was called from sh ( sh is running with shell privilleges )

_________________________________

BEFORE 4.3. code works fine ( executing in a context of process with root privileges ):

Code:
chown( "/data/local/tmp/myapp", 0 , 0); //owner to root chmod("/data/local/tmp/myapp" 06777); //chmod myapp to suid

ls shows cute output after that:

Quote:

-rwxrwxrwx root root myapp

Thats enough so myapp starts with uid == 0 even when was launched from "sh" with shell's uid.

4.3 this is NOT ENOUGH. Additional SE policies comes here ...

ls -Z shows the next output:

Quote:

-rwxrwxrwx root root u: object_r:shell_data_file:s0 myapp

When i'm starting myapp from sh BEFORE 4.3 everything goes fine, but on 4.3 myapp launches with uid != 0.

PS: modifying context through chcon to u: object_r:system_file:s0 of myapp didnt help

_________________________________

Maybe someone have some ideas where i can continue research?

Show Accepted Answer

Guest Quick Reply (No URL, BBcode or HTML)

Last post by lindgren.tyler
1 hour ago
Last post by alan99
3 hours ago
Last post by alda.gaylord
3 hours ago
Last post by laura.hand
3 hours ago
Last post by rebeca47
4 hours ago
Last post by hgibson
1 hour ago
Last post by casandra.ratke
2 hours ago
Last post by jayda.kuhn
4 hours ago
Last post by vhammes
3 hours ago
Last post by domenica.cassin
4 hours ago
Last post by collier.angelina
3 hours ago
Last post by casper.irma
57 minutes ago
Last post by doyle.jason
4 hours ago