1 / 26

Project: XML Security

This project focuses on XML security, including protocols or systems for preserving properties of XML elements, such as credit card numbers. It examines different kinds of attacks and addresses authentication, secrecy, and replay attack. The project aims to develop a tool or method called Murj for this purpose.

Download Presentation

Project: XML Security

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 259 Project: XML Security March, 2004 Jun Yoshida(Visiting Scholar from Hitachi Ltd.)

  2. Project: XML Security • protocol or system • XML Security (XML Encryption, XML Signature) • properties which should be preserved • XML elements (ex. credit card number) • kind of attacks • Authentication, Secrecy, Replay attack, ... • tool or method • Murj • self or team • myself

  3. XML <?xml version=‘1.0’?> <PaymentInfo xmlns=‘http://example.org/paymentv2’> <Name> Alice </Name> <CreditCard Limit=‘5,000’ Currency=‘USD’> <Number> 1234 5678 9012 3456 </Number> <Issuer> Example Bank </Issuer> <Expiration> 01-05 </Expiration> </CreditCard> </PaymentInfo>

  4. Your Program (.NET, Java) XML Web Services (XWS) HTML User (Web Browser) Web Server Ex) Google.com Amazon.com XML

  5. XWS Application Example • TouchGraph.com GoogleBrowser XML Google.com

  6. Internal Systems Your Company/ Organization Partners Customers System Integration with XWS XML

  7. Getting Started... Informal Protocol Description Formal Protocol Intruder Model Specification Analysis Tool Find error

  8. Specification • XML Encryption: 31 pages • http://www.w3.org/TR/xmlenc-core/ • XML Signature: 47 pages • http://www.w3.org/TR/xmldsig-core/ • WS-Security: 22 pages • http://www-106.ibm.com/developerworks/ webservices/library/ws-secure/

  9. XML on SSL User Commerce Site Credit Company XML XML SSL SSL

  10. XML Encryption --- before --- <?xml version=‘1.0’?> <PaymentInfo xmlns=‘http://example.org/paymentv2’> <Name> Alice </Name> </PaymentInfo> <CreditCard Limit=‘5,000’ Currency=‘USD’> <Number> 1234 5678 9012 3456 </Number> <Issuer> Example Bank </Issuer> <Expiration> 01-05 </Expiration> </CreditCard>

  11. XML Encryption --- after --- <?xml version=‘1.0’?> <PaymentInfo xmlns=‘http://example.org/paymentv2’> <Name> Alice </Name> </PaymentInfo> <EncryptionData type=‘http://www.w3c.org/2001/04/xmlenc#Element’ xmlns=‘http://www.w3c.org/2001/04/xmlenc#’> <CipherData> <CipherValue> A23B45C56… </CipherValue> </CipherData> </EncryptionData>

  12. The Rule of XML Encryption <EncryptionData Id? Type?> <EncryptionMethod/>? <!-- 3DES-CBC, AES128-CBC, ... > (<ds:keyInfo> <EncryptedKey> <!-- shared secret key encrypted with public key > <ds:KeyName>? <ds:RetrievalMethod>? </ds:keyInfo>)? <CipherData> <CipherValue> <!-- data encrypted with shared secret key > </CipherData> <EncryptionData>

  13. Basic Example B A {E1} SSKA1/PKB {E2} SSKB2/PKA {E3} SSKA3/PKB {E4} SSKB4/PKA . . . {En-1} SSKAn-1/PKB {En} SSKBn/PKA Ex: XML Element, SSKx: Shared Secret Key, PKx: Public Key

  14. Shared Secret Key Example B A {E1} SSKX1/PKB, {SSKA} PKB {E2} SSKX2/PKA, {SSKB} PKA {E3} SSKB {E4} SSKA . . . {En-1} SSKB {En} SSKA Ex: XML Element, SSKx: Shared Secret Key, PKx: Public Key

  15. From Spec. to Murj Model Informal Protocol Description Formal Protocol Intruder Model Murj code Specification Analysis Tool Find error

  16. Send XML encrypted with Public Key ruleset i: ClientId do ruleset j: ServerId do cli[i].state = C_SLEEP & multisetcount (l:net, true) < NetworkSize ==> var outM: Message; -- outgoing message cSSK: SharedSecretKeyId; -- shared secret key for client begin cSSK := GenSharedSecretKey();-- SSKA undefine outM; outM.source := i; outM.dest := j; outM.mType := M_PK; outM.element1 := i; outM.enKey1_1 := j;-- {E1} PKB outM.element2 := cSSK; outM.enKey2 := j;-- {SSKA} PKB multisetadd (outM, net); cli[i].state := C_WAIT_PK_MESSAGE; cli[i].server := j; cli[i].cSK := cSK; end; end; end;

  17. Send XML encrypted with SSKey ruleset i: ClientId do choose j: net do cli[i].state = C_WAIT_PK_MESSAGE & net[j].dest = i ==> var outM: Message; -- outgoing message inM: Message; -- incoming message sSSK: SharedSecretKeyId; -- shared secret key for Server begin inM := net[j]; multisetremove (j, net); if inM.mType = M_PK then if inM.enKey1_1 = i & inM.enKey2 = i then-- {E2} PKA, {SSKB} PKA sSSK := inM.element2;-- SSKB undefine outM; outM.source := i; outM.dest := cli[i].server; outM.mType := M_SSK; outM.element1 := i; outM.enKey1_2 := sSSK;-- {E3} SSKB multisetadd (outM, net); cli[i].state := C_WAIT_SSK_MESSAGE; cli[i].sSSK := sSSK; end; end; end; end; end;

  18. Intruder Model Informal Protocol Description Formal Protocol Intruder Model Murj code Murj code, similar for all protocols Specification Analysis Tool Find error

  19. Intruder can Decrypt if Knows Key ruleset i: IntruderId do choose j: net do ruleset intercept : boolean do rule "intruder overhears/intercepts" !ismember(net[j].source, IntruderId) -- not for intruder's message ==> begin alias msg: net[j] do -- message to overhear/intercept -- learn public key based messages if msg.mType = M_PK then if msg.enKey1_1 = i then int[i].elements[msg.element1] := true; end; -- {Ex} PKI if msg.enKey2 = i then int[i].keys[msg.element2] := true; end; -- {SSKX} PKI end; -- learn shared secret key based messages if msg.mType = M_SSK & int[i].keys[msg.enKey1_2] = true then -- {Ex} SSKI int[i].elements[msg.element1] := true; end; end; end; end; end; end;

  20. Intruder can Alter Messages ruleset i: IntruderId do choose j: net do ruleset intercept : boolean do rule "intruder overhears/intercepts and alter ssk" !ismember(net[j].source, IntruderId) -- not for intruder's message ==> var iSSK: SharedSecretKeyId; -- shared secret key for intruder begin alias msg: net[j] do -- message to overhear/intercept if msg.mType = M_PK then iSSK := GenSharedSecretKey(); msg.element2 := iSSK; -- {SSKA} PKB => {SSKI} PKB int[i].keys[iSSK] := true; end; end; end; end; end; end;

  21. Running Murj Analysis Informal Protocol Description Formal Protocol Intruder Model Murj code Murj code, similar for all protocols Specification Analysis Tool Find error Specify security conditions and run Murj

  22. FoundError B A {E1} SSKX1/PKB, {SSKA} PKB {E2} SSKX2/PKA, {SSKB} PKA {E2} SSKX2/PKA, {SSKI} PKA {E3} SSKI E3 failed Ex: XML Element, SSKx: Shared Secret Key, PKx: Public Key

  23. XML Signature Signed Info. <Signature> ... XML Element XML Element Signed Info. <Signature> ... Reference Signed Info. <Signature> ... XML Element Reference Reference Signature Value Signature Value Signature Value Detached Enveloped Enveloping Signature Signature Signature

  24. The Rule of XML Signature <Signature ID?> <SignedInfo> <CanonicalizationMethod/> <SignatureMethod/> (<Reference (URI=)?> <!-- a data object using a URI-Reference > (<Transforms>)? <DigestMethod><DigestValue> <!-- SHA-1, SHA256, SHA512, ... > </Reference>)+ </SignedInfo> <SignatureValue> <!-- digest encrypted with private key > (<KeyInfo> <KeyValue><X.509Data> <!-- public key and X.509 certificate > </KeyInfo>) </Signature>

  25. Fixed Shared Secret Key Example Doc1 B A {E1} SSKX1/PKB, {SSKA} PKB SigA{Doc1} Doc2 {E2} SSKX2/PKB, {SSKB} PKA SigB{Doc2} {E3} SSKB SigA{Doc3} {E4} SSKA SigB{Doc4} . . . {En-1} SSKB SigA{Docn-1} {En} SSKA SigB{Docn} Ex: XML Element, SSKx: Shared Secret Key, PKx: Public Key

  26. Conclusion • I couldn’t find any error about the combination of XML Enc./Sig. • But XML Enc./Sig. have the flexibility to use • It’s important to use correctly

More Related