Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

加固后性能问题 #119

Open
mythoi opened this issue Sep 20, 2024 · 3 comments
Open

加固后性能问题 #119

mythoi opened this issue Sep 20, 2024 · 3 comments

Comments

@mythoi
Copy link

mythoi commented Sep 20, 2024

作者你好,我用你这个工具加固apk,只加固了包名下的所有类,apk运行时很卡顿,时不时应用停止运行,请问怎么分析问题出在哪呢?

@maoabc
Copy link
Owner

maoabc commented Sep 20, 2024

指令虚拟化就是局部加固重要逻辑的,不适合用于全局,demo全加固只不过为了验证兼容性。第三方开源库,大量数组相关操作这些别转换。加固第三方开源库纯粹给逆向分析的人提供指令映射关系,数组相关操作效率极低。

@mythoi
Copy link
Author

mythoi commented Sep 23, 2024

指令虚拟化就是局部加固重要逻辑的,不适合用于全局,demo全加固只不过为了验证兼容性。第三方开源库,大量数组相关操作这些别转换。加固第三方开源库纯粹给逆向分析的人提供指令映射关系,数组相关操作效率极低。

感谢大佬回复,我把包含数组操作相关的函数过滤掉就可以了,除了数组操作比较耗时还有其他的耗时操作吗?
if (instruction.getOpcode()== Opcode.AGET ||instruction.getOpcode()== Opcode.AGET_BOOLEAN||instruction.getOpcode()== Opcode.AGET_BYTE||instruction.getOpcode()== Opcode.AGET_CHAR ||instruction.getOpcode()== Opcode.AGET_OBJECT||instruction.getOpcode()== Opcode.AGET_WIDE||instruction.getOpcode()== Opcode.AGET_SHORT ||instruction.getOpcode()== Opcode.APUT||instruction.getOpcode()== Opcode.APUT_BOOLEAN||instruction.getOpcode()== Opcode.APUT_BYTE||instruction.getOpcode()== Opcode.APUT_CHAR ||instruction.getOpcode()== Opcode.APUT_OBJECT||instruction.getOpcode()== Opcode.APUT_WIDE||instruction.getOpcode()== Opcode.APUT_SHORT)

@maoabc
Copy link
Owner

maoabc commented Sep 23, 2024

其他没那么明显,还有就是循环中反复创建,删除引用,这个基本没法自动处理。实际使用时尽量缩小加固范围。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants