Research ida mbn/sbl loader (relocation table help)

What version of loaders do you prefer?

  • Mac - sheep4lyfe (.pmc)

    Votes: 0 0.0%
  • Linux - (.llx)

    Votes: 0 0.0%

  • Total voters
    7

Surge1223

New member
Hey all, I have been writing a loader to load mbn, sbl, and in some cases bin files. I have written it in both. C+ and python, the python version should be loadable universally given that you have ida python installed correctly. I don't have an ida version for Mac to test on, although if someone wants to test it on a mac version I have successfully made the makefile to make both Linux (.llx?) and Mac (.pmc) versions from within the Mac or Linux env. And of course the visual Studio version, (I have vs 2013, sorry 2008, 2010 folks)

Now this isn't labeled release because I'm having a issue with the relocation table. Note the loader loads the mbn/sbl successfully and at the right address and offsets, however the data, bss, rodata, text, and text . boot sections do not load at the right addresses (though ironically for some reason .bss does) Also the other mbn/sbl loaders out there don't do this correctly, although a guy named Ralekdev seems like he probably almost had it with his loader.

Luckily for me I have someone that "may or may not be directly affiliated with making mbn/sbl bootloaders for a company i wish to keep private" and he/she isn't helping directly but is nice enough to let me know that the addresses for the relocation segments are incorrect (except for bss)

Sorry for writing a diary here but I figure id open this up to any ideas or if anyone can see/know of a way we can maybe just randomly search and mark until we match some heuristic to determine the segments correctly. On arm the B instructions are basically godsend because they always occur. Just thinking out load and will gladly take suggestions.

Ill attach the python loader first and soon the CPP versions as well (the CPP version is a bit behind since I find it easier to add/test with python script instead since I don't have to compile everytime to test.

Thanks!
 

Storm Shadow

Administrator
Staff member
Developer
Ida Pro Expert
Elite Cracker
Here is the windows one.
Think it loads okay, even if im no c++ expert.

I also looked at the python one.
The test file you gave dosent create the segments data, bss, rodata, text, and text . boot.

Only Code shows up here.


Also a Reanalyze is always good after loader is loaded.
Giving a ekstra pass.Finding more functions

Python:
sEA = 0x0
eEA = MaxEA()
analyze_area(sEA, eEA)
 

Attachments

  • mbn-sbl-5.6.ldw.7z
    15.1 KB · Views: 7
Last edited:
Top