Using Formal Methods to Enable More Secure Vehicles: DARPA's HACMS Program
Total Page:16
File Type:pdf, Size:1020Kb
Using Formal Methods to Enable More Secure Vehicles: DARPA's HACMS Program Kathleen Fisher Tufts University 16 April 2015 (Slides based on original DARPA HACMS slides) Pervasive Vulnerability to Cyber Attack SCADA Systems Medical Devices Vehicles Computer Peripherals Appliances Communication Devices 2 Modern Automobile: Many Remote Attack Vectors Mechanic Short-range wireless Long-range wireless © WiFi Alliance Source: Source: www.diytrade.com Source: CanOBD2 www.theunlockr.com © Bluetooth SIG, Inc. Source: www.custom-build- computers.com Source: American Car Company Source: christinayy.blogspot.com Source: www.wikipedia.org Source: www.zedomax.com Source: Koscher, K., et al. Entertainment “Experimental Security Analysis of a Modern Automobile” 3 Securing Cyber-Physical Systems: State of the Art Control Systems Cyber Systems • Air gaps & obscurity • Anti-virus scanning, intrusion detection systems, patching infrastructure Forget the myth of the air gap – the control system that is completely isolated is history. • This approach cannot solve the problem. -- Stefan Woronka, 2011 Siemens Director of Industrial Security Services • Not convergent with the threat • Focused on known vulnerabilities; can miss • Trying to adopt cyber approaches, but zero-day exploits technology is not a good fit: • Can introduce newUNCLASSIFIED vulnerabilities and • Resource constraints, real-time deadlines Additional security layers often create vulnerabilities… privilege escalation opportunities • Extreme cost pressures October 2010 Vulnerability Watchlist Vulnerability Title Fix Avail? Date Added • Patches may have to go through lengthy !"#$%&'()#(*&+,#-),**()&.)(/&0(-1,)2&3),-,4,*&!,4/*&3)"5"*(6(&784/*/9,#&:$*#()/;"*"-<& 0,& =>?@>?ABA& C(D&E/-&:FGH&H,D$*(&GG!&+,##(49,#&F(#"/*&,I&G()5"4(&:$*#()/;"*"-<& J(8& =>?K>?ABA& verification & validation processes 3E3&L";/8(M6(#M"DNOL&P$#49,#&,QR;<R,#(&S$Q()&T5()U,1&:$*#()/;"*"-<& 0,& =>?A>?ABA& V#-()#(-&7%W*,)()&=&L-,G-/94EXH!NOL&EXH!&G/#"9Y/9,#&S<W/88&Z(/2#(88& 0,& =>B=>?ABA& • Patches could require recalls H"4),8,[&Z"#D,18&'();(),8&L3/88&X\(&X"42(-L&C(W*/<&G(4$)"-<&S<W/88&:$*#()/;"*"-<&& 0,& =>B]>?ABA& +"84,&^#"_(D&Z")(*(88&0(-1,)2&N^Z0O&H$*9W*(&G(4$)"-<&:$*#()/;"*"9(8& J(8& =>B`>?ABA& +,aW$-()&.88,4"/-(8&T#(5"(1&H,#"-,)&LD,G/5(bc8WL&C(a,-(&+,D(&7%(4$9,#&:$*#()/;"*"-<& 0,& =>B`>?ABA& TW(#GG!&L88*dM6(-M2(<M(%4\/#6(NOL&^8(R.[()RP)((&H(a,)<&+,))$W9,#&:$*#()/;"*"-<& 0,& =>B?>?ABA& .D,;(&.4),;/-&/#D&C(/D()&P,#-&3/)8"#6&C(a,-(&+,D(&7%(4$9,#&:$*#()/;"*"-<& 0,& =>BA>?ABA& TW(#Te4(&VaW)(88&P"*(&H$*9W*(&S$Q()&T5()U,1&:$*#()/;"*"9(8& 0,& =>BA>?ABA& !"#$%&'()#(*&3.RCVG+&L*(Db4L&G-/42&S$Q()&T5()U,1&:$*#()/;"*"-<& 1/3 ofJ(8& the vulnerabilities=>Af>?ABA& :%Z,)28&F(;$66"#6&G()5"4(&G(4$)"-<RS<W/88&:$*#()/;"*"-<& are in0,& security=>A`>?ABA& software! :%Z,)28&H$*9W*(&G(4$)"-<&:$*#()/;"*"9(8& 0,& =>A@>?ABA& We need a fundamentally H"4),8,[&V#-()#(-&7%W*,)()&P)/a(&S,)D()&3),W()-<&S$Q()&T5()U,1&:$*#()/;"*"-<& 0,& ]>?f>?ABA& G<a/#-(4&.#95")$8&+,)W,)/-(&7Db&.*()-&H/#/6(a(#-&G()5"4(&C(a,-(&3)"5"*(6(&784/*/9,#&:$*#()/;"*"-<& 0,& ]>?=>?ABA& different approach H"4),8,[&T$-*,,2&Z(;&.44(88&I,)&7%4\/#6(&G()5()&?AAd&+),88&G"-(&C(g$(8-&&P,)6()<&:$*#()/;"*"-<& 0,& ]>?`>?ABA& H"4),8,[&F")(4-h&F")(4-3*/<&H$*9W*(&F(#"/*&TI&G()5"4(&:$*#()/;"*"9(8& 0,& ]>??>?ABA& DISTRIBUTION F - Further dissemination only as directed by DARPA Public Release Center or higher DoD authority 6 UNCLASSIFIED 4 SAT Solvers and Infrastructure Development: Critical Enablers for High Assurance Systems Results of the SAT competition/race winners on the SAT 2009 application benchmarks, 20mn timeout 1200 Interactive Theorem Provers Limmat 02 Zchaff 02 • seL4 microkernel Berkmin 561 02 Forklift 03 Siege 03 [9000 LoC:C, SOSP 09] 1000 Zchaff 04 SatELite 05 • compCert verifying C compiler Minisat 2.0 06 Picosat 07 Rsat 07 [6K LoC:ML, POPL 06] Minisat 2.1 08 800 Precosat 09 Glucose 09 Automatic Theorem Provers Clasp 09 Cryptominisat 10 Lingeling 10 • Verve OS Nucleus Minisat 2.2 10 [1.5K LoC:x86, PLDI 10] 600 • Baby Hypervisor CPU Time (in seconds) [1K LoC:C, VSTTE 10] 400 Model Checkers Picking 80 problem point, best time has dropped • Microsoft device drivers 200 from 1000 (2002) to 40 [30K LoC:C, PLDI 01, CACM 11] seconds (2010). 0 • ADGS-2100 Window Manager 0 20 40 60 80 100 120 140 160 180 Courtesy: Daniel Le Berre Number of problems solved [16K Simulink blocks, CACM 10] [A] significant part of the effort in existing projects was spent on the further development of verification tools, on formal models for low-level programming languages and paradigms, and on general proof libraries. The sharing of substantial parts of the verification tools between Verisoft and L4.verified demonstrates that there is a significant degree of re-usability... Future efforts will be able to build on these tools and reach far-ranging verification goals faster, better, and cheaper. Gerwin Klein, Formal OS Verification—An Overview. 5 HACMS: Clean-Slate Methods for High-Assurance Software Domain Specific Interactive Theorem Code Synthesis Languages (DSLs) Prover as PL High Assurance: Ensuring Correctness, Safety, Security 6 HACMS Program Structure 1. Vehicle Experts 2. Operating Systems 3. Control Systems 4. Research Integration 5. Red Team Boeing NICTA Galois RC*/U. Minn DRAPER*/AIS/ Pilot-able Unmanned Synthesize file systems, Embedded DSLs; Compositional U. Oxford Little Bird Helicopter device drivers, glue code; Synthesize and verify verification; Traditional Verified sel4 kernel; control system code Integrated workbench penetration Verified RTOS testing; novel formal methods SRI*/UIUC SRI* SRI* HRL*/GM approach American-Built EF-SMT solvers; Synthetic sensors; Lazy Composition; Automobile Synthesize monitors Synthesis for Evidential Tool Bus & and wrappers controllers of hybrid Kernel of Truth; systems Vehicle Integration Princeton*/Yale/ CMU*/Drexel/ MIT SpiralGen/UIUC Program Timeline: Build & verify in Coq Map high-level OS for vehicle control; spec into low-level • BAA Release: Feb 23, 2012 Verifying compiler for C code; Extend • Kick-Off: Aug 8-10, 2012 concurrent code; Spiral for hybrid • End of Phase 1: Jan 2014 Program logics systems • End of Phase 2: July 2015 © Boeing • End of Phase 3: Jan 2017 Kestrel* UPenn*/UCLA Synthesize protocols: Synthesize attack- refinement of high- resilient control Performers: • 8 Primes (*) level spec to low-level systems implementations • 22 Organizations Total Source: American Car Company Quadcopter: Initial Security Assessment Attacker could crash legitimate ground control station & hijack quadcopter in flight. Source: DIY Drones (Systems were designed to ensure connectivity, not security) The Evolving SMACCMCopter Architecture Phase 1 0 6 12 16 mo. FM Workbench System requirements AADL model of Verification of system requirements Rockwell HW & SW Collins / UMN AADL translation, generate glue code Generate executable NICTA NICTA RTOS Response to DoS Galois Embedded DSL (Ivory) Factored autopilot tasks Research Monolithic Ardupilot Software Stability Other Stability Other Monitor Vehicle Legacy Ardupilot Ardupilot HW Abstraction Layer Glue code HAL Glue code HAL Monolithic SW FreeRTOS FreeRTOS / eChronos NICTA eChronos No RTOS No security PX4: ARM Cortex M4 PX4: ARM Cortex M4 PX4: ARM Cortex M4 The SMACCMCopter: 18-Month Assessment • The SMACCMCopter flies: • Stability control, altitude hold, directional hold, and DOS detection and response. • GPS waypoint navigation 80% implemented. • Red Team: Found no security flaws in six weeks with full access to source code. • Air Team proved system-wide security properties: • The system is memory safe. • The system ignores malformed messages. • The system ignores non-authenticated messages. • All “good” messages received by SMACCMCopter radio will reach the motor controller. • Penetration Testing Expert: The SMACCMCopter is probably “the most secure UAV on the planet.” Open source: autopilot and tools available from http://smaccmpilot.org Source: DIY Drones Rockwell Collins (UMinn) – Technical Area 4 • Task Summary • Develop formal architecture model for SMACCMCopter and Boeing’s Unmanned Little Bird (ULB) • Develop compositional verification tool (AGREE) and architecture-based assurance case tool (Resolute) • Develop code synthesis tools to generate build code • Performance Summary • Generated software for Research Vehicle (~75KLOC), 60% high assurance. • Created AADL models of HW & SW architecture for SMACCMCopter (~3.6K LOC) and ULB • Extended AGREE tool for compositional reasoning and proved 10 properties about vehicle safety • Developed Resolute tool for capturing & evaluating assurance case arguments linked to AADL model • Developed assurance cases for 6 security requirements for information flow and memory safety • Developed synthesis tool to generate configuration data & glue code for OS/platform HW References • Your What is My How, IEEE Software (March 2013) • Resolute: An Assurance Case Language for Architecture Models, HILT (October 2014). 11 Galois – Technical Area 3 • Task Summary • Synthesize flight-control code, models, and properties from one specification • Generate safe low level-code in a scalable way by creating embedded domain-specific languages (Ivory and Tower) and using the host language (Haskell) as an expressive macro language. • Performance Summary • Created Ivory, an open-source EDSL for synthesizing safe low-level code. • No buffer overflows, no null pointer dereference, no memory leaks, safe system calls. • Created Tower, an open-source EDSL for describing tasks and the connections