Abstract
The static analysis of executable programs has gained importance due to the need to audit larger and larger programs for security vulnerabilities or safety violations. The basis for analyzing executables is the decoding of byte sequences into assembler instructions and giving a semantics to them. We illustrate how our domain specific language GDSL facilitates this task by specifying Intel x86 semantics. In particular, we show how simple optimizations of the generated code can drastically reduce its size. Since these optimizations are also written in GDSL they can be re-used with other processor front-ends. Hence, analyses based on our toolkit can be adapted to several architectures with little change.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Bardin, S., Herrmann, P., Leroux, J., Ly, O., Tabary, R., Vincent, A.: The BINCOA framework for binary code analysis. In: Gopalakrishnan, G., Qadeer, S. (eds.) CAV 2011. LNCS, vol. 6806, pp. 165–170. Springer, Heidelberg (2011)
Intel Corp. xed2 (2012), http://www.pintool.org
Cousot, P., Cousot, R.: Static Determination of Dynamic Properties of Programs. In: Robinet, B. (ed.) International Symposium on Programming, Paris, France, pp. 106–130 (April 1976)
Dullien, T., Porst, S.: REIL: A platform-independent intermediate representation of disassembled code for static code analysis. CanSecWest, Canada (2009)
Fox, A., Myreen, M.O.: A Trustworthy Monadic Formalization of the ARMv7 Instruction Set Architecture. In: Kaufmann, M., Paulson, L.C. (eds.) ITP 2010. LNCS, vol. 6172, pp. 243–258. Springer, Heidelberg (2010)
Lim, J., Reps, T.: A System for Generating Static Analyzers for Machine Instructions. In: Hendren, L. (ed.) CC 2008. LNCS, vol. 4959, pp. 36–52. Springer, Heidelberg (2008)
Ramsey, N., Fernández, M.F.: Specifying Representations of Machine Instructions. Trans. of Programming Languages and Systems 19(3), 492–524 (1997)
Sepp, A., Kranz, J., Simon, A.: GDSL: A Generic Decoder Specification Language for Interpreting Machine Language. In: Tools for Automatic Program Analysis, Deauville, France. ENTCS. Springer (September 2012)
Sepp, A., Mihaila, B., Simon, A.: Precise Static Analysis of Binaries by Extracting Relational Information. In: Pinzger, M., Poshyvanyk, D. (eds.) Working Conference on Reverse Engineering, Limerick, Ireland. IEEE Computer Society (October 2011)
Simon, A.: Deriving a Complete Type Inference for Hindley-Milner and Vector Sizes using Expansion. In: Partial Evaluation and Program Manipulation, SIGPLAN, Rome, Italy. ACM (January 2013)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer International Publishing Switzerland
About this paper
Cite this paper
Kranz, J., Sepp, A., Simon, A. (2013). GDSL: A Universal Toolkit for Giving Semantics to Machine Language. In: Shan, Cc. (eds) Programming Languages and Systems. APLAS 2013. Lecture Notes in Computer Science, vol 8301. Springer, Cham. https://doi.org/10.1007/978-3-319-03542-0_15
Download citation
DOI: https://doi.org/10.1007/978-3-319-03542-0_15
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-03541-3
Online ISBN: 978-3-319-03542-0
eBook Packages: Computer ScienceComputer Science (R0)