Nothing Special   »   [go: up one dir, main page]

Skip to main content

Towards Automated Augmentation and Instrumentation of Legacy Cryptographic Executables

  • Conference paper
  • First Online:
Applied Cryptography and Network Security (ACNS 2020)

Part of the book series: Lecture Notes in Computer Science ((LNSC,volume 12147))

Included in the following conference series:

  • 825 Accesses

Abstract

Implementation flaws in cryptographic libraries, design flaws in underlying cryptographic primitives, and weaknesses in protocols using both, can all lead to exploitable vulnerabilities in software. Manually fixing such issues is challenging and resource consuming, especially when maintaining legacy software that contains broken or outdated cryptography, and for which source code may not be available. While there is existing work on identifying cryptographic primitives (often in the context of malware analysis), none of this prior work has focused on replacing such primitives with stronger (or more secure ones) after they have been identified. This paper explores feasibility of designing and implementing a toolchain for Augmentation and Legacy-software Instrumentation of Cryptographic Executables  (ALICE). The key features of ALICE are: (i) automatically detecting and extracting implementations of weak or broken cryptographic primitives from binaries without requiring source code or debugging symbols, (ii) identifying the context and scope in which such primitives are used, and performing program analysis to determine the effects of replacing such implementations with more secure ones, and (iii) replacing implementations of weak primitives with those of stronger or more secure ones. We demonstrate practical feasibility of our approach on cryptographic hash functions with several popular cryptographic libraries and real-world programs of various levels of complexity. Our experimental results show that ALICE can locate and replace insecure hash functions, even in large binaries (we tested ones of size up to 1.5 MB), while preserving existing functionality of the original binaries, and while incurring minimal execution-time overhead in the rewritten binaries. We also open source ALICE ’s code at https://github.com/SRI-CSL/ALICE.

N. Rattanavipanon—Work done partially while at SRI International.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 79.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.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

Similar content being viewed by others

Notes

  1. 1.

    We intentionally avoid rewriting at the instruction level as this can potentially incur significant run-time overhead for the rewritten/output binaries.

  2. 2.

    https://github.com/pellucida/ldap-passwords.

