Shane Bracher

300 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
300
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Shane Bracher

  1. 1. Enabling Security Testing from Specification to Code Shane Bracher and Padmanabhan Krishnan Fifth International Conference on Integrated Formal Methods (IFM 2005) 29 November – 2 December 2005 Eindhoven, The Netherlands
  2. 2. Problem Statement <ul><li>Formal models: </li></ul><ul><ul><li>Usually created for verifying key properties. </li></ul></ul><ul><ul><li>The more abstract, the easier to verify. </li></ul></ul><ul><ul><li>But for testing , they are too far removed from the implementation. </li></ul></ul><ul><li>Possible testing approaches: </li></ul><ul><ul><li>Exhaustive testing – all possible behaviour. </li></ul></ul><ul><ul><li>Bounded exhaustive testing – all possible behaviour to a certain depth. </li></ul></ul><ul><ul><li>Fault injection testing – reaction under faulty environments. </li></ul></ul><ul><ul><li>Model based testing – aims to reduce the testing effort. </li></ul></ul>
  3. 3. Objective <ul><li>We have a formal model of a protocol. </li></ul><ul><li>We want to use this model to derive test sequences. </li></ul><ul><li>In particular, we are interested in testing the security properties. </li></ul><ul><li>How can we use model based techniques to automatically generate test sequences for testing the security properties of protocols? </li></ul><ul><li>Test sequences generated from: </li></ul><ul><ul><li>the formal model are too abstract. (too far from the implementation) </li></ul></ul><ul><ul><li>the implementation are too concrete. (not reusable) </li></ul></ul>
  4. 4. Methodology <ul><li>Translate the “high-level” formal specification into an intermediary model: </li></ul><ul><ul><li>less abstract </li></ul></ul><ul><ul><li>closer to an implementation </li></ul></ul><ul><li>Now we can generate test sequences from the intermediary model (which was derived from the formal model). </li></ul><ul><li>For testing the security properties: </li></ul><ul><ul><li>The security goals are already stated in the high-level model. </li></ul></ul><ul><ul><li>We can specify these goals within the intermediary model as annotations . </li></ul></ul>
  5. 5. “Bridging the gap” High Level Protocol Specification Language (HLPSL) Bandera Intermediate Representation (BIR) Bogor Model Checking Framework
  6. 6. Case Study <ul><li>Internet Open Trading Protocol (IOTP) </li></ul><ul><li>Objectives of case study: </li></ul><ul><ul><li>Verify the ability to translate a high-level model into an intermediary model. </li></ul></ul><ul><ul><li>Using annotations, determine the possibility of deriving test sequences from the intermediary model. </li></ul></ul>
  7. 7. Internet Open Trading Protocol Merchant (M) Payment Processor (P) Delivery Agent (D) Offer BrandList, Offer Select, Offer Pay, Offer, Sig_M(Pay) Offer, Pay, Merchant, Sig_C(Pay) Receipt, Sig_P(Pay, Receipt, Offer) Sig_P(Pay, Receipt, Offer), Pay, Receipt, Offer Data, Sig_D(Data) Customer (C)
  8. 8. Intermediary Model <ul><li>record (|Customer|) extends (|Role|) { </li></ul><ul><li>(|Agent|) /|Customer.C| ; /* All agents */ </li></ul><ul><li>(|PublicKey|) /|Customer.Kc| ; /* All keys */ </li></ul><ul><li>(|Channel|) /|Customer.SND_CM| ; /* All channels */ </li></ul><ul><li>/* snipped */ </li></ul><ul><li>loc loc1: live { [|brandlist|] , [|offer|] , [|select|] } </li></ul><ul><li>when [|this|] . /|Customer.RCV_CM| .read do invisible { </li></ul><ul><li>[|brandlist|] := ( (|BrandList|) ) [|this|] . /|Customer.RCV_CM| . /|Channel.payload| [ 0 ]; </li></ul><ul><li>[|offer|] := ( (|Offer|) ) [|this|] . /|Customer.RCV_CM| . /|Channel.payload| [ 1 ]; </li></ul><ul><li>[|this|] . /|Customer.RCV_CM| .read := false ; </li></ul><ul><li>[|select|] := new (|Select|) ; </li></ul><ul><li>[|this|] . /|Customer.SND_CM| . /|Channel.payload| [ 0 ] := [|select|] ; </li></ul><ul><li>[|this|] . /|Customer.SND_CM| . /|Channel.payload| [ 1 ] := [|offer|] ; </li></ul><ul><li>[|this|] . /|Customer.SND_CM| .read := true ; </li></ul><ul><li>} </li></ul><ul><li>goto loc2; </li></ul>
  9. 9. Deriving Test Sequences <ul><li>Security properties tested: </li></ul><ul><ul><li>Authentication – Customer authenticates Merchant on Pay. </li></ul></ul><ul><ul><li>Secrecy – Pay is to remain secret from the Delivery Agent (hypothetical). </li></ul></ul><ul><li>Sessions: </li></ul><ul><ul><li>Authentic Customer – Authentic Merchant </li></ul></ul><ul><ul><li>Authentic Customer – Intruder acting as Merchant </li></ul></ul><ul><ul><li>Intruder acting as Customer – Authentic Merchant </li></ul></ul><ul><li>Test sequences produced as counter examples. </li></ul><ul><ul><li>But to get a counter example, we need a violation to occur. </li></ul></ul><ul><ul><li>Solution: negate the security goals. </li></ul></ul>
  10. 10. Results <ul><li>Concurrent sessions: </li></ul><ul><ul><li>480 test sequences returned. </li></ul></ul><ul><ul><li>Reason: violation found in large number of interleavings. </li></ul></ul><ul><ul><li>Too many for the Bogor Counter Example Environment to display. </li></ul></ul><ul><li>Therefore, it was necessary to identify a sufficiently simple interleaving in order for a test sequence trace to be returned. </li></ul>
  11. 11. Conclusion <ul><li>Demonstrated the practicability of using an intermediary model for automatically deriving test sequences for testing the security properties of protocols. </li></ul><ul><li>The derived test sequences are both suitable and reusable for testers to apply to a working protocol implementation. </li></ul>
  12. 12. Thank you for your attention. <ul><li>Shane Bracher [email_address] </li></ul><ul><li>Padmanabhan Krishnan [email_address] </li></ul><ul><li>Centre for Software Assurance School of Information Technology, Bond University Gold Coast, Queensland, 4229, AUSTRALIA </li></ul><ul><li>www.sand.bond.edu.au </li></ul>

×