Preventing injection attacks with syntax embeddings

Science of Computer Programming(2010)

引用 40|浏览14
暂无评分
摘要
Software written in one language often needs to construct sentences in another language, such as SQL queries, XML output, or shell command invocations. This is almost always done using unhygienic string manipulation, the concatenation of constants and client-supplied strings. A client can then supply specially crafted input that causes the constructed sentence to be interpreted in an unintended way, leading to an injection attack. We describe a more natural style of programming that yields code that is impervious to injections by construc- tion. Our approach embeds the grammars of the guest languages (e.g. SQL) into that of the host language (e.g. Java) and automatically generates code that maps the embedded lan- guage to constructs in the host language that reconstruct the embedded sentences, adding escaping functions where appropriate. This approach is generic, meaning that it can be applied with relative ease to any combination of context-free host and guest languages.
更多
查看译文
关键词
program generation,concrete object syntax,yields code,injection attacks,sql query,preventing injection attack,security,syntax embedding,program transformation,syntax embeddings,xml output,embedded language,injection attack,context-free host,client-supplied string,embedded sentence,guest language,host language
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要