References

  1. Heninger, N., Durumeric, Z., Wustrow, E., Halderman, J.A.: Mining your Ps and Qs: detection of widespread weak keys in network devices. In: USENIX Security Symposium (2012)

    Google Scholar 

  2. Egele, M., Brumley, D., Fratantonio, Y., Kruegel, C.: An empirical study of cryptographic misuse in android applications. In: ACM Conference on Computer and Communications Security (2013)

    Google Scholar 

  3. Smart, N.P.: Physical side-channel attacks on cryptographic systems. Softw. Focus 1(2), 6–13 (2000)

    Article  Google Scholar 

  4. Li, J., Lin, Z., Caballero, J., Zhang, Y., Gu, D.: K-Hunt: pinpointing insecure cryptographic keys from execution traces. In: ACM Conference on Computer and Communications Security (2018)

    Google Scholar 

  5. US-CERT: Openssl ’heartbleed’ vulnerability (cve-2014-0160) (2014). https://www.us-cert.gov/ncas/alerts/TA14-098A

  6. US-CERT: Ssl 3.0 protocol vulnerability and padding oracle on downgraded legacy encryption(poodle) attack (2014). https://www.us-cert.gov/ncas/alerts/TA14-290A

  7. Calzavara, S., Focardi, R., Nemec, M., Rabitti, A., Squarcina, M.: Postcards from the post-HTTP world: amplification of https vulnerabilities in the web ecosystem. In: IEEE Symposium on Security and Privacy (2019)

    Google Scholar 

  8. Adrian, D., et al.: Imperfect forward secrecy: how Diffie-Hellman fails in practice. In: ACM Conference on Computer and Communications Security (2015)

    Google Scholar 

  9. Stevens, M.: Counter-cryptanalysis. In: Annual Cryptology Conference (2013)

    Google Scholar 

  10. Leurent, G., Peyrin, T.: SHA-1 is a shambles - first chosen-prefix collision on SHA-1 and application to the PGP web of trust (2020). https://eprint.iacr.org/2020/014

  11. Li, F., Paxson, V.: A large-scale empirical study of security patches. In: ACM Conference on Computer and Communications Security (2017)

    Google Scholar 

  12. Eldefrawy, K., Locasto, M., Rattanavipanon, N., Saidi, H.: Towards automated augmentation and instrumentation of legacy cryptographic executables: extended version. https://arxiv.org/abs/2004.09713

  13. aldeid: Ida-pro/plugins/findcrypt2 (2019). https://www.aldeid.com/wiki/IDA-Pro/plugins/FindCrypt2

  14. igNorAMUS, snaker, Maxx, and pusher, “Kanal - krypto analyzer for peid" (2019). http://www.dcs.fmph.uniba.sk/zri/6.prednaska/tools/PEiD/plugins/kanal.htm

  15. apponic: Hash & Crypto detector (2019). https://hash-crypto-detector.apponic.com/

  16. Lestringant, P., Guihéry, F., Fouque, P.-A.: Automated identification of cryptographic primitives in binary code with data flow graph isomorphism. In: ACM ASIA Conference on Computer and Communications Security (2015)

    Google Scholar 

  17. Calvet, J., Fernandez, J.M., Marion, J.-Y.: Aligot: cryptographic function identification in obfuscated binary programs. In: ACM Conference on Computer and Communications Security (2012)

    Google Scholar 

  18. Lutz, N.: Towards revealing attacker’s intent by automatically decrypting network traffic. Mémoire de maıtrise, ETH Zürich, Switzerland (2008)

    Google Scholar 

  19. Gröbert, F., Willems, C., Holz, T.: Automated identification of cryptographic primitives in binary programs. In: Sommer, R., Balzarotti, D., Maier, G. (eds.) RAID 2011. LNCS, vol. 6961, pp. 41–60. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-23644-0_3

    Chapter  Google Scholar 

  20. Xu, D., Ming, J., Wu, D.: Cryptographic function detection in obfuscated binaries via bit-precise symbolic loop mapping. In: 2017 IEEE Symposium on Security and Privacy, May 2017

    Google Scholar 

  21. Hunt, G., Brubacher, D.: Detours: binary interception of Win32 functions. In: 3rd USENIX Windows NT Symposium (1999)

    Google Scholar 

  22. Bauman, E., Lin, Z., et al.: Superset disassembly: statically rewriting x86 binaries without heuristics. In: Network and Distributed System Security Symposium (2018)

    Google Scholar 

  23. Anand, K., Smithson, M., et al.: A compiler-level intermediate representation based binary analysis and rewriting system. In: ACM European Conference on Computer Systems (2013)

    Google Scholar 

  24. Edwards, A., Vo, H., Srivastava, A., Srivastava, A.: Vulcan binary transformation in a distributed environment. Technical report, Microsoft Research (2001)

    Google Scholar 

  25. Wang, S., Wang, P., Wu, D.: Reassembleable disassembling. In: USENIX Security Symposium, pp. 627–642 (2015)

    Google Scholar 

  26. Wang, R., et al.: Ramblr: making reassembly great again. In: Network and Distributed System Security Symposium (2017)

    Google Scholar 

  27. Nethercote, N., Seward, J.: Valgrind: a program supervision framework. Electron. Notes Theor. Comput. Sci. 89(2), 44–66 (2003)

    Article  Google Scholar 

  28. Luk, C.-K., Cohn, R., et al.: Pin: building customized program analysis tools with dynamic instrumentation. ACM SIGPLAN Not. 40, 190–200 (2005)

    Article  Google Scholar 

  29. Dynamic instrumentation tool platform (2017). http://www.dynamorio.org/

  30. Perkins, J.H., Kim, S., et al.: Automatically patching errors in deployed software. In: ACM SIGOPS (2009)

    Google Scholar 

  31. Klima, V.: Tunnels in hash functions: Md5 collisions within a minute. IACR Cryptology ePrint Archive 2006/105 (2006)

    Google Scholar 

  32. Sasaki, Yu., Aoki, K.: Finding preimages in full MD5 faster than exhaustive search. In: Joux, A. (ed.) EUROCRYPT 2009. LNCS, vol. 5479, pp. 134–152. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-01001-9_8

    Chapter  Google Scholar 

  33. Yadegari, B., Debray, S.: Bit-level taint analysis. In: 2014 IEEE 14th International Working Conference on Source Code Analysis and Manipulation (SCAM). IEEE, pp. 255–264 (2014)

    Google Scholar 

  34. Shoshitaishvili, Y., et al.: Sok:(state of) the art of war: offensive techniques in binary analysis. In: 2016 IEEE Symposium on Security and Privacy. IEEE, pp. 138–157 (2016)

    Google Scholar 

  35. Saudel, F., Salwan, J.: Triton: a dynamic symbolic execution framework. In: Symposium sur la sécurité des technologies de l’information et des communications, SSTIC, SSTIC 2015, France, Rennes, 3–5 June, pp. 31–54 (2015)

    Google Scholar 

  36. Hileman, R.: Binary patching from Python (2018). https://github.com/lunixbochs/patchkit

  37. Quynh, N.A.: Keystone - the ultimate assembler (2019). http://www.keystone-engine.org/

  38. Andriesse, D., Chen, X., et al.: An in-depth analysis of disassembly on full-scale x86/x64 binaries. In: USENIX Security Symposium (2016)

    Google Scholar 

Download references

Acknowledgments

This work was sponsored by the U.S. Department of Homeland Security (DHS) Science and Technology (S&T) Directorate under Contract No. HSHQDC-16-C-00034. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of DHS and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of DHS or the U.S. government. The authors thank the anonymous reviewers for their valuable comments.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Norrathep Rattanavipanon .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Eldefrawy, K., Locasto, M., Rattanavipanon, N., Saidi, H. (2020). Towards Automated Augmentation and Instrumentation of Legacy Cryptographic Executables. In: Conti, M., Zhou, J., Casalicchio, E., Spognardi, A. (eds) Applied Cryptography and Network Security. ACNS 2020. Lecture Notes in Computer Science(), vol 12147. Springer, Cham. https://doi.org/10.1007/978-3-030-57878-7_18

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-57878-7_18

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-57877-0

  • Online ISBN: 978-3-030-57878-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics