Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to main content

Untangle: Aiding Global Function Pointer Hijacking for Post-CET Binary Exploitation

  • Conference paper
  • First Online:
Detection of Intrusions and Malware, and Vulnerability Assessment (DIMVA 2023)

Abstract

In this paper, we combine static code analysis and symbolic execution to bypass Intel’s Control-Flow Enforcement Technology (CET) by exploiting function pointer hijacking. We present Untangle, an open-source tool that implements and automates the discovery of global function pointers in exported library functions and their call sites. Then, it determines the constraints that need to be satisfied to reach those pointers. Our approach manages naive built-in types and complex parameters like structure pointers. We demonstrate the effectiveness of Untangle on 8 of the most used open source C libraries, identifying 57 unique global function pointers, reachable through 1488 different exported functions. Untangle can find and verify the correctness of the constraints for 484 global function pointer calls, which can be used as attack vectors for control-flow hijacking. Finally, we discuss current and future defense mechanisms against control-flow hijacking using global function pointers.

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

    https://github.com/untangle-tool/untangle.

  2. 2.

    https://github.com/untangle-tool/untangle/blob/main/untangle/analyzer.py#L82.

  3. 3.

    https://nvd.nist.gov/vuln/detail/CVE-2021-43527.

  4. 4.

    https://nvd.nist.gov/vuln/detail/CVE-2021-43529.

