USE of RSA Key

57 views
Skip to first unread message

ashish kamble

unread,
Jun 17, 2013, 1:27:39 PM6/17/13
to null-...@googlegroups.com
Hello Null,

I have pulled out private keys from a hardware switch, what i believe is a potential vulnerability. Wanted to know how i can make use of these private keys or certificates and also if i can test it.


Thanks and Regards,

webDEViL

unread,
Jun 17, 2013, 1:39:32 PM6/17/13
to null-...@googlegroups.com
To assess the impact, you will have to see if the same private key is available on other such devices.


--
null - Spreading the right Information
null Mailing list charter: http://null.co.in/section/about/null_list_charter/
---
You received this message because you are subscribed to the Google Groups "null" group.
To unsubscribe from this group and stop receiving emails from it, send an email to null-co-in+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Regards,
webDEViL

khusha...@gmail.com

unread,
Jun 17, 2013, 1:44:36 PM6/17/13
to T
try to decrypt data using private keys
From: webDEViL <w3bd...@gmail.com>
Date: Mon, 17 Jun 2013 23:09:32 +0530
Subject: Re: [null] USE of RSA Key

ashish kamble

unread,
Jun 17, 2013, 1:51:32 PM6/17/13
to null-...@googlegroups.com
@Webdevil 

I didnt understand what your trying to explain...The firmware i have is for a complete series of a particular device range...please let me know what i should check

webDEViL

unread,
Jun 17, 2013, 2:03:30 PM6/17/13
to null-...@googlegroups.com
If you are picking up the keys from the raw binary than that indicates use on other devices as well. I mainly asked the question to make sure those are not private keys being generated on a device setup etc. which basically would mean everyone has a different private key.
It's hard to say on what all you can do with it, but you'll have to figure out what those are used for.

If say,
SSH based access is granted on those keys, then you can generate keys and login on all such devices.
this is used for Code Signing, you can put executable code signed by the vendor.
etc.

eQuiNoX

unread,
Jun 17, 2013, 9:59:22 PM6/17/13
to null-...@googlegroups.com
In the event that keys are generated on the device, you should check if they are weak keys by trying to obtain multiple private keys and trying to do a group GCD on them. There is a 22C3 talk that discusses this approach(amongst others) in detail. The idea was that, low computation power might lead to bad seeding which leads to weak keys.

-- eq

ashish kamble

unread,
Jun 18, 2013, 12:54:11 AM6/18/13
to null-...@googlegroups.com
The keys are present it the firmware which i picked from the site itself ...Its for a particular device series..I guess all the devices of that series will use same firmware....Also there was a previous vulnerability with same firmware version where by the credentials were hard coded...

AeQuiNoX: it would be great help if you provide me the link....

ashish kamble

unread,
Jun 18, 2013, 1:48:42 AM6/18/13
to null-...@googlegroups.com
Also can anybody help me on how to emulate the firmware ...so may be i could test the firmware actually...
may be then the actuall use of keys can be revealed

ashish kamble

unread,
Jun 19, 2013, 12:36:19 AM6/19/13
to null-...@googlegroups.com
help.... would any one suggest me how i can emulate this firmware on a vm platform ?

ashish kamble

unread,
Jun 20, 2013, 2:05:53 PM6/20/13
to null-...@googlegroups.com
Can any one help me 

eQuiNoX

unread,
Jun 20, 2013, 10:21:52 PM6/20/13
to null-...@googlegroups.com
Have you checked out QEMU?

ashish kamble

unread,
Jun 21, 2013, 12:21:02 AM6/21/13
to null-...@googlegroups.com
I googled it found some things, but not exactly sure ...if u have a good video link or a tutorial please let me know



--

Dhanesh k

unread,
Jun 21, 2013, 3:06:41 AM6/21/13
to null-...@googlegroups.com
As you haven't specified what kind of processor architecture is used as base - I am expecting it to be either MIPS or ARM. Both the cases QEMU has the emulator which can run on x86/x86_64 machine (Linux preferred). Please note that the emulation may NOT be successful - as the firmwares are pretty much bonded to their hardware and couple of missing peripherals may crash the bootloader/OS.


Meanwhile you can play with BinWalk (http://code.google.com/p/binwalk/) to figure out components of firmware such as FS, boot/file archives etc and even can figure out what kinda platform it is gonna run.

I will interested to know how you pulled out the private keys in the first place. Can you post them? If it is not possible, can you atleast specify what format(BER/DER) they are in? and what bitsize are we talking about? and what kind of algo (RSA/ECDSA) ?

Regards,
Dhanesh

ashish kamble

unread,
Jun 23, 2013, 2:47:53 AM6/23/13
to null-...@googlegroups.com
Hey Danesh,
That was a gr8 help. I'll surely put int the keys and also I have used binwalk to analyze the firmware. I'll put in all the details here shortly

ashish kamble

unread,
Jul 1, 2013, 1:54:02 AM7/1/13
to null-...@googlegroups.com
@Danesh,

Didnt get much of time to revert back , but this is some what same to what I have ...This image is different one that wat actually i have , this is just for your reference

Inline image 1

find.png

ashish kamble

unread,
Jul 1, 2013, 1:54:52 AM7/1/13
to null-...@googlegroups.com
Can the above thing be a potential vulnerability. ?

find.png

Dhanesh k

unread,
Jul 1, 2013, 2:54:22 AM7/1/13
to null-...@googlegroups.com
May or may not be. If this key is used in any operation (which is of interest), then yes, it is a vulnerability. If it is just sitting there without any use, we may not be able to figure out whether it is a vulnerability or not.

Meanwhile as you can see the RSA private key is encrypted. You need a password to decrypt and get the actual private key.

Regards,
Dhanesh
find.png

ashish kamble

unread,
Jul 1, 2013, 3:30:46 AM7/1/13
to null-...@googlegroups.com
 the key seems to be used for ssh connection i guess
find.png

Dhanesh k

unread,
Jul 1, 2013, 7:52:09 AM7/1/13
to null-...@googlegroups.com
If it is being used as SSH certificate, it is a serious issue.

In normal case, keys are generated and public key is put into servers(in this case, public keys should have put into device/routers) and private key is used to authenticate to SSH session. As the private keys are known, attacker can use it to authenticate to all the devices which has the same key (given that this is used as authorized_key for SSH in the device).

Only thing that is stopping the attackers as of now is the password, that is used to encrypt the private key. Once it is known and assuming previous assumption is correct, its game over :)


Regards,
Dhanesh

find.png
Reply all
Reply to author
Forward
0 new messages