niedziela, 9 kwietnia 2017

Learning routers

Lately I finaly found a few hours to sit back and join the whole proces of 'learning routers'... Below you will find few notes from those adventures...

To be honest it took me a while to prepare a 'correct' and working environment. Somehow, few days before, I wasn't able to install or setup it 'properly'. Once the iface was not working, once there was a hang-on-boot-issue (also described somewhere on web)... Anyway, right now all is working and we're ready to go.

I decided to (switch back and again) install 'all of it'* on Debian 8.

For *all-of-it, you will need to:
- install qemu (and all libs you'll need; you'll find some great tutorials about it online), to do that I simply used apt-get. 
- binwalk - from apt or source - your choice (afaik for some reasons I used both versions)
- firmware-mod-kit - I used this version

All firmwares for testing purposes I found available online (via Google or directly at Vendor's webpage(s)).

Ok, let's get to work.






As you can see there is a lot of files to check. Let's try to extract the whole content of one the few firmwares I found on the web:


Below some results... First of all I used binwalk to extract Squashfs file(s, as well as any other files possible to extract):



(I used mv _2016...thisLongDirFMWNameTo DIR615A )

Ok, we got it:




For the next step we will use unsquashfs_all.sh script from FMK package:


It looks that we have extracted the content of router's filesystem:


Let's go to that location:


Yes, (at this stage we can go to checking all possible configs and scripts, etc... but;)) this is what I was looking for:


Ok, let's go deeper:


Great! So now we're able to run binaries copied ("for testing purposes";)) from our router firmwares.


True.

Next...


:)


...so maybe "it'll be continued..." ;)

Cheers.
 



Brak komentarzy:

Prześlij komentarz