[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 alena.towne
46 minutes ago
Last post by hrau
56 minutes ago
Last post by gussie86
3 hours ago
Last post by russel.barney
3 hours ago
Inbox
Started by qoconner
Last post by nicolas.trevion
1 hour ago
Last post by baylee54
4 hours ago
Last post by uswaniawski
3 hours ago
Last post by josefa.ryan
4 hours ago
Last post by margarett.mcglynn
3 hours ago