Skip to main content

Semi-automated and Easily Interpretable Side-Channel Analysis for Modern JavaScript

  • Conference paper
  • First Online:
Cryptology and Network Security (CANS 2024)

Abstract

Over the years, developers have become increasingly reliant on web technologies to build their applications, raising concerns about side-channel attacks, especially on cryptographic libraries. Despite the efforts of researchers to ensure constant-time security by proposing tools and methods to find vulnerabilities, challenges remain due to inadequate tools and integration issues in development processes.

We tackle the main limitations of state-of-the-art detection tools. While Microwalk is the first and, to the best of our knowledge, only tool to find side-channel vulnerabilities in JavaScript libraries, the instrumentation framework it relies on does not support modern JavaScript features. Moreover, and common to most state-of-the-art detection tools not aimed at JavaScript, writing tests is a tedious process due to the complexity of libraries, the lack of information about test coverage, and the rudimentary interpretability of the report. Furthermore, recent studies show that developers do not use these tools due to compatibility issues, poor usability, and a lack of integration into workflows.

We extend Microwalk in several directions. First, we design a generic AST-level tracing technique that is tailored to source-based dynamic side-channel leakage analysis, providing support for the latest language features. Second, we bring semi-automation to Microwalk analysis templates, considerably reducing the manual effort necessary to integrate side-channel analyses into development workflows. Third, we are the first to combine leakage reporting with coverage visualization. We evaluate the new toolchain on a set of cryptographic libraries and show that it can quickly and comprehensively uncover more vulnerabilities while writing tests with half as many lines of code as the previous Microwalk version. By open sourcing our new tracer and analysis template, we hope to increase the adoption of automated side-channel leakage analyses in cryptographic library development.

