Symbolic String Verification: An Automata-Based Approach

  • Authors:
  • Fang Yu;Tevfik Bultan;Marco Cova;Oscar H. Ibarra

  • Affiliations:
  • Department of Computer Science, University of California, Santa Barbara,;Department of Computer Science, University of California, Santa Barbara,;Department of Computer Science, University of California, Santa Barbara,;Department of Computer Science, University of California, Santa Barbara,

  • Venue:
  • SPIN '08 Proceedings of the 15th international workshop on Model Checking Software
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present an automata-based approach for the verification of string operations in PHP programs based on symbolic string analysis. String analysis is a static analysis technique that determines the values that a string expression can take during program execution at a given program point. This information can be used to verify that string values are sanitized properly and to detect programming errors and security vulnerabilities. In our string analysis approach, we encode the set of string values that string variables can take as automata. We implement all string functions using a symbolic automata representation (MBDD representation from the MONA automata package) and leverage efficient manipulations on MBDDs, e.g., determinization and minimization. Particularly, we propose a novel algorithm for language-based replacement. Our replacement function takes three DFAs as arguments and outputs a DFA. Finally, we apply a widening operator defined on automata to approximate fixpoint computations. If this conservative approximation does not include any badpatterns (specified as regular expressions), we conclude that the program does not contain any errors or vulnerabilities. Our experimental results demonstrate that our approach works quite well in checking the correctness of sanitization operations in real-world PHP applications.