Skip to content

deepcode2019/secureElectron

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Electron加固

asar加密

方式:重编译源码

步骤:1. 生成asar时,对文件进行aes加密;2.修改electron源码中读取asar中文件的逻辑,先解密再读取

优点:仍能保证运行时错误定位

缺点:1.编译复杂;2.不同electron版本要重新编译;3.增加启动时间

示例的代码运行环境:electron-v11

字节码保护

方式:将代码解析编译为字节码,运行时读取;由于字节码二进制文件仍存在部分字符串,在字节码的基础上增加二进制混淆

优点:1.跨平台、兼容不同node版本;2.实现简单

缺点:1.基于Function.prototype.toString的函数无法使用(字节码本身的特性,禁用了此类函数);2.运行时错误定位受限制

snapshot保护

方式:将代码解析编译为二进制文件,运行时读取直接执行

优点:1.实现简单;2.缩短启动时间

缺点:1.不支持跨平台,不兼容不同node版本;2.运行时错误定位受限制;3.编译的文件不能过大,最大不能超过3个Jquery库的大小

About

Security reinforcement for Electron

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C++ 42.1%
  • TypeScript 33.0%
  • JavaScript 24.9%