Skip to content
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

getROSbin.py not support npk 5 version? #38

Open
skysider opened this issue Apr 1, 2018 · 9 comments
Open

getROSbin.py not support npk 5 version? #38

skysider opened this issue Apr 1, 2018 · 9 comments

Comments

@skysider
Copy link

skysider commented Apr 1, 2018

R.T.
I try to use the function get_binary in the script to extract npk file from http://files.shelbybb.com/mikrotik/5.19/ and it doesn't work.

@BigNerd95
Copy link
Owner

Since chimay red doesn't support 5.x I made getROSbin for 6.x only

@BigNerd95
Copy link
Owner

Then I made getROSbin to speed up the process only.
If you want to audit other versions you can use binwalk

@skysider
Copy link
Author

skysider commented Apr 1, 2018

Indeed, I test two 5.x version firmware with poc of dos mode, it works.

@BigNerd95
Copy link
Owner

If something crashes doesnt mean it is exploitable
I didnt tested 5.x but another researcher told me that www on 5.x is not multithreaded so the exploit must rewritten

@11ume
Copy link

11ume commented Apr 1, 2018

@skysider

I try to use the function get_binary in the script to extract npk file from http://files.shelbybb.com/mikrotik/5.19/ and it doesn't work.

get_binary() use Squashfs 4.0 decompressor.
5.x .npk files use Zlib compression

binwalk 5x.npk: Zlib compressed data, default compression

You can see how decompression is done in this part,
then you just have to extract the path /nova/bin/www
https://github.com/kost/mikrotik-npk/blob/d54e97caac9ea447e29939ca4176d17eeff856a9/unpacknpk.py#L90

@skysider
Copy link
Author

skysider commented Apr 2, 2018

@hume3 thanks, I will have a look.

@dd404x
Copy link

dd404x commented Apr 3, 2018

@hume3 thanks,I used your method to successfully unzip the npk file。But after this I don't know how to operate?
image
image
image

@11ume
Copy link

11ume commented Apr 3, 2018

  1. You are using the binaries for the RouterOS PowerPC architecture with StackClash_x86.py for "x86" arch.
  2. The exploit for PPC has not been performed @BigNerd95 does not have a physical device.
  3. Maybe the exploit for ROS 5.x should be rewritten for mipsbe and x86.

@dd404x
Copy link

dd404x commented Apr 4, 2018

thanks~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants