Script-language runtimes such as Python, Lua, and JavaScript are widely deployed in security sensitive contexts, yet they remain difficult to test because valid inputs must satisfy syntax, dynamic type constraints, and object-level semantics. Existing grammar and reflection-based fuzzers improve syntactic validity and interface reachability, but they rarely model override hooks, dynamic rebinding, and attribute-resolution behavior that can redirect built-in operations across the script-native boundary and trigger use-after-free or type-confusion bugs. We present OverrideFuzz, a two-phase, semantic-aware grammar fuzzer for script-language runtimes. Its declaration phase constructs objects with overriding methods, while its execution phase generates operations that route through those hooks. Active reflection tracks runtime types, and passive reflection learns from error messages to remove invalid operation shapes, allowing generation to approach semantic correctness without manual API specification. We evaluate OverrideFuzz on CPython, Lua, and QuickJS. All three targets show consistent coverage growth, with rapid early expansion followed by slower incremental gains, and Lua benefits most from its pervasive metamethod dispatch mechanism. Although OverrideFuzz did not discover novel vulnerabilities during the bounded evaluation period, corpus analysis shows that it reconstructs inputs matching known vulnerability patterns, which suggests that semantic-aware generation reaches the intended script-native boundary behaviors.


翻译:脚本语言运行时(如Python、Lua和JavaScript)在安全敏感场景中广泛部署,但因其有效输入需同时满足语法约束、动态类型约束和对象级语义,测试难度极高。现有基于语法和反射的模糊测试工具虽能提升输入语法有效性和接口可达性,却鲜少建模可重定向脚本-本地边界内建操作的覆盖钩子、动态重绑定及属性解析行为,而这些行为正是导致释放后使用或类型混淆漏洞的根源。本文提出OverideFuzz——一种面向脚本语言运行时的两阶段语义感知语法模糊测试工具:其声明阶段构造包含重写方法的对象,执行阶段生成路由至这些钩子的操作序列。主动反射机制追踪运行时类型,被动反射机制则从错误信息中学习以剔除无效操作形态,从而无需人工API规范即可逼近语义正确的输入生成。我们在CPython、Lua和QuickJS上评估了OverideFuzz。所有三个目标均呈现持续的覆盖率增长——初期快速拓展后进入平缓增量阶段,其中Lua因具备泛型元方法调度机制获益最多。尽管在有限评估期内未发现新漏洞,语料分析表明OverideFuzz重建了与已知漏洞模式匹配的输入,这证明语义感知生成机制能够有效触及预期的脚本-本地边界行为。

0
下载
关闭预览

相关内容

Lua 是一门轻量而快速的脚本语言,功能在高级动态语言中十分完备,对 C API、嵌入式开发以及线程安全的 VM 的支持,使其非常流行。
深度学习中的架构后门:漏洞、检测与防御综述
专知会员服务
12+阅读 · 2025年7月19日
专知会员服务
17+阅读 · 2021年9月8日
【知乎】超越Lexical:用于文本搜索引擎的语义检索框架
专知会员服务
22+阅读 · 2020年8月28日
论文浅尝 | 基于事理图谱的脚本事件预测
开放知识图谱
10+阅读 · 2019年12月10日
Xsser 一款自动检测XSS漏洞工具
黑白之道
14+阅读 · 2019年8月26日
Web渗透测试Fuzz字典分享
黑白之道
21+阅读 · 2019年5月22日
一个牛逼的 Python 调试工具
机器学习算法与Python学习
15+阅读 · 2019年4月30日
动手写机器学习算法:异常检测 Anomaly Detection
七月在线实验室
11+阅读 · 2017年12月8日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
7+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
8+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
6+阅读 · 6月17日
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员