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

【致命】发现一个致命的问题,既然加密是为了交付,假如三方直接登入机器dumpjava内存,一下就看到秘钥了。 #121

Open
kingsant opened this issue Mar 30, 2023 · 2 comments

Comments

@kingsant
Copy link

【致命】发现一个致命的问题,既然加密是为了交付,假如三方直接登入机器dumpjava内存,一下就看到秘钥了。
被这个给坑了~给大家推荐graalvm

@Bahramudin
Copy link

@kingsant 我用Graalvm,可是MyBatis不支持,你有办法吗,我编译什么的都正常结束,可是运行可执行文件文件的时候报如下错:

java.lang.ExceptionInInitializerError: null
        at org.mybatis.spring.mapper.MapperScannerConfigurer.postProcessBeanDefinitionRegistry(MapperScannerConfigurer.java:363) ~[web.exe:3.0.1]
        at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:344) ~[na:na]
        at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:145) ~[na:na]
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:747) ~[web.exe:6.0.8]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:565) ~[web.exe:6.0.8]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[web.exe:3.0.6]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:732) ~[web.exe:3.0.6]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:434) ~[web.exe:3.0.6]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:310) ~[web.exe:3.0.6]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1304) ~[web.exe:3.0.6]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1293) ~[web.exe:3.0.6]
        at com.adil.bms.web.BmsApplication.main(BmsApplication.java:19) ~[web.exe:na]
Caused by: org.apache.ibatis.logging.LogException: Error creating logger for logger org.mybatis.spring.mapper.ClassPathMapperScanner.  Cause: java.lang.NullPointerException
        at org.apache.ibatis.logging.LogFactory.getLog(LogFactory.java:54) ~[na:na]
        at org.apache.ibatis.logging.LogFactory.getLog(LogFactory.java:47) ~[na:na]
        at org.mybatis.logging.LoggerFactory.getLogger(LoggerFactory.java:32) ~[na:na]
        at org.mybatis.spring.mapper.ClassPathMapperScanner.<clinit>(ClassPathMapperScanner.java:61) ~[na:na]
        ... 12 common frames omitted
Caused by: java.lang.NullPointerException: null
        at org.apache.ibatis.logging.LogFactory.getLog(LogFactory.java:52) ~[na:na]
        ... 15 common frames omitted

如果您有办法的话 教我怎么解决,Graalvm确实是很棒,非常安全 没法反编译什么的。可是MyBatis不支持 非常糟糕。

@huyangv
Copy link

huyangv commented Oct 30, 2023

1 -DisableAttachMechanism 启动,同时自己编译一个jdk版本,将一个特殊的文件的md5(比如java.exe)编码进go文件,然后自己写代码校验jdk和md5
2 混淆构建xjar的go代码 而不是直接go build

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

3 participants