CTCaer / hekate

hekate - A GUI based Nintendo Switch Bootloader
GNU General Public License v2.0
6.73k stars 574 forks source link

Please cancel KASLR on 5.0.0 or above. Thank you very much! #70

Closed Charlieeco95 closed 6 years ago

Charlieeco95 commented 6 years ago

Please cancel KASLR on 5.0.0 or above. Thank you very much!

AnnsAnns commented 6 years ago

That sounds really hard to do and would probably make the system unstable - Also what exact benefit would it bring?

Charlieeco95 commented 6 years ago

@tumGER Thanks for replying my message.

KASLR is used for anti-hacking. That's the reason why I wish it could be canceled. or else, it's very difficult to find the real addresses or pointers to hack games.

Charlieeco95 commented 6 years ago

A reference to whom it may concerned:

http://switchbrew.org/index.php?title=Memory_layout

kaslrBase = (rand64ViaSmc() % 0x3FFF0 << 21) + DRAM_VA(_start);

Can anyone please help to patched/disable this random value (rand64viasmc)?

Then, it would be all good. Thank you so much in advance.

Thank you so much~

jakibaki commented 6 years ago

kaslr is just randomizing kernel-addresses.

What you 'want' to disable is aslr which can be done in loader by keeping aslr_slide at zero https://github.com/Atmosphere-NX/Atmosphere/blob/44e2412ae6905924e9ed3fd228e3ceeda0b8d9d6/stratosphere/loader/source/ldr_nso.cpp#L184

The wip lua-scripting support in sys-netcheat can help you find the base-addresses of memory-regions though so you don't need any of that.

Charlieeco95 commented 6 years ago

@jakibaki

Thanks so much for the explaination and your big help!

I will check it out.

AnalogMan151 commented 6 years ago

@jakibaki So basically comment this part out? https://github.com/Atmosphere-NX/Atmosphere/blob/master/stratosphere/loader/source/ldr_nso.cpp#L185-L187

AnnsAnns commented 6 years ago

@AnalogMan151

which can be done in loader by keeping aslr_slide at zero

It already stops doing that by default but you can re-enable aslr when changing that var: https://github.com/Atmosphere-NX/Atmosphere/blob/44e2412ae6905924e9ed3fd228e3ceeda0b8d9d6/stratosphere/loader/source/ldr_nso.cpp#L184

So yeah, he wanted aslr stopped and not kaslr (even though he said kaslr) - That's why I was so confused why anybody would need it