References

  1. angr. https://angr.io/

  2. CodeQL. https://codeql.github.com/

  3. Debian popularity contest. https://popcon.debian.org/main/index.html

  4. Fine-grained forward CFI on top of intel CET / IBT. https://www.openwall.com/lists/kernel-hardening/2021/02/11/1

  5. Linux standard base specification: Interface definitions for libdl. https://refspecs.linuxbase.org/LSB_3.0.0/LSB-generic/LSB-generic/libdlman.html

  6. The LLVM compiler infrastructure. https://llvm.org/

  7. PyVEX. https://github.com/angr/pyvex

  8. Abadi, M., Budiu, M., Erlingsson, Ú., Ligatti, J.: Control-flow integrity principles, implementations, and applications. ACM Trans. Inf. Syst. Secur. 13(1), 4:1-4:40 (2009). https://doi.org/10.1145/1609956.1609960

    Article  Google Scholar 

  9. Bhatkar, S., DuVarney, D.C., Sekar, R.: Address obfuscation: An efficient approach to combat a broad range of memory error exploits. In: Proceedings of the 12th USENIX Security Symposium, Washington, D.C., USA, 4–8 August 2003. USENIX Association (2003)

    Google Scholar 

  10. Bletsch, T.K., Jiang, X., Freeh, V.W.: Mitigating code-reuse attacks with control-flow locking. In: Twenty-Seventh Annual Computer Security Applications Conference, ACSAC 2011, Orlando, FL, USA, 5–9 December 2011, pp. 353–362. ACM (2011). https://doi.org/10.1145/2076732.2076783

  11. Bletsch, T.K., Jiang, X., Freeh, V.W., Liang, Z.: Jump-oriented programming: a new class of code-reuse attack. In: Proceedings of the 6th ACM Symposium on Information, Computer and Communications Security, ASIACCS 2011, Hong Kong, China, 22–24 March 2011, pp. 30–40. ACM (2011). https://doi.org/10.1145/1966913.1966919

  12. Borzacchiello, L., Coppa, E., D’Elia, D.C., Demetrescu, C.: Memory models in symbolic execution: key ideas and new thoughts. Softw. Test. Verification Reliab. 29(8) (2019). https://doi.org/10.1002/stvr.1722

  13. Buchanan, E., Roemer, R., Savage, S., Shacham, H.: Return-oriented programming: Exploitation without code injection. Black Hat 8 (2008)

    Google Scholar 

  14. Burow, N., Carr, S.A., Nash, J., Larsen, P., Franz, M., Brunthaler, S., Payer, M.: Control-flow integrity: Precision, security, and performance. ACM Comput. Surv. 50(1), 16:1–16:33 (2017). https://doi.org/10.1145/3054924

  15. Carlini, N., Wagner, D.A.: ROP is still dangerous: Breaking modern defenses. In: Proceedings of the 23rd USENIX Security Symposium, San Diego, CA, USA, 20–22 August 2014, pp. 385–399. USENIX Association (2014)

    Google Scholar 

  16. Checkoway, S., Davi, L., Dmitrienko, A., Sadeghi, A., Shacham, H., Winandy, M.: Return-oriented programming without returns. In: Proceedings of the 17th ACM Conference on Computer and Communications Security, CCS 2010, Chicago, Illinois, USA, 4–8 October 2010. pp. 559–572. ACM (2010). https://doi.org/10.1145/1866307.1866370

  17. Chen, S., Xu, J., Sezer, E.C.: Non-control-data attacks are realistic threats. In: Proceedings of the 14th USENIX Security Symposium, Baltimore, MD, USA, July 31 - August 5, 2005. USENIX Association (2005)

    Google Scholar 

  18. Cheng, Y., Zhou, Z., Yu, M., Ding, X., Deng, R.H.: Ropecker: A generic and practical approach for defending against ROP attacks (2014)

    Google Scholar 

  19. Dang, T.H.Y., Maniatis, P., Wagner, D.A.: The performance cost of shadow stacks and stack canaries. In: Proceedings of the 10th ACM Symposium on Information, Computer and Communications Security, ASIA CCS 2015, Singapore, 14–17 April 2015. pp. 555–566. ACM (2015). https://doi.org/10.1145/2714576.2714635

  20. Davi, L., Sadeghi, A., Winandy, M.: Ropdefender: a detection tool to defend against return-oriented programming attacks. In: Proceedings of the 6th ACM Symposium on Information, Computer and Communications Security, ASIACCS 2011, Hong Kong, China, 22–24 March 2011, pp. 40–51. ACM (2011). https://doi.org/10.1145/1966913.1966920

  21. Homescu, A., Stewart, M., Larsen, P., Brunthaler, S., Franz, M.: Microgadgets: Size does matter in turing-complete return-oriented programming. In: 6th USENIX Workshop on Offensive Technologies, WOOT’12, 6–7 August 2012, Bellevue, WA, USA, Proceedings, pp. 64–76. USENIX Association (2012)

    Google Scholar 

  22. Hu, H., Chua, Z.L., Adrian, S., Saxena, P., Liang, Z.: Automatic generation of data-oriented exploits. In: 24th USENIX Security Symposium, USENIX Security 15, Washington, D.C., USA, 12–14 August 2015, pp. 177–192. USENIX Association (2015)

    Google Scholar 

  23. Hu, H., Shinde, S., Adrian, S., Chua, Z.L., Saxena, P., Liang, Z.: Data-oriented programming: On the expressiveness of non-control data attacks. In: IEEE Symposium on Security and Privacy, SP 2016, San Jose, CA, USA, 22–26 May 2016, pp. 969–986. IEEE Computer Society (2016). https://doi.org/10.1109/SP.2016.62

  24. Ispoglou, K.K., AlBassam, B., Jaeger, T., Payer, M.: Block oriented programming: Automating data-only attacks. In: Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security, CCS 2018, Toronto, ON, Canada, 15–19 October 2018, pp. 1868–1882. ACM (2018). https://doi.org/10.1145/3243734.3243739

  25. King, J.C.: Symbolic execution and program testing. Commun. ACM 19(7), 385–394 (1976). https://doi.org/10.1145/360248.360252

    Article  MathSciNet  MATH  Google Scholar 

  26. Niu, B., Tan, G.: Modular control-flow integrity. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2014, Edinburgh, United Kingdom - 09–11 June 2014, pp. 577–587. ACM (2014). https://doi.org/10.1145/2594291.2594295

  27. Pappas, V., Polychronakis, M., Keromytis, A.D.: Transparent ROP exploit mitigation using indirect branch tracing. In: Proceedings of the 22th USENIX Security Symposium, Washington, DC, USA, 14–16 August 2013, pp. 447–462. USENIX Association (2013)

    Google Scholar 

  28. Prandini, M., Ramilli, M.: Return-oriented programming. IEEE Secur. Priv. 10(6), 84–87 (2012). https://doi.org/10.1109/MSP.2012.152

    Article  Google Scholar 

  29. Roemer, R., Buchanan, E., Shacham, H., Savage, S.: Return-oriented programming: Systems, languages, and applications. ACM Trans. Inf. Syst. Secur. 15(1), 2:1–2:34 (2012). https://doi.org/10.1145/2133375.2133377

  30. Sadeghi, A.A., Niksefat, S., Rostamipour, M.: Pure-Call Oriented Programming (PCOP): chaining the gadgets using call instructions. J. Comput. Virology Hacking Techniques 14(2), 139–156 (2017). https://doi.org/10.1007/s11416-017-0299-1

    Article  Google Scholar 

  31. Schuster, F., et al.: Evaluating the effectiveness of current anti-ROP defenses. In: Stavrou, A., Bos, H., Portokalidis, G. (eds.) RAID 2014. LNCS, vol. 8688, pp. 88–108. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-11379-1_5

    Chapter  Google Scholar 

  32. Shacham, H., Page, M., Pfaff, B., Goh, E., Modadugu, N., Boneh, D.: On the effectiveness of address-space randomization. In: Proceedings of the 11th ACM Conference on Computer and Communications Security, CCS 2004, Washington, DC, USA, 25–29 October 2004, pp. 298–307. ACM (2004). https://doi.org/10.1145/1030083.1030124

  33. Shanbhogue, V., Gupta, D., Sahita, R.: Security analysis of processor instruction set architecture for enforcing control-flow integrity. In: Proceedings of the 8th International Workshop on Hardware and Architectural Support for Security and Privacy, HASP@ISCA 2019, 23 June 2019, pp. 8:1–8:11. ACM (2019). https://doi.org/10.1145/3337167.3337175

  34. Shoshitaishvili, Y., Wang, R., Hauser, C., Kruegel, C., Vigna, G.: Firmalice - automatic detection of authentication bypass vulnerabilities in binary firmware (2015)

    Google Scholar 

  35. Shoshitaishvili, Y., et al.: SOK: (state of) the art of war: offensive techniques in binary analysis. In: IEEE Symposium on Security and Privacy, SP 2016, San Jose, CA, USA, 22–26 May 2016, pp. 138–157. IEEE Computer Society (2016). https://doi.org/10.1109/SP.2016.17

  36. Szekeres, L., Payer, M., Wei, T., Song, D.: SOK: eternal war in memory. In: 2013 IEEE Symposium on Security and Privacy, SP 2013, Berkeley, CA, USA, 19–22 May 2013, pp. 48–62. IEEE Computer Society (2013). https://doi.org/10.1109/SP.2013.13

  37. Wang, F., Shoshitaishvili, Y.: ANGR - the next generation of binary analysis. In: IEEE Cybersecurity Development, SecDev 2017, Cambridge, MA, USA, 24–26 September 2017, pp. 8–9. IEEE Computer Society (2017). https://doi.org/10.1109/SecDev.2017.14

  38. Yamaguchi, F., Golde, N., Arp, D., Rieck, K.: Modeling and discovering vulnerabilities with code property graphs. In: 2014 IEEE Symposium on Security and Privacy, SP 2014, Berkeley, CA, USA, 18–21 May 2014, pp. 590–604. IEEE Computer Society (2014). https://doi.org/10.1109/SP.2014.44

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Alessandro Bertani .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Bertani, A., Bonelli, M., Binosi, L., Carminati, M., Zanero, S., Polino, M. (2023). Untangle: Aiding Global Function Pointer Hijacking for Post-CET Binary Exploitation. In: Gruss, D., Maggi, F., Fischer, M., Carminati, M. (eds) Detection of Intrusions and Malware, and Vulnerability Assessment. DIMVA 2023. Lecture Notes in Computer Science, vol 13959. Springer, Cham. https://doi.org/10.1007/978-3-031-35504-2_13

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-35504-2_13

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-35503-5

  • Online ISBN: 978-3-031-35504-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics