-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adapting for 32-bit PXN enabled device #48
Comments
Does the source code of F-01F helpful? |
the methods used by kingroot all got the same result on F-01F 4.4.2------reboot,like you,possible some proprietary kernel protect watch-guard was used to moniter the kernel access |
@copslock |
@dadreamer |
if we can get into the Qualcomm 9008,then with the firehorse loadet then entering the 9006 download mode ,then you were able to modify the content on eMMC via diskgenius |
i had even tear down my device to find the test point for the GPIO that trigger into the emergency download mode,but it seems nonsense, |
if you can find the way to get to the 9006,i will buy another devices with JB to get a full dump for downgrade,even with some early tools provided to generated the rawprogram0.xml and patch0.xml |
one more thing , |
Maybe I'm having another Google... But all I find is his UpAny tool and some old imageboard threads. There's not so much info about fjsec. And as I know the only one thing to disable it - Backdoor mmap tools by fi01. Sadly these tools don't work for F-01F on 4.4.2 because mmap to kernel ds doesn't work due to PXN.
No, I didn't try.
I'm not completely sure but afraid that we won't have success with that. F-01F doesn't have fastboot so we cannot load to EDL via Fastboot or ADB. I tried to activate USB Modem/Diag Mode under root but it didn't work also. There are some funcs in the sources related to EDL, e.g. set_dload_mode, dload_set, dload_mode_addr, dload_mode_enabled, download_mode, emergency_dload_mode_addr. But we cannot call them from userland. Maybe there exists a way to switch on EDL by manipulating on hardware level, but I know nothing about it.
I'm just an user of F-01F as you. I'm not an expert in Android kernel and not a developer. So, while I own this phone, I will be trying to full-root it. If I sell it or whatever... well, then I don't see a much sense to find out those secret rooting techniques.
All these experiments take a lot of free time. And honestly I don't believe that EDL mode is reachable from under the device system. I'm gonna spend some time on hardware root if there will be a time, ofc. If you feel that it's possible, you might do your own research on this task and post your findings on xda or somewhere.. This would be useful for others.
As I see this poc lacks basic root gain functionality, so someone should write this part his/herself. Even if this exploit is written and gives you #, still there's LSM which you want to override somehow. This is even more important than root priv's (think of it as you already have these priv's). So, I don't know what I can do with this code. |
@dadreamer |
I didn't use any script for this. I just tried to run the following command under root: |
@dadreamer well,looks like nothing helpful now,can you share with me of the modified code of RowHammer you used on F-01F? Some of my friend be able to bypass the PXN with some evil JOP code,I thnk i may have a try with your temp root shell, email: paficrock@gmail.com thanks a lot |
@copslock |
@dadreamer нет,the drammer EXPLOIT depends on the memory error and it's too costly to gain such an temp root access,,I contacted someone can really bypass the PXN on android 4.4 ,he said should with some JOP ROP method but not willing to share the tool,maybe it's appliable to most android devices for even higher realeses.He told me that using the CVE-2017-8890 CVE-2017-7533 and possible other ret2usr method which is beyond my ability. |
Yeah, it's very unconvenient, time-consuming and buggy on F-01F. But it's the only way to gain temp root for F-01F for now. And it more or less works ( even if it takes a half/a whole day of you ;) ). Since my last message I have launched this poc "a thousand" times in order to test different things. Sadly, nothing interesting. I cannot mmap to the kernel memory (data and code sections). But I can read/dump almost all the memory with dd (under root, of course). When I try to write to the memory, the phone reboots. Well, I have been told by Drammer author (Victor van der Veen), that his poc is written only for LG Nexus 5 with Android 6.0.1 and if I rewrite it for my phone target, it would work normally. Look here, how fast it works. But I'm not a native Android programmer, so it would take months to figure out, what's happening in that Drammer test tool. Moreover I'd have to write (on my own) an exploit part 'cause it's missing from the sources. Maybe, one day I'll get my hands on it, if nothing else works, as Drammer poc is the only thing that's able to write to the kernel memory for now (watch at the very end, when it's writing user creds).
This CVE is really interesting as those two links. I see a real way to apply JOP code from the kernel DS. But no poc there or on github :( Someone should think of it and write the code him(her?)self. I don't have enough knowledge to finish this work, sorry.
Seems to be a bunch of various rooting tools, united into one app. There's "root" binary inside. I tried to run it twice and always getting this:
After that my phone reboots (it seems to trigger the kernel protection). Btw I tried to do hardware rooting, but it was a fail take. You may read about it here. |
@dadreamer PXN bypass with JOP/ROP method is necessary,that's what he told me.I think the PXN protect will obivously prohibit anything you want to expand in next steps.So xOP programming is absolutely required first.So far these security guys will not pubilcly share these code obviously as most useful poc will be used by those low-tech bundling malicious android app.So the only way is to learn something about the assembly programming but that's something pretty hard. |
The fujitsu must implemnted some protect method that it's private like in this one,PXN is onething,the fjsec will be the second thing. |
And something about the big-dirtycow |
In conclusion. |
This issue is closed, because F-01F (V10R22A) is rooted now using CVE-2017-8890 exp: https://github.com/dadreamer/CVE-2017-8890. I adapted the exp from thinkycx with some tricky ROP chain to overcome fjsec protection. The LSM and SELinux are still in place after the system restart, so it's a subject for bootloader unlocking and the system modification, but no progress is made for that yet. |
Hi, @dosomder !
I have troubles with adapting iovyroot for Docomo Fujitsu Arrows NX F-01F, which has PXN enabled, even when it's on 32-bit arch. Okay, I've found ptmx_fops, sidtab, policydb and selinux_enabled from kallsyms. I can't find the pointer to selinux_enforcing. It seems, this parameter is hard-coded to 1:
I also tried hard to find the suitable locations for joploc and jopret but still didn't succeed. Here you write, that
setfl()
is insidesys_fcntl
, but in the source it is called fromdo_fcntl
. Nevertheless I checked bothsys_fcntl
anddo_fcntl
in IDA and I didn't see anything, that looks like your patterns. Some googling gave me this article. There are the modifications to iovyroot for rooting Samsung Galaxy S5, which is also on x32 and has got PXN on. But I couldn't find those JOP patterns also.Maybe you could take a look at my kernel dump and kallsyms and give me some advice on how to complete my offsets.
kernel
kallsyms
I already tried running without JOP locations and the exploit cannot finish. After some time my phone reboots.
The text was updated successfully, but these errors were encountered: