Application Security
4/21/2017
10:30 AM
Mike Pittenger
Mike Pittenger
Commentary
Connect Directly
LinkedIn
RSS
E-Mail vvv
50%
50%

Best Practices for Securing Open Source Code

Attackers see open source components as an obvious target because there's so much information on how to exploit them. These best practices will help keep you safer.

Recently, a Forrester Research report called attention to open source's preeminence in application development, noting that custom code now often comprises only 10% to 20% of many applications.

Although traditional application security tools — dynamic analysis security testing (DAST) and static analysis security testing (SAST) — are effective in finding bugs in proprietary application code, they aren't effective in identifying vulnerabilities in open source components "in the wild." With SAST, this is true even months or years after the bugs have been publicly disclosed. In fact, most open source vulnerabilities are reported by security researchers and not found by DAST and SAST tools. Since 2004, more than 74,000 vulnerabilities have been disclosed by the National Vulnerability Database (NVD), but only a handful of those disclosures reference commercial security tools such as DAST, SAST, and fuzzers.

In addition, more than 80% of all cyberattacks target applications. The combination of these facts — applications are the top target of cyberattacks, open source is the foundation of today's application code, and traditional application security tools are ineffective in identifying open source — lead to the conclusion that open source vulnerabilities are one of the biggest risks to application security.

Our research shows that the average commercial application has more than 140 discrete open source components. Add to this that over 3,600 new open source component vulnerabilities were reported in 2016 — almost 10 per day on average and a 10% increase from 2015 — and the need for effective open source security and management is clear. However, our audits of client code consistently reveal that many organizations are blind to the security and license compliance risk that their use of open source may expose them to.

Why Do Our Adversaries Like Open Source Vulnerabilities?
I see no proof that open source is either more or less secure than proprietary, custom software. It's software, and will have bugs. However, because of the ubiquity of popular open source components, attackers see them as a target-rich environment with publicly available information on known vulnerabilities as well as detailed information and examples on how to exploit them.

[Check out the two-day Dark Reading Cybersecurity Crash Course at Interop ITX, May 15 & 16, where Dark Reading editors and some of the industry's top cybersecurity experts will share the latest data security trends and best practices.]

More importantly, open source is difficult to track manually, so organizations often don't have visibility to all of the open source components they use. Unlike commercial software, where updates and bug fixes are pushed to customer, open source has a "pull" support model. Users are responsible for keeping track of vulnerabilities as well as fixes and updates for the open source they use. Unless an organization is aware that a vulnerable open source component is included in its application, it's highly probable that that component will remain unpatched.

Best Practices to Manage Open Source Risks

Create and enforce open source use policies: Many organizations lack even basic documentation of open source policies. You should have a single responsible entity — either person or committee — overseeing open source usage, documented policies, and developer trained in their responsibilities when it comes to open source use.

Create and maintain a comprehensive inventory of open source in use: Inventory all open source components your teams use to develop software. A complete open source inventory must include all open source components, the version(s) in use, and download locations for each project in use or in development. You'll also need to include all dependencies — the libraries your code is calling to and/or the libraries that your dependencies are linked to — in your inventory.

If you're using third-party developers, you'll need to be confident that they will be as diligent about code inventory as an internal team. The larger the team and the more teams you have can quickly make the inventory process unwieldy and more prone to errors and omissions.

Map open source to known security vulnerabilities: Sources such as the NVD can provide information on publicly disclosed vulnerabilities in open source software. But be aware that not all vulnerabilities are reported to the NVD in a timely fashion, and that the format of NVD records often makes it difficult to determine which versions of a given open source component are affected by a vulnerability. You shouldn't rely on the NVD as your sole source of vulnerability information.

Other useful sources of information include project distribution sites such as those maintained by the Debian and Python projects. Security blogs and message boards such as the US-CERT alerts page and Google's security blog should also be part of your vulnerability research.

Identify other open source risks: Failure to comply with open source licenses can put organizations at significant risk of litigation and compromise of intellectual property. Similarly, the use of outdated or poor-quality components can compromise the quality of applications that use them.

Continuously monitor for new open source risks:With more than 3,600 new open source vulnerabilities disclosed every year, the job of tracking vulnerabilities doesn't end when applications leave development. Organizations need to continuously monitor for new threats as long as their applications remain in service.

Take the First Step to Open Source Security
Although it may seem easier to just keep doing what you're doing and hope for the best, the most important step you can take is to put some type of open source security management process into place. Application vulnerabilities are the biggest security threat to your organization, and using components with known vulnerabilities is an OWASP Top 10 issue. Without inventorying, managing, and securing the open source components used in those applications, you're providing attackers with an easy target.

Related Content:

Mike Pittenger has 30 years of experience in technology and business, more than 25 years of management experience, and 15 years in security. At Black Duck, he is responsible for strategic leadership of security solutions, including product direction. Pittenger's extensive ... View Full Bio
Comment  | 
Print  | 
More Insights
Comments
Newest First  |  Oldest First  |  Threaded View
Register for Dark Reading Newsletters
White Papers
Video
Cartoon Contest
Write a Caption, Win a Starbucks Card! Click Here
Latest Comment: Janice, I think I've got a message from the code father!
Current Issue
Security Operations and IT Operations: Finding the Path to Collaboration
A wide gulf has emerged between SOC and NOC teams that's keeping both of them from assuring the confidentiality, integrity, and availability of IT systems. Here's how experts think it should be bridged.
Flash Poll
New Best Practices for Secure App Development
New Best Practices for Secure App Development
The transition from DevOps to SecDevOps is combining with the move toward cloud computing to create new challenges - and new opportunities - for the information security team. Download this report, to learn about the new best practices for secure application development.
Slideshows
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2017-0290
Published: 2017-05-09
NScript in mpengine in Microsoft Malware Protection Engine with Engine Version before 1.1.13704.0, as used in Windows Defender and other products, allows remote attackers to execute arbitrary code or cause a denial of service (type confusion and application crash) via crafted JavaScript code within ...

CVE-2016-10369
Published: 2017-05-08
unixsocket.c in lxterminal through 0.3.0 insecurely uses /tmp for a socket file, allowing a local user to cause a denial of service (preventing terminal launch), or possibly have other impact (bypassing terminal access control).

CVE-2016-8202
Published: 2017-05-08
A privilege escalation vulnerability in Brocade Fibre Channel SAN products running Brocade Fabric OS (FOS) releases earlier than v7.4.1d and v8.0.1b could allow an authenticated attacker to elevate the privileges of user accounts accessing the system via command line interface. With affected version...

CVE-2016-8209
Published: 2017-05-08
Improper checks for unusual or exceptional conditions in Brocade NetIron 05.8.00 and later releases up to and including 06.1.00, when the Management Module is continuously scanned on port 22, may allow attackers to cause a denial of service (crash and reload) of the management module.

CVE-2017-0890
Published: 2017-05-08
Nextcloud Server before 11.0.3 is vulnerable to an inadequate escaping leading to a XSS vulnerability in the search module. To be exploitable a user has to write or paste malicious content into the search dialogue.

Dark Reading Radio
Archived Dark Reading Radio
In past years, security researchers have discovered ways to hack cars, medical devices, automated teller machines, and many other targets. Dark Reading Executive Editor Kelly Jackson Higgins hosts researcher Samy Kamkar and Levi Gundert, vice president of threat intelligence at Recorded Future, to discuss some of 2016's most unusual and creative hacks by white hats, and what these new vulnerabilities might mean for the coming year.