Injection attacks have been a major threat to web applications. Despite the significant effort in thwarting injection attacks, protection against injection attacks remains challenging due to the sophisticated attacks that exploit the existing protection techniques' design and implementation flaws. In this paper, we develop Spinner, a system that provides general protection against input injection attacks, including OS/shell command, SQL, and XXE injection. Instead of focusing on detecting malicious inputs, Spinner constantly randomizes underlying subsystems so that injected inputs (e.g., commands or SQL queries) that are not properly randomized will not be executed, hence prevented. We revisit the design and implementation choices of previous randomization-based techniques and develop a more robust and practical protection against various sophisticated input injection attacks. To handle complex real-world applications, we develop a bidirectional analysis that combines forward and backward static analysis techniques to identify intended commands or SQL queries to ensure the correct execution of the randomized target program. We implement Spinner for the shell command processor and two different database engines (MySQL and SQLite) and in diverse programming languages including C/C++, PHP, JavaScript and Lua. Our evaluation results on 42 real-world applications including 27 vulnerable ones show that it effectively prevents a variety of input injection attacks with low runtime overhead (around 5%).
翻译:尽管在挫败注射攻击方面做出了重大努力,但由于利用现有保护技术的设计和实施缺陷,防止注射攻击的防范仍然具有挑战性。在本文中,我们开发了Spinner,这是一个提供一般性保护以防止输入注射攻击的系统,包括OS/shell指令、SQL和XXE注射。我们开发了双向分析,将前向和后向静态分析技术结合起来,以确定预期指令或SQL询问,以确保正确执行随机目标程序。我们用Spinner进行空壳指令处理,用两种不同的数据库引擎(MySQL和SQLite)进行不适当随机处理,从而预防。我们重新审视了以前随机化技术的设计和实施选择,并针对各种复杂的输入注射攻击制定了更有力和实用的保护。为了处理复杂的现实世界应用程序,我们开发了双向分析,将前向和后向静态分析技术结合起来,以确保正确执行随机目标程序。我们用Spinner进行空壳指令处理,用两种不同的数据库引擎(MySQL和SQLite),并用多种语言对包括C/C+++、PHSjaSpal 5的低版本应用进行编程设计,以有效防止我们低版本的图像输出。