Saryu Nayyar, CEO at Gurucul, peeks into Mitre’s list of dangerous software bug types, highlighting that the oldies are still the goodies for attackers.
<div class="c-article__content js-reading-content"> <p>Mitre Corp. recently updated its <a href="https://cwe.mitre.org/top25/archive/2021/2021_cwe_top25.html" target="_blank" rel="noopener">list of the top 25 most dangerous software bugs</a>, and it’s little surprise that a number of them have been on that list for years. The Common Weakness Enumeration (CWE) list represents vulnerabilities that have been widely known for years, yet are still being coded into software and being bypassed by testing. Both developers and testers presumably know better by now, but still keep making the same mistakes in building applications.</p> <p>We’ll review the vulnerabilities that seem to consistently make the top 25 list over the years. But first, how do these mistakes come about? There are a variety of reasons.</p> <p>In many cases, developers simply don’t have security at the tops of their minds as they are coding the application. Their primary goal is to get the business logic right.</p> <p>In cases where a particular algorithm doesn’t seem to be working right, developers have been known to turn off security restrictions until it behaved as expected. Developers lose face when their application has a logic bug, but not when there is a potential security vulnerability, because these are largely hidden until they are exploited.</p> <p><a href="https://threatpost.com/infosec-insider-subscription-page/?utm_source=ART&utm_medium=ART&utm_campaign=InfosecInsiders_Newsletter_Promo/" target="_blank" rel="noopener"><img loading="lazy" class="aligncenter wp-image-168544 size-full" src="https://media.threatpost.com/wp-content/uploads/sites/103/2021/07/10165815/infosec_insiders_in_article_promo.png" alt="Infosec Insiders Newsletter" width="700" height="50"></a></p> <p>Testers have a more direct responsibility for ensuring applications are secure, but usually have limited tools and expertise for doing so. They are almost always testing code in isolation, often with no database, APIs or network. Without a way to look into memory, or create illegal commands, and interpret the results in terms of an attack, they are limited in their ability to identify security vulnerabilities.</p> <p>There is also still the overriding perception within technical groups that security is the responsibility of the IT production group, not necessarily of the developers. After all, IT has significant tooling to define and manage an application and network perimeter, such as firewalls and anti-malware, that is designed to protect the entire infrastructure. The focus on security in production often means that there is less of a focus in development and test.</p> <p>It’s all part of a culture where security vulnerabilities are largely hidden from view because they typically don’t affect the function of the application, until an attack succeeds and systems or data are lost. While it would be most effective to focus attention on security during the entire application lifecycle, it is still critical to be vigilant in production.</p> <h2>Common Vulnerabilities Are Still On the List</h2> <p>What follows have been common security holes for decades, and it looks like they are not leaving the Mitre list anytime soon. They allow old but reliable attacks for a broad range of attackers worldwide, who frequently succeed in breaking into systems and organizations using them.</p> <h3><strong>Buffer/Memory Overruns</strong></h3> <p>Manipulating memory remains one of the most popular ways of attacking a system. If an attacker is in possession of a specific memory address within an executable application, he can use it to enter values or commands that exceed the size of that memory space. Once outside of the memory space, attackers can insert executable software, making it possible to take over a computer or raise permission levels.</p> <p>There are many ways of taking advantage of buffer and memory overruns for attacks. If developers haven’t limited variable lengths, an overrun can allow an attacker to write malicious code directly into application memory. At the very least, it’s possible to use this technique to interfere with application execution, causing it to crash or return incorrect results.</p> <h3><strong>Cross-Site Scripting (XSS) </strong></h3> <p>Attackers can use web features in order to plant malicious scripts. In this case, attackers can upload scripts into unprotected client-side web pages, to be executed when others open that page. Protecting against this involves prohibiting web applications from downloading files, and many developers neglect to add this restriction.</p> <p>Many development teams continue to let attackers download scripts onto third-party web sites, and testers have a difficult time identifying this type of attack, because it’s not clear where the malicious scripts are coming from. The result is that those users innocently visiting those web pages may inadvertently and unknowingly download malware onto their systems.</p> <h3><strong>SQL/Command Injection</strong></h3> <p>Many developers focus on making sure an application returns the desired result above all else. In some applications, one common way of doing this is to give all user queries administrative access to the database. While that often works, it has consequences.</p> <p>First, it opens up database administrative access to any application user. That means anyone who uses the application can use SQL commands to modify the database. Using SQL escape characters, attackers can enter SQL commands into the web interface and have them executed by the database.</p> <p>Second, it keeps the database connection open for all. It’s never logged out after each individual use. That means that you don’t have to be an authorized user to find an open database. That makes the integrity of your data questionable on an ongoing basis.</p> <h3><strong>Use After Free</strong></h3> <p>This is another memory manipulation trick. When an application needs memory for a variable, it either programmatically allocates that memory, or the underlying platform (JVM or .NET Runtime). When the application is done with that memory, either it or the platform returns it to the free memory list.</p> <p>If an attacker has managed to get the memory address, he can gain access to the free memory list, and insert malicious software into free memory. The next time that memory is allocated, it is allocated with a payload that can cause harm. Further, the memory isn’t wiped clean when it is returned to the free memory list, enabling attackers to read the contents of that memory.</p> <p>There are some commercial debuggers that are able to look into a running process and let programmers or attackers obtain information using memory locations. While these types of debuggers are needed, any tool that lets attackers look into specific memory addresses to determine their contents has the potential to be used as a hacking tool.</p> <h2>Other Cyberattacks Fill the Plate</h2> <p>The Mitre list contains other common attacks, including missing or improper authentication, incorrect permissions and unprotected credentials.</p> <p>However, the most popular attacks still remain those that have been around almost since the dawn of the public internet. Until dev and test teams are able to internalize some of the most significant vulnerabilities over the last two decades and develop strategies to reliably counter them, count on both firewalls and security analytics approaches to be the most effective approach to protecting against software vulnerabilities.</p> <p><em><strong>Saryu Nayyar is CEO at Gurucul.</strong></em></p> <p><em><strong>Enjoy additional insights from Threatpost’s Infosec Insiders community by </strong></em><a href="https://threatpost.com/microsite/infosec-insiders-community/" target="_blank" rel="noopener"><strong><em>visiting our microsite</em></strong></a><em><strong>.</strong></em></p> <footer class="c-article__footer"> <div class="c-article__footer__container"> <div class="c-article__footer__col"> <a href="#discussion" class="c-button c-button--secondary">Write a comment</a> </div> <div class="c-article__footer__col"> <div class="c-article__sharing"> <p><strong>Share this article:</strong></p> <nav class="c-nav-sharing"> <div class="social-likes social-likes_notext" data-title="2021’s Most Dangerous Software Weaknesses" data-url="https://threatpost.com/2021-angerous-software-weaknesses/169458/" data-counters="no" data-zeroes="yes"><div class="facebook" title="Share via Facebook"></div> <div class="twitter" title="Share via Twitter"></div><div class="linkedin" title="Share via LinkedIn"></div> <div class="reddit" title="Share via Reddit"></div> <div class="flipboard" title="Share via Flipboard"></div> </div> </nav> </div> </div> </div> <div class="c-article__footer__container"> <div class="c-article__footer__col"></div> <div class="c-article__footer__col"> <ul class="c-list-categories"> <li><a class="c-label c-label--secondary-transparent" href="https://threatpost.com/category/infosec-insider/">InfoSec Insider</a></li> <li><a class="c-label c-label--secondary-transparent" href="https://threatpost.com/category/vulnerabilities/">Vulnerabilities</a></li> <li><a class="c-label c-label--secondary-transparent" href="https://threatpost.com/category/web-security/">Web Security</a></li> </ul> </div> </div> </footer> </div>