-
Notifications
You must be signed in to change notification settings - Fork 115
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
6.20 port? #48
Comments
I have successfully built this exploit in my machine. |
@PaulJenkin sure , join my discord or send me a friends request on discord LM#6820 |
Just in case, the checklist to port the toolchain (my implementation of bad_hoist + retargeted shinh/8cc) to another firmware:
Once all of this is fixed, compiling and running ropchains should work, unless some gadgets are missing on 6.20. |
@LightningMods |
@sleirsgoevy Note:
|
I will also like to share with you @sleirsgoevy all the files needed FULL 6.20 Fs with modules, decrypted https://psarchive.darksoftware.xyz/6.20-FS.zip 6.20 kernel https://cdn.discordapp.com/attachments/742234482333188258/742235072463241287/Kernel_Dump_620-1.zip 6.20 kernel offsets |
This offset was copy-pasted from a 6.20 webkit exploit, so it is the same. I mean, it's the .text offsets are probably different. |
The script is not able to differentiate between a network hangup and a browser crash, so it expects you to press Enter once you see the blue screen of webkit death. |
@sleirsgoevy how do we get these offsets address for libc and libkernel
as on 6.20 using those addresses gives us way over 1.2mbs and 300kb (it never stops) so they are not correct |
This was going to be a huge comment, but I decided to upload it as a document instead. |
@sleirsgoevy hello i looked at my dump and did as it says but i cant find anything close to this
|
You'd need to scroll a bit further down. This "GOT" thing has 8 (at least it was 8 for me) at the end of any address, and is long enough to be noticeable while scrolling through. It's not at the beginning. EDIT: are you objdump'ing the webkit dumped using the Makefile, or the "decrypted userspace" binaries? That does make difference. |
@sleirsgoevy Note: |
yes i agree with him, it would be very beneficial for you to join a discord call with us @sleirsgoevy that way we can finish this ASAP |
need help in converting base address and dumping libc and libkernal What we have done so far
Also tried with 827021e60 to (7776/16) 486 still we are getting same errors |
Also, the very first address is (obviously) a start of some module too. So with 4 "jumps" you've got the same 5 modules as myself. |
Ok we took the address 827021e60 and did uint16_t hi5 = (1 >> 64) + 0x838fa4000;. will retry withe line number and post the result (all the files i have collected so far) in 1 hours. |
I tried Dumping by note the pointer in sorted file with the line number in Unsorted file Here are my issues
Things which i am not sure
Linking all the files
|
Libc - https://www84.zippyshare.com/v/NnorJbSz/file.html Things I did
Note:
|
@sleirsgoevy Please let me know if you need any files from me |
6.20 inline.asm
|
Looks like the GOT dumper was screwed due async call to writing it, Fixed that issue. now got the solid numbers 802 and 598 has to be dumped, will check and post the result here Question
|
Regarding the kex part, there are a few offsets that need to be fixed: a series of defines in kex.c, and kernel patch offsets in inline.asm. The only custom (i.e. not present in Mira) patch there is the patch that allows any process to catch SIGSTOP and SIGKILL, and it's not strictly necessary. |
Can you share updated Kex.c and inline.asm for 6.20 The below link has all the information i think Sorry for asking this , but it would huge help for me I figured out the dump address |
What I can say right now (without a kernel dump) is the following:
|
Lightning mods shared kernel dump https://psarchive.darksoftware.xyz/6.20-FS.zip 6.20 kernel https://cdn.discordapp.com/attachments/742234482333188258/742235072463241287/Kernel_Dump_620-1.zip |
All offsets are from libkernel_base. P.S. LightningMods seems to have posted a patched inline.asm here a few comments ago. |
I have figured out how to take all the address and update rop, If every thing goes well i can share detailed report on how to do it, with some script which make it more easier |
In kex.c you can see (lines 463-469) that F_DETACH_OFFSET is used to calculate kernel_base from f_detach. You can go another route and do the following:
This code will work on any firmware, given that the kernel base is a) below f_detach b) page aligned (1 page = 4096 bytes) c) contains the bytes 7F 45 4C 46. This is true for all known firmwares. Now that you have the kernel base, print out the actual value of |
Thanks to @sleirsgoevy @LightningMods Achieved kernal panic |
Included all the details and script i have used for this. GOT offset Starting Address - 10054536 Libc address: 599 rop.js: Google drive link syscall.js: Google drive link Kex.c: Google drive link Self host: Google drive link -------------Useful Script -------------- |
Added the below pull request
One Question |
I'd be glad to see 6.20 support in the mainline repo. I think it's much better to keep things in one place. |
ok So far the c-code.js create by this process is making kernel panic every time i executed it. No Success at all. |
UPDATE The first one is in |
Can you let me know on how to find these values in 6.20? |
|
I am not sure where to start, will do i have to look for these value in libKernal obj dump? |
These are not in libkernel, they are in the kernel. And as I've said, you first look up sys_kill inside sysent, then disassemble the kernel and follow a few jumps. If the "kernel base at the time of dumping" causes the problem, it can be obtained by doing |
will you be able to locate it in the below kernel.bin? |
The Below is the Readelf Response: Elf file type is EXEC (Executable file) Program Headers: Section to Segment mapping: |
You're readelf'ing the wrong binary. I mean, it is inside the kernel (which is in the |
The above Readelf is is the response of the Kernel_Dump_620.elf made from Kernel_Dump_620.bin (objdump -d Kernel_Dump_620.bin >> Kernel_Dump_620.elf) Will be able to assist please? |
You'll want to read the original binary blob, not the generated ELF, see the edit. Reading the latter gives you nothing. |
you mean load the Kernel_Dump_620.bin in IDA pro? |
Thanks for detailed Screen Capture, it was really informative: I have regenerated the jb file with new kex.c Attaching the kex.c and inline.asm, Not Sure if some thing else needs to be changed Note: |
|
Can you let me know which log file you are refereeing and also how to access them? |
kex.c has printf calls that print various debug info. It is stored in |
The Hang up is happening at below line: for(int i = 0; i < 256; i++) output when return 0 is above the for loop: |
I suppose that most probably one of the kernel patches in |
There is no hang up or poweroff With new inline_asm.c and adding the return 0 before if(!fork()) I am able to see the below output Please let me know on what value changes required inline.asm |
Attaching the last used files https://drive.google.com/drive/folders/1_hpdxo9WhO2oXyL_3GOGG4RNcmlkMwqO?usp=sharing |
So... You say that you commented out the kpatches and it started to work. However in your attached files I see inline.asm with all kpatches intact. Does that mean that it finally worked, or you attached the wrong file? |
Attached the wrong file This is what is happening, if i comment everything between disable kernel WP and enable kernel WP and add a return 0 before if(!fork()). Then there is no Hangup or power off |
Then just try re-enabling the patches one by one until it hangs again. No rocket science, just a dozen of retries. |
I have successfully ported Mira(w hen) to 6.20, but the current exploit used on 6.20 breaks rootvnode/open , I tried to build your exploit but it doesn't want to work for me
I can provide you with everything you need to port, modules, kernel dump and offsets already ported
Please reply to this comment or tag me on
Discord: https://discord.me/dks
Or tag me in a post on Twitter
https://twitter.com/LightningMods_?s=09
The text was updated successfully, but these errors were encountered: