of ssh implementations
play

of SSH Implementations Paul Fiterau, Toon Lenaerts, Erik Poll, - PowerPoint PPT Presentation

Model Learning and Model Checking of SSH Implementations Paul Fiterau, Toon Lenaerts, Erik Poll, Joeri de Ruiter, Frits Vaandrager, Patrick Verleg Introduction protocols: SSH, TLS, SMTP, FTP, TCP, UDP many implementations per


  1. Model Learning and Model Checking of SSH Implementations Paul Fiterau, Toon Lenaerts, Erik Poll, Joeri de Ruiter, Frits Vaandrager, Patrick Verleg

  2. Introduction • protocols: SSH, TLS, SMTP, FTP, TCP, UDP … • many implementations per protocol ➢ implementations MUST/SHOULD/MAY adhere to the specifications…

  3. Introduction • protocols: SSH, TLS, SMTP, FTP, TCP, UDP … • many implementations per protocol conformance ➢ implementations MUST/SHOULD/MAY adhere to testing the specifications…

  4. Motivation Model Learning  automatically infers models for concrete implementations  checking conformance of models may be difficult

  5. Motivation Model Learning  automatically infers models for concrete implementations  checking conformance of models may be difficult

  6. Motivation Model Checking  automatically checks conformance of models to specifications  requires models and formalized specifications Model Learning  automatically infers models for concrete implementations  checking conformance of models may be difficult

  7. Motivation Model Learning + Model Checking  automatically infers models for concrete implementations  automatically checks conformance of models to specifications  requires formalized specifications Model Checking  automatically checks conformance of models to specifications  requires models and formalized specifications Model Learning  automatically infers models for concrete implementations  checking conformance of models may be difficult

  8. What was done Model Learning + Model Checking  automatically infers models for concrete implementations  automatically checks conformance of models to specifications  requires formalized specifications Application of ML+MC on SSH (a real world protocol): 1. use Model Learning to infer models of 3 SSH server implementations 2. formalize specifications from the SSH RFC standards 3. use Model Checking to verify models against these specification

  9. What was done Model Learning + Model Checking  automatically infers models for concrete implementations  automatically checks conformance of models to specifications  requires formalized specifications SUL RFC Schematic Overview Model Learning Spec. formalization prop1_LTL prop2_LTL SUL: SUL: prop1_LTL Model Checking prop2_LTL

  10. What was done Model Learning + Model Checking  automatically infers models for concrete implementations  automatically checks conformance of models to specifications  requires formalized specifications enough for a publication?

  11. What was done Model Learning + Model Checking  automatically infers models for concrete implementations  automatically checks conformance of models to specifications  requires formalized specifications Model Learning: Model Checking:  requires mapper component  requires model transformation  requires thorough testing  requires counterexample validation

  12. What was done Model Learning + Model Checking  automatically infers models for concrete implementations  automatically checks conformance of models to specifications  requires mapper component Patrick’s M. Thesis  requires formalized specifications  requires thorough testing Toon’s B. Thesis Publication  requires model transformation  requires counterexample validation

  13. What was done SUL RFC Model Learning Spec. formalization prop1_LTL prop2_LTL SUL: SUL: prop1_LTL Model Checking prop2_LTL

  14. Model Learning SUL (System under Learning) inputs Learner outputs inferred state model

  15. Model Learning Learner Queries: register/ok login Learner SUL nok logout/ok register/ok Mealy login/ok Machine */nok */nok */nok Input Alphabet: [register, login, logout] Output Alphabet: [ok, nok]

  16. Model Learning Learner Queries: register/ok login/nok logout/nok register/ok register/nok register, login Learner SUL ok, ok logout/ok register/ok login/ok */nok */nok */nok Input Alphabet: [register, login, logout]

  17. Model Learning Learner Queries: register/ok login/nok logout/nok register register/ ok nok register, login Learner SUL ok, ok Hypothesis: logout/ok register/ok login/ok */nok */nok */nok

  18. Model Learning Learner SUL Hypothesis: logout/ok Tester register/ok login/ok */nok */nok */nok

  19. Model Learning Test Queries: register register login/ok nok nok Learner SUT tests Hypothesis: logout/ok Tester register/ok login/ok */nok */nok */nok

  20. Model Learning Learner SUT Hypothesis: logout/ok correct! Tester register/ok login/ok */nok */nok */nok

  21. Model Learning new queries Learner SUT New Hypothesis Tester

  22. Model Learning new queries Learner SUL tests New Hypothesis correct! Tester

  23. Model Learning Learner/ SUL Tester

  24. Model Learning Learner/ SUL Tester SUL.login, login, logout SUL.logout ok, nok true/false concrete i/o abstract i/o (strings) method calls, returned obj. packets

  25. Model Learning Learner/ SUL Tester login(uid) login_0 login_1 ok, nok … ok, nok parameterized small abstract i/o alphabet i/o alphabet

  26. Model Learning abstract i/o param i/o concrete i/o login(“admin”) SUL.login (“admin”) login_valid Learner/ Mapper SUL Tester ok true ok Mapper 1. translates: ➢ between abstract and param. i/o ➢ between param. i/o and concrete i/o

  27. Model Learning Learner/ Mapper SUL Tester Mapper 1. translates: ➢ between abstract and param. i/o ➢ between param. i/o and concrete i/o 2. gives a (deterministic) Mealy Machine representation ➢ removes time dependencies, non-determinism..

  28. Model Learning queries concrete queries/tests Learner Mapper SUL tests New Hypothesis correct! Tester

  29. SUL RFC Spec. Model Learning Model Learning formalization prop1_LTL prop2_LTL SUL: SUL: prop1_LTL Model Checking prop2_LTL queries concrete queries/tests Learner Mapper SUL tests New Hypothesis correct! Tester

  30. Model Learning queries concrete queries/tests Learner Mapper SUL tests TODOs: correct! Tester 1. know your SUL 2. define i/o alphabet 3. implement mapper 4. choose learner and tester algorithms 5. connect and execute!

  31. Model Learning queries concrete queries/tests Learner Mapper SUL tests TODOs: correct! Tester 1. know your SUL 2. define i/o alphabet 3. implement mapper 4. choose learner and tester algorithms 5. connect and execute!

  32. The SSH Protocol ➢ protocol for operating network services (e.g. terminal) securely over an unsecured network ➢ client/server application layer protocol, runs on top of TCP CLIENT APPLICATION SERVER APPLICATION UNSECURE NETWORK

  33. The SSH Protocol ➢ protocol for operating network services (e.g. terminal) securely over an unsecured network ➢ client/server application layer protocol, runs on top of TCP ➢ Learner + Mapper replaces the SSH CLIENT, goal learn the SSH Server! SERVER APPLICATION LEARNER APPLICATION (= SUL) UNSECURE Learner + Mapper NETWORK

  34. The SSH Protocol ➢ comprises three layers which interoperate (no encapsulation) ➢ each layer responsible for each of the 3 protocol steps, ➢ for each we define the happy flow at an abstract level User Authentication Connection Layer Layer Transport Layer TCP/IP Layer CLIENT APPLICATION SERVER APPLICATION UNSECURE NETWORK

  35. The SSH Protocol User Authentication Connection Layer Layer ➢ 3 steps Transport Layer 1. establish a secure connection ( by exchanging keys) TCP/IP Layer CLIENT APPLICATION SERVER APPLICATION UNSECURE NETWORK

  36. The SSH Protocol User Authentication Connection Layer Layer ➢ 3 steps Transport Layer 1. establish a secure connection ( by exchanging keys) TCP/IP Layer CLIENT APPLICATION SERVER APPLICATION UNSECURE NETWORK

  37. The SSH Protocol User Authentication Connection Layer Layer ➢ 3 steps Transport Layer 1. establish a secure connection ( by exchanging keys) TCP/IP Layer 1. exchange preferences (KEXINIT) 2. perform key exchange (KEXxx) 3. put new keys to use (NEWKEYS) 4. engage the auth. service (SR_AUTH) Happy flow: Other inputs: DEBUG, IGNORE, DISCONNECT.. Other outputs: DEBUG, IGNORE, DISCONNECT..

  38. The SSH Protocol User Authentication Connection Layer Layer ➢ 3 steps Transport Layer 1. establish a secure connection ( by exchanging keys) TCP/IP Layer CLIENT APPLICATION SERVER APPLICATION UNSECURE NETWORK

  39. The SSH Protocol User Authentication Connection Layer Layer ➢ 3 steps Transport Layer 1. establish a secure connection ( by exchanging keys) TCP/IP Layer key re-exchange (rekey): same procedure, old keys are replaced by new ones can happen any time after the initial key exchange protocol should not affect operation of higher layer protocols CLIENT APPLICATION SERVER APPLICATION UNSECURE NETWORK

  40. The SSH Protocol User Authentication Connection Layer Layer ➢ 3 steps Transport Layer 1. establish a secure connection ( by exchanging keys) TCP/IP Layer 2. authentication with server password auth CLIENT APPLICATION SERVER APPLICATION user: john pwd: password auth successful

Recommend


More recommend