среда, 24 апреля 2013 г.

How XSS can defeat your digital signatures

Recently we exploited nice XSS vector in one of RBS (Remote Banking Service) system. This example shows very well how dangerous can be client-attack.

Client after the authorization could sign electronic documents.
For signature from browser developers used CAPICOM technology.

If you are already understood us, you can not finish this note ;)

Signature from JavaScript - this is easy and usefull from client-side attacks.
JS code for sign document looks like:

function SignCreate(certSubjectName, dataToSign) {
    var oStore = CreateObject("CAPICOM.Store");

    var oCertificates = oStore.Certificates.Find(
    if (oCertificates.Count == 0) {
        alert("Certificate not found: " + certSubjectName);

You can easily call this function from stored/reflected XSS to sign arbitrary data.
To solve the PIN entry problem, we have used the caching mechanism for the key. Most often, after entering the PIN code of the key, PIN is remembered for a while.

So we were able to sign arbitrary (injected) document immediately after the user signs his own document (and entered PIN of course).

Then, using the Javascript we were able to hide the injected signed document from users's orders table (document was order request) for current user.

So only a single stored XSS vulnerability defeated all security measures of the RBS system. Note, that typically protections such as httpOnly cookies and SSL have been included, but it does not help.

22 комментария:

  1. Your English kills me. It must be really very "artical" ;)

  2. You might be asking how you can keep away from this, or whether a payday advance is ever justified regardless of the hazard.
    Cash Advance

  3. So it is prudent to pick your bank carefully, by working out the net payable enthusiasm utilizing the online mini-computers for the most part gave by the loan specialists site.
    Payday Loans Chicago

  4. Know about every one of the terms and conditions that may apply. The web makes correlation shopping simple; ensure you exploit this to spare a couple of dollars on charges every payday.
    Payday Loans Chula-vista

  5. Payday credits are a snappy and simple approach to 'top up' a financial balance that may have excessively month left toward the finish of the cash!
    Cash Advance Corona

  6. Savage moneylenders are promptly accessible so take the time and contact no less than 3 unique organizations preceding being in a defenseless state.
    Car Title Loans Chicago


  7. شركة تنظيف الامارات

    شركة تنظيف دبي شركة نظافة بدبي
    شركة تنظيف كنب دبي بالبخار تنظيف كنب دبي بالبخار
    شركة غسيل سجاد بدبي غسيل سجاد دبي
    شركة تنظيف في ابوظبي شركات تنظيف ابوظبي
    شركة تنظيف منازل فى العين شركة تنظيف منازل العين
    شركات تنظيف كنب في ابوظبي شركات تنظيف كنب ابوظبي

  8. Этот комментарий был удален автором.