Formal methods as a path toward better cybersecurity – Brookings Institution
Five years ago, cybersecurity researchers accomplished a rare feat. A team at the Pentagons far-out research arm, the Defense Advanced Research Projects Agency (DARPA), loaded special software into a helicopters flight control computer. Then they invited expert hackers to break into the software. After repeated attempts, the flight control system stood strong against all attempts to gain unauthorized control.
This outcome was unusual. Experienced hackers who are given direct, privileged access to software almost always find a way in. The reason is simple. Decades after the birth of computer programming, modern software products are riddled with flaws, many of which create security vulnerabilities that attackers can easily exploit to slip through digital defenses. This is why reducing the error rate in software code is essential to turn the tide against relentless computer criminals and foreign adversaries that steal wealth and menace critical infrastructure with relative impunity.
How was DARPAs custom flight control software able to shrug off its assailants? The researchers turned to formal methods, a frequently overlooked group of technologies that programmers can use to create ultra-secure, ultra-reliable software. DARPAs experiment is one of several examples that underscore the potential for formal methods to remake software security. They herald a not-too-distant future when radically safer, more secure software can allow us to embrace other emerging technologies without catastrophic consequences.
Before it is ready for primetime, any piece of software should be able to satisfy at least two criteria:
Because most customers use software as it is intended, software programmers devote most of their attention to satisfying the first criteria: ensuring the software works properly under normal conditions. This is relatively easy to evaluate through user feedback, as customers tend to be vocal when a piece of software obviously misbehaves or omits an advertised feature.
The second dimension is much trickierand the bane of the cybersecurity community. Virtually all software code contains defects that can cause the software to fail in some way. Humans write software, and our species is naturally prone to mistakes. Larger and more complex software applications multiply opportunities for committing and overlooking errors by orders of magnitude. Human minds excel at creating highly capable software (the first criteria), but they are ill-equipped to identify and eliminate software defects.One defect might be harmless, while another might crash the entire program. Others can lead to security failures. These happen when human attackers purposefully exploit defects to cause a specific kind of software failure that achieves their own objectives, such as leaking private data or giving control to them, the attacker.
The software industry has coalesced around two methods for reducing the error rate in software code. The first is simply education and knowledge exchange. Experts collaborate on a global scale to share information about software vulnerabilities and how to fix them. Yet as computing has matured, this body of knowledge has become overwhelming. It is extremely challenging to know when to apply lessons learned and how to verify implementation. Another common method to improve software quality is intensive testing. Yet this can consume massive resources, and most testing only indicates the presence of defectsit cannot prove the absence of them. Given the context of cybersecurity, where attackers actively hunt for any possible flaw that designers overlooked, these two methods have proved insufficient in solving software security.
Formal methods encompass a group of technologies that aim to manage these problems much more effectively by supplementing human resources with computational resources. In the 1970s, when it became clear that computers would become the foundation of military power, the defense community realized it needed greater assurance that its software was of the highest quality and free of security issues. Early programmers knew they could not rely on human judgment alone to ferret out all possible security vulnerabilities. They needed ways to prove that critical pieces of software would not crash by accident or contain unknown security flaws that attackers could exploit. They wanted to maximize confidence that a specific software application would do only what its authorized users intended, and nothing else.
What is the best way to prove an objective truth? Math and logic. The pioneers of formal methods adapted mathematical logic to construct abstract representations of software (I want this program to do X) and then use advanced mathematical theorems to prove that the software code they wrote would only accomplish X.
The term formal methods evolved over time, and today it represents a spectrum of sophistication, from relatively simple instructions for planning a software project to automated programs that function like a super spell-check for code. The method of analysis varies between different formal methods, but it is largely automated and ideally carried out with mathematical precision. Lightweight formal methods are already in widespread use today. Static type theory, for example, has become a standard feature in several programming languages. These methods require no specialized knowledge to use and provide low-cost protection against common software faults.
More sophisticated formal methods can prevent more complex problems. Formal verification is one such example and it enables programmers to prove that their software does not contain certain errors and behaves exactly according to specification. These more advanced methods tend to require specialized knowledge to apply, but with recent advances this bar has been coming down. (For a more detailed description of different types of formal methods, curious readers should read pages 6-9 of this report by the National Institute of Standards and Technology.)
Problems with formal methods and recent innovation
Like the neural networks that revolutionized artificial intelligence, formal methods are a technology undergoing a renaissance after spending decades in the shadows. As software became more complicated, applying the more advanced tools for proving codethe ones that could provide the highest assurance that security vulnerabilities were absentbecame exponentially more difficult. As the National Institute of Standards and Technology explains, formal methods developed a reputation as taking far too long, in machine time, person years and project time, and requiring a PhD in computer science and mathematics to use them. For a long time, formal methods were relegated to mission-critical use cases, such as nuclear weaponry or automotive systems, where designers were willing to devote immense time and resources to creating error free software. But research into formal methods continued, led by a dedicated corps of experts in academia, federal research institutions, and a handful of specialized companies.
More recent developments, including DARPAs helicopter project, suggest formal methods are poised to remake how we design software and transform cybersecurity. In November 2016, the National Institute for Standards and Technology delivered a comprehensive report to the White House recommending alternative ways to achieve a dramatic reduction in software vulnerabilities. Devoting six pages to formal methods, the report noted that formal methods have become mainstream in many behind-the-scenes applications and show significant promise for both building better software and for supporting better testing.
Leading technology companies have quietly rolled out formal methods in their core businesses. Amazon Web Services (AWS), arguably one of the most important infrastructure providers on the planet, has an entire team that uses formal methods to create provable security for its customers. Facebook has shown how formal verification techniques can be integrated into a move fast and break things approach with its INFER system, which continuously verifies the code in every update for its mobile applications. Microsoft has also stood up its own dedicated team on formal verification. As one team member explained last year, Proving theorems about programs has been a dream of computer science for the last 60 years or more, and were finally able to do this at the scale required for an important, widely deployed security-critical piece of software. And it is not just Big Tech. Specialty companies like Galois, Synopsys, and MathWorks are creating a more competitive market for sophisticated formal methods solutions that companies of various sizes can put to work.
Looking forward, the National Science Foundations ongoing DeepSpec Expedition in Computing has demonstrated the applicability of these methods to increasingly complex engineering tasks, including the development of entire operating systems (which tend to be much larger than single applications), database engines, memory managers, and other essential computing and software components. These successes represent a significant step forward for the field, which has long sought to find reliable, low-cost/low-time methods for engineering such components.
These clear signs of progress notwithstanding, the most sophisticated types of formal methodssuch as full-blown formal verificationare still a long way from becoming a go-to tool for the average software developer. The organizations listed above are not representative, of course, and challenges still remain to bring formal methods to the rest of the software industry. We need an ecosystem of tools, more training for working engineers, and more consensus on when to deploy which methods. We also need to begin changing the way software standards committees publish their work; instead of prose, they should begin publishing formal models that allow the application of formal methods. Lastly, we need to begin educating technology decisionmakers about these capabilities and their ramifications.
There are at least two reasons why industry and government should seize on ongoing innovations in the field and accelerate adoption.
First, unlike many cybersecurity measures, proper application of formal methods does not only drive costs up. Since formal methods reduce overall defect count in software, systems built with formal methods can require less maintenance and thus be cheaper to operate than todays ad-hoc alternatives. Additionally, further improvements in automation are expected to provide these benefits without adding significant cost to the initial engineering efforts. Whereas as most security measures drive costs and hurt profit margins, proper use of formal methods can help defeat attackers while improving the bottom line. Even where software is too complicated to use formal verificationthe most robust weapon in the formal methods arsenalmuch more basic formal methods can still lower software lifecycle costs simply by enforcing more rigorous development practices that some software developers know, but dont use.
Second, the steady drumbeat for software liability may soon change the cost calculus for software developers who have traditionally not born all the costs of unreliable, flawed software. The final report issued by Congress Cyberspace Solarium Commission recommended that Congress should pass a law establishing liability for final goods assemblers of software that contains known and unpatched vulnerabilities. Some types of formal methods offer clear opportunities to establish more objective standards of care for determining such liability.
Just one bug in one line of code
Today, we have a global software industry that frequently creates software in an ad-hoc manner, churning out products without truly knowing what is in them, how they might fail, and what will happen if they do. The situation was tolerable when software did not run the world but computing now either controls or informs nearly every aspect of the economy, politics, and social life. And because the individual components that make up a larger software program are interdependent, even a single error in any phase of the manual development processdesign, implementation, testing, evaluation, operation, maintenancecan be catastrophic. One bug in one line of code can create a security vulnerability that spans millions of computer systems, enabling data theft and digital disruption on a massive scale.
Formal methods are not the ultimate answer to cybersecurity. Even their most sophisticated manifestation, formal verification, cannot guarantee perfect security. Neither can the worlds best engineers guarantee that a skyscraper will not collapse. But through rigorous standards, objective testing, and the scientific method, they have achieved an outstanding record. By injecting similar rigor into the software industry, formal methods can, at the very least, give us much higher assurance that digital technology will behave.
Tim Carstens is an adviser at the Cyber Independent Testing Lab.David Forscey is the managing director of the Aspen Cybersecurity Group. He previously worked in the Center for Best Practices at the National Governors Association and Third Way.
Read more here:
Formal methods as a path toward better cybersecurity - Brookings Institution
- News: Free QNX Everywhere software resources now available - A3 Association for Advancing Automation - March 1st, 2025 [March 1st, 2025]
- How do I file my taxes for free? Federal and Ohio state services to know about this year - The Columbus Dispatch - March 1st, 2025 [March 1st, 2025]
- How to file your taxes for free in 2025 - CNBC - March 1st, 2025 [March 1st, 2025]
- Microsoft quietly tests free, ad-supported version of Office apps for Windows with limited functionality - Windows Central - March 1st, 2025 [March 1st, 2025]
- Empty Out Your Gmail Inbox and Get Back 15GB of Storage - CNET - March 1st, 2025 [March 1st, 2025]
- Google releases free version of AI platform that speeds coding - Business in Vancouver - March 1st, 2025 [March 1st, 2025]
- H&R Block vs. TurboTax vs. Jackson Hewitt: Whats the Difference? - Investopedia - February 25th, 2025 [February 25th, 2025]
- All the Ways You Can File for Free This Year, From TurboTax to FreeTaxUSA - CNET - February 18th, 2025 [February 18th, 2025]
- Best free video editing software of 2025: Top picks for every project and skill-level - TechRadar - February 14th, 2025 [February 14th, 2025]
- 500,000 U.S. Lawyers Now Have Free Access to Trust Software through Bar Partnerships with Smokeball - LawSites - February 14th, 2025 [February 14th, 2025]
- Best Tax Software 2025: TurboTax Leads the Pack, but These Options May Work Better for You - CNET - February 14th, 2025 [February 14th, 2025]
- Photopea Is a Free Photoshop Alternative That Runs in the Browser - WIRED - February 14th, 2025 [February 14th, 2025]
- Freedom Reimagined: Meet the Free Software Foundations 40th Anniversary Logo - It's FOSS News - January 24th, 2025 [January 24th, 2025]
- Free Software Foundation Marking 40 Years Old With A New Logo - Phoronix - January 24th, 2025 [January 24th, 2025]
- Coros smartwatches just got a big free software update here are the best new features - MSN - January 24th, 2025 [January 24th, 2025]
- Best personal finance software of 2025 - TechRadar - January 24th, 2025 [January 24th, 2025]
- Free Mac Email Apps That Stand Out in 2025: A Comprehensive Guide - PUNE.NEWS - January 24th, 2025 [January 24th, 2025]
- Free-software warriors celebrate landmark case that enforced GNU LGPL - The Register - January 13th, 2025 [January 13th, 2025]
- This free software is topping the Steam charts, but its not a game - Notebookcheck.net - January 13th, 2025 [January 13th, 2025]
- IRS offering free tax filing services to millions starting this week - KSWO - January 13th, 2025 [January 13th, 2025]
- The best Android antivirus apps in 2025 - Tom's Guide - January 13th, 2025 [January 13th, 2025]
- GIMP vs Krita: which free software is best for you? - Creative Bloq - January 6th, 2025 [January 6th, 2025]
- Mensla MS-3, free waveshaper Synthesizer plugin for macOS and Windows - Synth Anatomy - January 6th, 2025 [January 6th, 2025]
- Tesla fixes TPMS issue on nearly 700,000 vehicles with free software update - Drive Tesla Canada - December 25th, 2024 [December 25th, 2024]
- STRACKALINE TO OFFER EXCLUSIVE FREE SOFTWARE ACCESS AT THE 2025 PGA SHOW (BOOTH 2808) - The Golf Wire - December 18th, 2024 [December 18th, 2024]
- The Pixel 6 just got a free software upgrade that makes it my favorite budget Android phone - ZDNet - December 12th, 2024 [December 12th, 2024]
- Google just gave older Pixel phones a free software upgrade that you once could only wish for - ZDNet - December 8th, 2024 [December 8th, 2024]
- Free AI-Powered Software for Radiology Impressions Available from Scriptor Software - Imaging Technology News - December 8th, 2024 [December 8th, 2024]
- Maryland State Bar Members Now Get Free Trust Accounting Software in Deal with Smokeball - LawSites - December 5th, 2024 [December 5th, 2024]
- 7 free and open-source tools that rival the best creative software - XDA Developers - December 5th, 2024 [December 5th, 2024]
- Google Drive Full? Gift Yourself More Digital Storage This Holiday Season - CNET - November 30th, 2024 [November 30th, 2024]
- Tired of controller lock-in? Mixxx is a free DJ alternative; 2.4.2 out now - Create Digital Music - November 28th, 2024 [November 28th, 2024]
- 5 of the best free software for data recovery on Windows - XDA Developers - November 23rd, 2024 [November 23rd, 2024]
- AAVAA Hands-Free Accessibility Devices Now Compatible with Apple Software - The Hearing Review - November 17th, 2024 [November 17th, 2024]
- The best graphic design software - Creative Bloq - November 16th, 2024 [November 16th, 2024]
- VMware makes Workstation and Fusion free for everyone - BleepingComputer - November 16th, 2024 [November 16th, 2024]
- Trimble Expands Access to Advanced Construction Project Management Capabilities with Free Version of ProjectSight Software - StreetInsider.com - November 16th, 2024 [November 16th, 2024]
- The best free video editing software: how to cut clips without the cost - Creative Bloq - November 8th, 2024 [November 8th, 2024]
- Best Free Invoice And Billing Software Of 2024 - Forbes - November 8th, 2024 [November 8th, 2024]
- Amazfit just dropped a massive free software update and these new features are coming to your smartwatch - Tom's Guide - November 5th, 2024 [November 5th, 2024]
- The Free Software Foundation Finally Has AI / Machine Learning Apps On Their Radar - Phoronix - October 24th, 2024 [October 24th, 2024]
- Intuit asked us to delete part of this Decoder episode - The Verge - October 24th, 2024 [October 24th, 2024]
- "100% Free" GNU Boot Discovers Again They Have Been Shipping Non-Free Code - Phoronix - October 24th, 2024 [October 24th, 2024]
- The best antivirus software in 2024 for PC - TechRadar - October 24th, 2024 [October 24th, 2024]
- Stunning software giveaway: Save over $500 on tools for video editing, password recovery, and more its all free! - BetaNews - October 18th, 2024 [October 18th, 2024]
- PSA: Windows 10 has entered its final year of free support here's what you need to know - Windows Central - October 18th, 2024 [October 18th, 2024]
- Best video editing software in 2024: free and paid-for tools - Amateur Photographer - October 18th, 2024 [October 18th, 2024]
- Samsung TVs free update to One UI is already happening here are the changes coming to TVs - TechRadar - October 18th, 2024 [October 18th, 2024]
- The best open-source productivity software: Free tools to boost your workflow - XDA Developers - October 9th, 2024 [October 9th, 2024]
- Best tax software of 2024: File fast and accurately, plus get your maximum refund - CNBC - October 7th, 2024 [October 7th, 2024]
- The IRS is expanding its free tax filing service. Do you qualify? - The Washington Post - October 4th, 2024 [October 4th, 2024]
- Explore Top Free Software Alternatives to Popular Paid Programs for Budget-Friendly Solutions - Gizbot - October 4th, 2024 [October 4th, 2024]
- The best free video players in 2024: watch videos in any format - TechRadar - October 4th, 2024 [October 4th, 2024]
- Ford unveils BlueCruise 1.4: hands-free driving time doubled with new software update - CBT Automotive News - October 3rd, 2024 [October 3rd, 2024]
- Free Photo Viewer for Windows - Free download and software reviews - Download.com - October 3rd, 2024 [October 3rd, 2024]
- Top 10 Cool Free Windows Software (You'll Really Want) - MSN - October 3rd, 2024 [October 3rd, 2024]
- Best free YouTube to MP3 converter of 2024 - TechRadar - October 3rd, 2024 [October 3rd, 2024]
- The best free alternatives for pricey software: Adios, Office and Adobe - PCWorld - September 28th, 2024 [September 28th, 2024]
- Best Free Accounting Software for Small Businesses (Sponsored content from Jerry) - Varsity Online - September 21st, 2024 [September 21st, 2024]
- WhatsApp for Windows - Free download and software reviews - Download.com - September 21st, 2024 [September 21st, 2024]
- FDA approves some Apple AirPods to be used as hearing aids - NPR - September 16th, 2024 [September 16th, 2024]
- Q-Free releases new flexible, modular, and scalable tolling software solution - Highways News - September 16th, 2024 [September 16th, 2024]
- Clark Center for Geospatial Analytics to offer free version of TerrSet/IDRISI software starting Dec. 2 - Geo Week News - September 3rd, 2024 [September 3rd, 2024]
- Best video editing apps of 2024: Top tools for Android, iPhone, and iPad - TechRadar - September 3rd, 2024 [September 3rd, 2024]
- Samsung extends free software upgrades to millions of Smart TV owners are YOU one of them? - GB News - September 3rd, 2024 [September 3rd, 2024]
- This open-source software can double the volume of Windows laptops. For free - The Indian Express - August 22nd, 2024 [August 22nd, 2024]
- European Commission cuts funding support for Free Software projects - European Digital Rights (EDRi) - August 22nd, 2024 [August 22nd, 2024]
- Hyundai partners with TCSO to combat car thefts with free software patch - KEYE TV CBS Austin - August 22nd, 2024 [August 22nd, 2024]
- Free and Discounted Software for University of Oklahoma Students - The University of Oklahoma - August 16th, 2024 [August 16th, 2024]
- GitHub is the Best Place for Free and Open Source Software - How-To Geek - August 16th, 2024 [August 16th, 2024]
- The Usual Suspects Xenia, a free Waldorf microwave II/XT emulation using the DSP56300 plugin - Synth Anatomy - August 16th, 2024 [August 16th, 2024]
- Best free Adobe Illustrator alternatives of 2024 - TechRadar - June 24th, 2024 [June 24th, 2024]
- This is how to view the long-established free software 'CrystalDiskInfo' that shows the health status and SMART ... - GIGAZINE - June 24th, 2024 [June 24th, 2024]
- The best antivirus software 2024: Free and paid options - Tom's Guide - June 20th, 2024 [June 20th, 2024]
- Best free text-to-speech software of 2024 - TechRadar - May 20th, 2024 [May 20th, 2024]
- Best free word processor of 2024 - TechRadar - May 20th, 2024 [May 20th, 2024]
- Best free antivirus in 2024 - TechRadar - May 20th, 2024 [May 20th, 2024]
- 'Open-Shell Menu' is an open source software that returns the Windows start menu to its previous appearance for free - GIGAZINE - May 20th, 2024 [May 20th, 2024]
- Avast Free Antivirus: Testing its features and learning about the six layers of protection - TechSpot - May 20th, 2024 [May 20th, 2024]
- The best Android antivirus apps in 2024 - Tom's Guide - May 3rd, 2024 [May 3rd, 2024]