PKI security for JNEXT

1 view
Skip to first unread message

Amnon

unread,
Oct 20, 2008, 3:57:00 PM10/20/08
to jNext discussion group
Hi,

Looks like I've finally got all the necessary plumbing together to
support the security infrastructure for JNEXT. The next version of
JNEXT is planned to be released with this framework, hopefully making
JNEXT secure enough to finally be deployed on public Web sites.

The basic idea is as follows: Any Web site that runs JavaScript code
that makes use of JNEXT, will have to sign that code with its private
key, and make it's corresponding X.509 certificate available for
download by the JNEXT client. The JNEXT client plugin will then
download the code signature and the site's certificate. Then using the
using the Web site certificate and the locally stored root certificate
of the CA that issued that certificate will verify that the JavaScript
code matches this signature, .

If the root certificate of the Certificate Authority, the Web site
certificate, the JavaScript code and the JavaScript code signature are
inconsistent, then JNEXT will not allow the JavaScript code from that
page access to native code via JNEXT extensions.

If anyone can spot any flaws or loopholes in this design please let me
know. As always with cryptography, the more people scrutinize this,
the better.

Thanks,
Amnon

Amnon

unread,
Oct 29, 2008, 1:49:00 AM10/29/08
to jNext discussion group
As always, the devil is in the details. There's a security hole that
looks like its going to be difficult to plug. The problem is that
JNEXT can verify that the signature of the JavaScript code is
authentic at a given moment T, but that does not mean that it would
have been authentic at T-1 and since we are dealing with JavaScript it
doesn't mean it will be authentic at T+1.

This means that a malicious hacker can add code to a signed HTML page
without JNEXT noticing that something has gone wrong when the DOM is
inspected as follows.

<html><body>
<script id="id1">
alert( document.getElementById("id1").innerHTML );
var strStealthCode = "Stealth malicous code has just used JNEXT to
format your disk"
setTimeout( "(function() { alert( document.getElementById('id1'));
alert( strStealthCode ) })()", 3000 );

// Remove traces of malicious code
var obj = document.getElementById("id1");
obj.parentNode.removeChild(obj);

// JNEXT script signature authentication starts at this point

</script>
</body></html>

Need to do some more research on what can be done to fix this

-Amnon
Reply all
Reply to author
Forward
0 new messages