AdguardTeam / AdguardTeam/Scriptlets

Improve 'abort-on-stack-trace' — add 'stackDepth' keyword for stack match

未关闭
#494 1 条评论 0 个 reaction 已指派 1 人 已被 @maximtop 认领 在 GitHub 查看
enhancement Priority: P4
主要语言
JavaScript
星标
195
派生
33
PR 合并指标
30 天内没有已合并 PR

描述

Compare these commits:
https://github.com/AdguardTeam/AdguardFilters/commit/d466f3a974ee229dcb4a59db1ff499336eb6f9bd
https://github.com/uBlockOrigin/uAssets/commit/ee77cdf6e9edb6e0e0eeac42356f3dd599aa8dd3

As both the script and function names are randomized, StackDepth or the number of lines in the stack logs may be the only clue to distinguish legit and anti-adb calls. I guess it's actually possible to utilize StackDepth by complex regex, as AG logs stack trace in multiline mode (uBO logs in singleline mode), but I gave up as it's too complicated. For the above commit I happend to find the names are not totally random and exploited that the 4-th character is always numbers, but this was only fortune.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。