Skip to main content

Source Codes Classification Using a Modified Instruction Count Pass

  • Conference paper
  • First Online:
Web, Artificial Intelligence and Network Applications (WAINA 2019)

Abstract

The vulnerability is a flaw in the system’s implementation which may result in severe consequences. The existence of these flaws should be detected and managed. There are several types of research which provide different solutions to detect these flaws through static analysis of the original source codes. Static analysis process has many disadvantages, some of them are; slower than compilation and produce high false positive rate. In this project, we introduce a prediction technique using the output of one of the LLVM passes; “InstCount”. A classifier was built based on the output of this pass on 500 source codes written in C and C++ languages with 88% of accuracy. A comparison between our classifier and Clang static analyzer showed that the classifier super performed to predict the existence of memory leak and Null pointers. The experiment also showed that this classifier could be applied or integrated with static analysis tools for more efficient results.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 169.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 219.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Hughes, J., Cybenko, G.: Three tenets for secure cyber-physical system design and assessment. In: Cyber Sensing 2014, vol. 9097, p. 90970A. International Society for Optics and Photonics (2014)

    Google Scholar 

  2. Eigler, F.C.: Mudflap: Pointer use checking for C/C++ (2003)

    Google Scholar 

  3. Flawfinder. http://www.dwheeler.com/flawfinder/

  4. Clang Static Analyzer. http://clang-analyzer.llvm.org/

  5. The LLVM Compiler. Infrastructure. http://llvm.org/

  6. Viega, J., Bloch, J.T., Kohno, Y., McGraw, G.: Its4: a static vulnerability scanner for C and C++ code. In: 16th Annual Conference on Computer Security Applications, ACSAC 2000, pp. 257–267. IEEE (2000)

    Google Scholar 

  7. Shin, Y., Williams, L.: Is complexity really the enemy of software security? In: Proceedings of the 4th ACM Workshop on Quality of Protection, pp. 47–50. ACM (2008)

    Google Scholar 

  8. Chowdhury, I., Zulkernine, M.: Using complexity, coupling, and cohesion metrics as early indicators of vulnerabilities. J. Syst. Architect. 57(3), 294–313 (2011)

    Article  Google Scholar 

  9. Mizuno, O., Ikami, S., Nakaichi, S., Kikuno, T.: Spam filter based approach for finding fault-prone software modules. In: Proceedings of the Fourth International Workshop on Mining Software Repositories, p. 4. IEEE Computer Society (2007)

    Google Scholar 

  10. Aversano, L., Cerulo, L., Del Grosso, C.: Learning from bug-introducing changes to prevent fault prone code. In: Ninth International Workshop on Principles of Software Evolution: in Conjunction with the 6th ESEC/FSE Joint Meeting, pp. 19–26. ACM (2007)

    Google Scholar 

  11. Scandariato, R., Walden, J., Hovsepyan, A., Joosen, W.: Predicting vulnerable software components via text mining. IEEE Trans. Softw. Eng. 40(10), 993–1006 (2014)

    Article  Google Scholar 

  12. National Institute of Standards and Technology. http://www.nist.gov

  13. Mathematics Source Library C & ASM. http://www.mymathlib.com

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Omar Darwish .

Editor information

Editors and Affiliations

Appendix

Appendix

Fig. 2.
figure 2

Confusion matrix.

Fig. 3.
figure 3

Confusion matrix for vulnerable source codes.

Fig. 4.
figure 4

Sample of the output of new instcount pass.

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Darwish, O., Maabreh, M., Karajeh, O., Alsinglawi, B. (2019). Source Codes Classification Using a Modified Instruction Count Pass. In: Barolli, L., Takizawa, M., Xhafa, F., Enokido, T. (eds) Web, Artificial Intelligence and Network Applications. WAINA 2019. Advances in Intelligent Systems and Computing, vol 927. Springer, Cham. https://doi.org/10.1007/978-3-030-15035-8_88

Download citation

Publish with us

Policies and ethics