I. Fayolle and J. Wichelmann—Contributed equally to this work.

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

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. ImperialViolet - checking that functions are constant time with valgrind. https://www.imperialviolet.org/2010/04/01/ctgrind.html

  2. node-forge. https://www.npmjs.com/package/node-forge

  3. OpenTelemetry. https://opentelemetry.io/. Accessed 21 Feb 2024

  4. Python developers survey 2022 results. https://lp.jetbrains.com/python-developers-survey-2022/

  5. Stack overflow developer survey 2022. https://survey.stackoverflow.co/2022/

  6. State of JavaScript 2022: Usage. https://2022.stateofjs.com/fr-FR/usage/

  7. Untrusted code mitigations. https://v8.dev/docs/untrusted-code-mitigations. Accessed 24 Apr 2024

  8. AES-JS. https://github.com/ricmoo/aes-js. Accessed 21 Feb 2024

  9. Almeida, J.B., Barbosa, M., Barthe, G., Dupressoir, F., Emmi, M.: Verifying constant-time implementations. In: USENIX Security Symposium (2016)

    Google Scholar 

  10. Babel: Babel is a JavaScript compiler. https://babeljs.io/. Accessed 21 Feb 2024

  11. bcoe/c8 - native v8 code-coverage. https://github.com/bcoe/c8. Original-date 26 Oct 2017

  12. Daniel, L., Bardin, S., Rezk, T.: Binsec/Rel: symbolic binary analyzer for security with applications to constant-time and secret-erasure. ACM Trans. Priv. Secur. 26(2), 11:1–11:42 (2023)

    Google Scholar 

  13. Daniel, L.A., Bardin, S., Rezk, T.: Binsec/Rel: Efficient relational symbolic execution for constant-time at binary-level. In: S &P (2020)

    Google Scholar 

  14. Doychev, G., Feld, D., Köpf, B., Mauborgne, L., Reineke, J.: CacheAudit: a tool for the static analysis of cache side channels. In: USENIX Security Symposium (2013)

    Google Scholar 

  15. Doychev, G., Köpf, B., Mauborgne, L., Reineke, J.: CacheAudit: a tool for the static analysis of cache side channels. ACM Trans. Inf. Syst. Secur. 18 (2015)

    Google Scholar 

  16. Fourné, M., et al.: “These results must be false”: a usability evaluation of constant-time analysis tools. In: USENIX Security Symposium (2024)

    Google Scholar 

  17. Geimer, A., Vergnolle, M., Recoules, F., Daniel, L.A., Bardin, S., Maurice, C.: A systematic evaluation of automated tools for side-channel vulnerabilities detection in cryptographic libraries. In: CCS (2023)

    Google Scholar 

  18. GitLab: test coverage visualization. https://docs.gitlab.com/ee/ci/testing/test_coverage_visualization.html. Accessed 21 Feb 2024

  19. Gras, B., Razavi, K., Bos, H., Giuffrida, C.: Translation leak-aside buffer: defeating cache side-channel protections with TLB attacks. In: USENIX Security Symposium (2018)

    Google Scholar 

  20. Gridin, I., García, C.P., Tuveri, N., Brumley, B.B.: Triggerflow: regression testing by advanced execution path inspection. In: DIMVA (2019)

    Google Scholar 

  21. He, S., Emmi, M., Ciocarlie, G.F.: ct-fuzz: fuzzing for timing leaks. In: ICST (2020)

    Google Scholar 

  22. Jancar, J., et al.: “They’re not that hard to mitigate”: what cryptographic library developers think about timing attacks. In: S &P (2022)

    Google Scholar 

  23. Christophe, L.: Aran. https://github.com/lachrist/aran. Accessed 21 Feb 2024

  24. Tal, L.: NPM security: preventing supply chain attacks. https://snyk.io/blog/npm-security-preventing-supply-chain-attacks/. Accessed 21 Feb 2024

  25. Microwalk Project: Source code and templates. https://github.com/microwalk-project

  26. Miller, P.: https://github.com/paulmillr/noble-curves. Accessed 21 Feb 2024

  27. Miller, P.: https://github.com/paulmillr/noble-ciphers. Accessed 21 Feb 2024

  28. Moghimi, A., Wichelmann, J., Eisenbarth, T., Sunar, B.: MemJam: a false dependency attack against constant-time crypto implementations 47(4), 538–570 (2019)

    Google Scholar 

  29. Nilizadeh, S., Noller, Y., Pasareanu, C.S.: DifFuzz: differential fuzzing for side-channel analysis. In: ICSE (2019)

    Google Scholar 

  30. Osvik, D.A., Shamir, A., Tromer, E.: Cache attacks and countermeasures: the case of AES. In: Pointcheval, D. (ed.) CT-RSA 2006. LNCS, vol. 3860, pp. 1–20. Springer, Heidelberg (2006). https://doi.org/10.1007/11605805_1

    Chapter  Google Scholar 

  31. Samsung: Jalangi2. https://github.com/Samsung/jalangi2. Accessed 21 Feb 2024

  32. Weiser, S., Zankl, A., Spreitzer, R., Miller, K., Mangard, S., Sigl, G.: DATA - differential address trace analysis: finding address-based side-channels in binaries. In: USENIX Security Symposium (2018)

    Google Scholar 

  33. Wichelmann, J., Moghimi, A., Eisenbarth, T., Sunar, B.: MicroWalk: a framework for finding side channels in binaries. In: ACSAC (2018)

    Google Scholar 

  34. Wichelmann, J., Sieck, F., Pätschke, A., Eisenbarth, T.: MicroWalk-CI: practical side-channel analysis for Javascript applications. In: CCS (2022)

    Google Scholar 

  35. Yuan, Y., Liu, Z., Wang, S.: CacheQL: quantifying and localizing cache side-channel vulnerabilities in production software. In: USENIX Security Symposium (2023)

    Google Scholar 

Download references

Acknowledgments

This work was supported by the project ANR-21-CE39-0019/Deutsche Forschungsgemeinschaft (DFG) 491039149 FACADES, and by Bundesministerium für Bildung und Forschung (BMBF) through the SAM-Smart project.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Iliana Fayolle .

Editor information

Editors and Affiliations

A The HTML Report

A The HTML Report

See Fig. 4.

Rights and permissions

Reprints and permissions

Copyright information

© 2025 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Fayolle, I., Wichelmann, J., Köhl, A., Rudametkin, W., Eisenbarth, T., Maurice, C. (2025). Semi-automated and Easily Interpretable Side-Channel Analysis for Modern JavaScript. In: Kohlweiss, M., Di Pietro, R., Beresford, A. (eds) Cryptology and Network Security. CANS 2024. Lecture Notes in Computer Science, vol 14906. Springer, Singapore. https://doi.org/10.1007/978-981-97-8016-7_2

Download citation

  • DOI: https://doi.org/10.1007/978-981-97-8016-7_2

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-97-8015-0

  • Online ISBN: 978-981-97-8016-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics