Difference between revisions of "Open Source Security"
m (→Full Title or Meme)
|Line 1:||Line 1:|
==Full Title or Meme==
==Full Title or Meme==
[[Open Source Security]] technically applies to all software where the source code is available. In practice it
[[Open Source Security]] technically applies to all software where the source code is available. In practice it means software that is developed using open source libraries and tools.
Revision as of 15:44, 31 December 2021
Full Title or Meme
Open Source Security technically applies to all software where the source code is available. In practice it typically means software that is developed using open source libraries and tools.
- A common problem with code that was developed in closed, even secretive, environments was often buggy and of unknown quality.
- In fact code like OpenSSL had bugs that persisted for years before they were discovered and patched.
- An effort by the University of Minnesota has shown that a determined long-term effort could subvert the entire Linux security model. 2021-07-18
Security problems can be created at development time and at production time. Both are considered here.
- When the code is open sourced, any attacker can look deeply for bugs that other have not discovered.
- Must of the code that s created in the Open Source community is built with open source tools and libraries that may not have high security ratings.
- Dev tools like gcc or even Powershell installed on production computers can make life easy for attackers. When dev tools are installed they typically come with many support tools that also help attackers.
- Open source User and Risk Analysis Report published annually by Synopsys shows that in 2020 there were 528 open source components per App. And that 84% of OSS codebases carried some vulnerability. The more an industry depended on high-growth and OSS, the more likely they were to having vulnerabilities in their applications.
The Supply Chain must be fully documented so that software builds and audits can both succeed in improving security of the software packing to be delivered to the production machine.
- Make itself is fine. make is merely a dependency tracking and automation framework. It is typically used in conjunction with compilers, though, and those preferrably should not be available on a production system, as they're completely un-necessary. The same holds true for all un-needed packages, whether those be shared libraries, interpreters, etc.
Configuration of Solution
- Software installed on production systems should be strictly controlled, and only those packages that are required by the application should be present.
- Microsoft Azure Blob leak a lesson to CISOs about cloud security responsibility Microsoft's apparent misconfiguration of its own cloud bucket exposed third-party intellectual property. Here are the takeaways for CISOs.
Configuration of Server
- The following points are based on those posted on https://serverfault.com/questions/595366/is-it-safe-for-a-production-server-to-have-make-installed by kasperd.
Some people will argue that the presence of development tools on a production machine will make life easier for an attacker. This however is such a tiny roadbump to an attacker, that any other argument you can find for or against installing the development tools will weigh more.
If an attacker was able to penetrate the system so far, that they could invoke whatever tools are present on the server, then you already have a serious security breach. Without development tools there are many other ways to write binary data to a file and then run a chmod on that file. An attacker wanting to use a custom build executable on the system at this point could just as well build that on their own machine and transfer it to the server.
There are other much more relevant things to look out for. If an installed piece of software contains a security bug, there is a few ways it could be exposed to an attacker:
- The package could contain a suid or sgid executable.
- The package could be starting services on the system.
- The package could install scripts that are invoked automatically under certain circumstances (this includes cron jobs, but scripts could be invoked by other events for example when the state of a network interface changes or when a user logs in).
- The package could install device inodes.
- I would not expect development tools to match one of the above, and as such is not a high risk package.
If you have workflows in which you would make use of the development tools, then you first have to decide whether those are reasonable workflows, and if they are, you should install the development tools.
If you find that you don't really need those tools on the server, you should refrain from installing them for multiple reasons:
- Saves disk space, both on the server and on backups.
- Less installed software makes it easier to track what your dependencies are.
- If you don't need the package, there is no point in taking the additional security risk from having it installed, even if that security risk is tiny.
If you decide that for security reasons, you won't allow unprivileged users to put their own executabels on the server, then what you should avoid is not the development tools but rather directories writable to those users on file systems mounted with execute permissions. There may still be a use for development tools even under those circumstances, but it is not very likely.
DARPA Open Source
Many branches of the US military are interested in open source.
- Open, Programmable, Secure 5G (OPS-5G) from DARPA (2021) about an attempt to move computing to the edge, that is into the field, rather than completely centralized.
NSA Open Source
- Open Source @ NSA
- open source training platform for apps, development 2020-10-16
- Open Source Software Releases of code that the NSA has put in the public domain, many on GitHub.
- The following is from the article https://developer.ibm.com/solutions/security/podcasts/ibm_developer_podcast/009_nsa_ghidra_open_source/. 2019-11-25
The National Security Agency | Open Source Software & The Ghidra decompiler project, an interview of Jacob & Emily from the agency’s community team, as well as a software developer from the open source decompiler project Ghidra.
While most of what the NSA does is top secret, they actually have 40 open source projects and an active community team and public education programs. We talked about how they support open source at the NSA, cybersecurity, career paths in technology, learning new skills, and our tech origin stories.
Links mentioned in this episode:
- Ghidra, project page: https://ghidra-sre.org/ and GitHub project
- DATA.GOV: https://www.data.gov/
- CODE.GOV: https://www.code.gov/
- The National Security Agency: https://www.nsa.gov/careers/
- Jacob DePriest: https://twitter.com/jacobdepriest
- Emily Fox : https://twitter.com/TheMoxieFox
Links related to this episode
- For details on OSS and FOSS see the wiki page Open Source Software.