You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then i find my binary which is being installed by CydiaImpactor, and do:
chown root:wheel executable
chmod 6755 executable.
So, this is how binary looks like in filesystem. suid bits are set, aren't they? -rwsr-sr-x 1 root admin 235872 Dec 3 02:38 ElectraTest
setuid(0) starts working.
Or, does it? I do get getuid() == 0
But
I can't use posix_spawn - Operation not permitted status = posix_spawn(&pid, "/usr/bin/stat", NULL, NULL, argv, environ);
or status = posix_spawn(&pid, "/bootstrap/usr/bin/stat", NULL, NULL, argv, environ);
I can't write anything to filesystem exact same way Electra does to test remount
int fd = open("/.fileAccess", O_RDWR|O_CREAT);
if (fd == -1) {
fd = creat("/.fileAccess", 0644);
} else {
printf("File already exists!\n");
}
close(fd);
if (file_exists("/.fileAccess")) {
I can't get kernel task port with hsp4 host_get_special_port(mach_host_self(), HOST_LOCAL_NODE, 4, &kern);
error is: "(os/kern) invalid argument"
So i can do nothing extra. The only changes are:
dlopen stoped screaming about invalid mmap on libjailbreak.dylib (actually, this is not because of root, but due to injections).
nice zeroes in getpid and getgid.
At least, hsp4 is really working when called inside Electra code after remapping tfp0 in fun.c
Also, jailbreakd on launch in main.m is getting hsp4 to start working.
So, if i got uid==0 => jailbreakd patched me => it got kernel task port from hsp4?
What's wrong with theese steps?
And if this question is to be classified as "This is not about actual Electra code, it's all your's broken arms", just tell me where to find the answers, please -_-.
iOS version: 11.0.3
iDevice model: MG472RU/A iPhone6
electra version: all <= Beta11-3 && 1.0.2
The text was updated successfully, but these errors were encountered:
Donny1995
changed the title
jailbreakd granted my process pseudo-superuser priveleges access
jailbreakd granted my process pseudo-superuser privileges access
Dec 3, 2018
Updated main.m to set euid and ruid in main, bit still same effect
int main(int argc, char * argv[]) {
@autoreleasepool {
patch_setuidandplatformize();
if (!(setuid(0) == 0 && setgid(0) == 0)) { //uids
printf("DID NOT SET UIDS");
}
if (!(seteuid(0) == 0 && setegid(0) == 0)) { //effective uids
printf("DID NOT SET Effective UIDS");
}
if (!(setruid(0) == 0 && setrgid(0) == 0)) { //real? uids. There is no getruid or getrgid functions to check but whatever set them too please
printf("DID NOT SET Real UIDS");
}
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
And also tried:
move ElectraTest.app to /Applications
chmod + chown
delete ElectraTest original folder
kill backboardd to make Springboard show new app available for launch
Hello. I found a problem where my binary runs in pseudo-root mode. All details below:
Start with code to get superuser rights:
Where patch_setuidandplatformize is taken from cydo from youknowwhere
Then i entitle is with following file, using jtool or ldid2, does not matter:
Then i find my binary which is being installed by CydiaImpactor, and do:
chown root:wheel executable
chmod 6755 executable
.So, this is how binary looks like in filesystem. suid bits are set, aren't they?
-rwsr-sr-x 1 root admin 235872 Dec 3 02:38 ElectraTest
setuid(0) starts working.
Or, does it? I do get getuid() == 0
But
I can't use posix_spawn - Operation not permitted
status = posix_spawn(&pid, "/usr/bin/stat", NULL, NULL, argv, environ);
or
status = posix_spawn(&pid, "/bootstrap/usr/bin/stat", NULL, NULL, argv, environ);
I can't write anything to filesystem exact same way Electra does to test remount
I can't get kernel task port with hsp4
host_get_special_port(mach_host_self(), HOST_LOCAL_NODE, 4, &kern);
error is: "(os/kern) invalid argument"
So i can do nothing extra. The only changes are:
At least, hsp4 is really working when called inside Electra code after remapping tfp0 in fun.c
Also, jailbreakd on launch in main.m is getting hsp4 to start working.
So, if i got uid==0 => jailbreakd patched me => it got kernel task port from hsp4?
What's wrong with theese steps?
And if this question is to be classified as "This is not about actual Electra code, it's all your's broken arms", just tell me where to find the answers, please -_-.
The text was updated successfully, but these errors were encountered: