Design and Implementation of SFCI: A Tool for Security Focused Continuous Integration
Abstract
:1. Introduction
- A tool for running automated security tests against the current state of a project’s Git repository and displaying the results in a web format.
- A security test case for ImageMagick that attempts to exploit the CVE-2016-3715 vulnerability and delete an arbitrary file.
- A security test case for ImageMagick that attempts a path traversal exploit in linking bitmap images to SVG images.
- Discovery of a vulnerability in ImageMagick where an SVG file disguised as a raster image such as PNG or JPEG can cause a potential information leak.
- Discovery of a cross-site-request-forgery vulnerability in Open Energy Monitor’s Emoncms and a test case for its detection.
2. Motivation
3. Related Work
3.1. BDD-Security
3.2. Valgrind Plugin: Jenkins
3.3. Zapper Plugin: Jenkins
3.4. Tinfoil Security
3.5. Arachni
3.6. GitLab-CI
4. Architecture
4.1. Setup Filesystem
4.2. Virtual Machine
4.3. Parsers and Automation
4.4. Web Report Rendering
5. Existing Software Packages
5.1. Git
5.2. Jinja2
5.3. QEMU-KVM
5.4. AddressSanitizer
- Out-of-bounds accesses to heap, stack, and globals
- Use-after-free
- Use-after-return (to some extent)
- Double-free
- Invalid-free
- Memory leaks (experimental)
5.5. Valgrind
5.6. Sqlmap
5.7. Commix
5.8. XSS Me
5.9. DotDotPwn
6. Recommended Use
6.1. SFCI as a Vulnerability Description Medium
6.2. SFCI for Local Security Testing
7. Testing an Example Project
7.1. Developing the Test Cases
7.2. Evaluating the Test Cases
8. Testing ImageMagick
8.1. Detecting a Known Vulnerability
8.2. Detecting an Unknown Vulnerability
9. Testing A Smart Grid Application
10. SFCI Limitations
11. Conclusions and Future Work
Author Contributions
Funding
Conflicts of Interest
References
- Rutkowska, J. The Three Approaches to Computer Security. Available online: http://theinvisiblethings.blogspot.ca/2008/09/three-approaches-to-computer-security.html (accessed on 20 September 2019).
- Lindner, F.F. Software Security is Software Reliability. Commun. ACM 2006, 49, 57–61. [Google Scholar] [CrossRef]
- ThoughtWorks. Continuous Integration. Available online: https://www.thoughtworks.com/continuous-integration (accessed on 20 September 2019).
- Jovanovic, N.; Kruegel, C.; Kirda, E. Pixy: A Static Analysis Tool for Detecting Web Application Vulnerabilities (Short Paper). In Proceedings of the 2006 IEEE Symposium on Security and Privacy, Berkeley/Oakland, CA, USA, 21–24 May 2006; pp. 258–263. [Google Scholar]
- Sanchez, G. Case Study: Critical Controls that Sony Should Have Implemented; SANS Institute: Bethesda, MD, USA, 2015. [Google Scholar]
- Yasar, H. An Introduction to Secure DevOps: Including Security in the Software Lifecycle. Available online: https://insights.sei.cmu.edu/devops/2016/11/an-introduction-to-secure-devops-including-security-in-the-software-lifecycle.html (accessed on 20 September 2019).
- IriusRisk. BDD-Security. Available online: https://www.iriusrisk.com/open-source/ (accessed on 20 September 2019).
- DeVries, S. Security Testing Embedded into Jenkins with BDD-Security. Available online: https://vimeo.com/89848072 (accessed on 20 September 2019).
- DeVries, S. BDD-Security Wiki. Available online: https://github.com/continuumsecurity/bdd-security/wiki (accessed on 20 September 2019).
- Ohlemacher, J. Valgrind Plugin. Available online: https://wiki.jenkins-ci.org/display/JENKINS/Valgrind+Plugin (accessed on 20 September 2019).
- Adetoye, A. Zapper Plugin. Available online: https://wiki.jenkins-ci.org/display/JENKINS/Zapper+Plugin (accessed on 20 September 2019).
- TinfoilSecurity. Simple DAST Overview. Available online: https://www.tinfoilsecurity.com/tour (accessed on 20 September 2019).
- Irizarry, A. Tinfoil Security Plugin. Available online: https://wiki.jenkins-ci.org/display/JENKINS/Tinfoil+Security+Plugin (accessed on 20 September 2019).
- Arachni. Checks. Available online: http://www.arachni-scanner.com/features/framework/#Checks (accessed on 20 September 2019).
- Rohr, M. Automating DAST Scans with Jenkins, Arachni & ThreadFix. Available online: https://blog.secodis.com/2016/03/17/automated-security-tests-3-jenkins-arachni-threadfix/ (accessed on 20 September 2019).
- GitLab. GitLab Continuous Integration. Available online: https://about.gitlab.com/gitlab-ci/ (accessed on 20 September 2019).
- GitLab. GitLab Runner. Available online: https://docs.gitlab.com/runner/ (accessed on 20 September 2019).
- SG. Show Test Result with Web Interface (#18664). Available online: https://gitlab.com/gitlab-org/gitlab-ce/issues/18664 (accessed on 20 September 2019).
- Berkers, G. How I run unit tests in Vagrant, in Jenkins. Available online: https://gielberkers.com/how-i-run-unit-tests-in-vagrant-in-jenkins/ (accessed on 20 September 2019).
- Kuusela, J. Security testing in continuous integration processes. Available online: https://aaltodoc.aalto.fi/handle/123456789/27065 (accessed on 20 September 2019).
- Lescisin, M.; Mahmoud, Q.H. Evaluation of Dynamic Analysis Tools for Software Security. Int. J. Syst. Softw. Secur. Protect. (IJSSSP) 2018, 9, 34–59. [Google Scholar] [CrossRef]
- Serebryany, K.; Bruening, D.; Potapenko, A.; Vyukov, D. AddressSanitizer: A Fast Address Sanity Checker. In Proceedings of the 2012 USENIX Conference on Annual Technical Conference, Boston, MA, USA, 13–15 June 2012; USENIX Association: Berkeley, CA, USA, 2012; p. 28. [Google Scholar]
- ValgrindDevelopers. Projects Using Valgrind. Available online: http://valgrind.org/gallery/ (accessed on 20 September 2019).
- OffensiveSecurity. Kali Linux Tools Listing. Available online: http://tools.kali.org/tools-listing (accessed on 20 September 2019).
- Dalziel, H. World’s Best 50 Firefox Pentesting AddOns. Available online: https://www.concise-courses.com/50-firefox-pentesting-add-ons/ (accessed on 20 September 2019).
- Chacon, S.; Straub, B. A Short History of Git. Available online: https://git-scm.com/book/en/v2/Getting-Started-A-Short-History-of-Git (accessed on 20 September 2019).
- Ronacher, A. Welcome | Jinja2 (The Python Template Engine). Available online: http://jinja.pocoo.org/ (accessed on 20 September 2019).
- QEMUDevelopers. KVM-QEMU. Available online: https://wiki.qemu.org/Features/KVM (accessed on 20 September 2019).
- Gruhn, V.; Hannebauer, C.; John, C. Security of Public Continuous Integration Services. In Proceedings of the 9th International Symposium on Open Collaboration, Hong Kong, China, 5–7 August 2013; pp. 15:1–15:10. [Google Scholar]
- TheClangTeam. AddressSanitizer-Clang 4.0 Documentation. Available online: http://clang.llvm.org/docs/AddressSanitizer.html (accessed on 20 September 2019).
- ValgrindDevelopers. Valgrind Website. Available online: http://valgrind.org/ (accessed on 20 September 2019).
- Stampar, M.; Damele, B. SQLMap Website. Available online: http://sqlmap.org/ (accessed on 20 September 2019).
- ExploitDatabase. RealtyScript 4.0.2—Multiple Time-Based Blind SQL Injection. Available online: https://www.exploit-db.com/exploits/38497/ (accessed on 20 September 2019).
- ExploitDatabase. WordPress Plugin GigPress 2.3.8—SQL Injection. Available online: https://www.exploit-db.com/exploits/37109/ (accessed on 20 September 2019).
- Stasinopoulos, A. Commix: Detecting and Exploiting Command Injection Flaws; Blackhat Europe: London, UK, 2015. [Google Scholar]
- SecurityCompass. XSSMe. Available online: https://github.com/SecurityCompass/XSSMe (accessed on 20 September 2019).
- Navarrete, C.A.; Hernandez, C.C. dotdotpwn/README.md. Available online: https://github.com/wireghoul/dotdotpwn/blob/master/README.md (accessed on 20 September 2019).
- ExploitDatabase. Home FTP Server 1.11.1.149—Authenticated Directory Traversal. Available online: https://www.exploit-db.com/exploits/15349/ (accessed on 20 September 2019).
- ExploitDatabase. Femitter FTP Server 1.04—Directory Traversal. Available online: https://www.exploit-db.com/exploits/15445/ (accessed on 20 September 2019).
- Lescisin, M.; Mahmoud, Q.H. Security Focused Continuous Integration (SFCI) Documentation—Getting Started Guide. Available online: https://github.com/uoitdnalab/SecureContinuousIntegration/blob/master/GettingStartedGuide.pdf (accessed on 20 September 2019).
- Hilton, M.; Nelson, N.; Tunnell, T.; Marinov, D.; Dig, D. Trade-offs in Continuous Integration: Assurance, Security, and Flexibility. In Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering, Paderborn, Germany, 4–8 September 2017; pp. 197–207. [Google Scholar]
- Lescisin, M.; Mahmoud, Q.H. SecureContinuousIntegration/ExampleProject. Available online: https://github.com/uoitdnalab/SecureContinuousIntegration/tree/master/ExampleProject (accessed on 20 September 2019).
- ImageTragick. ImageMagick Is On Fire - CVE-2016-3714. Available online: https://imagetragick.com (accessed on 20 September 2019).
- Lescisin, M.; Mahmoud, Q.H. SecureContinuousIntegration/ImageMagick_FileDeletion. Available online: https://github.com/uoitdnalab/SecureContinuousIntegration/tree/master/ImageMagick_FileDeletion (accessed on 20 September 2019).
- Heiderich, M. The Image that called me. In Proceedings of the OWASP Sweden Meeting, Gothenburg, Sweden, 14 April 2011. [Google Scholar]
- OpenEnergyMonitor. Emoncms. Available online: https://emoncms.org/ (accessed on 20 September 2019).
- Medeiros, I.; Neves, N.F.; Correia, M. Securing energy metering software with automatic source code correction. In Proceedings of the 11th IEEE International Conference on Industrial Informatics, INDIN 2013, Bochum, Germany, 29–31 July 2013; pp. 701–706. [Google Scholar]
© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Lescisin, M.; Mahmoud, Q.H.; Cioraca, A. Design and Implementation of SFCI: A Tool for Security Focused Continuous Integration. Computers 2019, 8, 80. https://doi.org/10.3390/computers8040080
Lescisin M, Mahmoud QH, Cioraca A. Design and Implementation of SFCI: A Tool for Security Focused Continuous Integration. Computers. 2019; 8(4):80. https://doi.org/10.3390/computers8040080
Chicago/Turabian StyleLescisin, Michael, Qusay H. Mahmoud, and Anca Cioraca. 2019. "Design and Implementation of SFCI: A Tool for Security Focused Continuous Integration" Computers 8, no. 4: 80. https://doi.org/10.3390/computers8040080
APA StyleLescisin, M., Mahmoud, Q. H., & Cioraca, A. (2019). Design and Implementation of SFCI: A Tool for Security Focused Continuous Integration. Computers, 8(4), 80. https://doi.org/10.3390/computers8040080