当前位置: 首页 > news >正文

好看的网站界面设计公众号如何推广引流

好看的网站界面设计,公众号如何推广引流,WordPress渗透思路,建设银行流水网站文章目录 前言问题代码混淆存在的问题Java类文件加密存在的问题虚拟化保护存在的问题AOT编译存在的问题 Java应用的打包混淆器类加载与类加密Bootstrap Class LoaderExtension Class LoaderSystem Class Loader自定义ClassLoaderprotector4j 加壳采用Golang打包Java程序xjar 参…

文章目录

    • 前言
    • 问题
      • 代码混淆存在的问题
      • Java类文件加密存在的问题
      • 虚拟化保护存在的问题
      • AOT编译存在的问题
    • Java应用的打包
    • 混淆器
    • 类加载与类加密
      • Bootstrap Class Loader
      • Extension Class Loader
      • System Class Loader
      • 自定义ClassLoader
      • protector4j
    • 加壳
    • 采用Golang打包Java程序
      • xjar
    • 参考链接

前言

自从Java诞生以来,其字节码容易被反编译的问题就为程序员所诟病。由此也诞生了不少Java混淆工具和加壳软件。

最关键的一个问题,采用import语句的类,能否被URLClassLoader加载机制替换掉?也就是,一个jar包中,如果我将一部分class移走,这部分class采用自定制的ClassLoader加载,是否可行?如果可行,那我将这部分class通过golang写的server输出,就差不多解决了一半的被破解问题。

问题

代码混淆存在的问题

由于JVM字节码的高语义性,使得期极为容易被分析与阅读,使用动态调试的方式可以很容易分析出其运行逻辑,而动态调试工具的编写并不是一件十分复杂的事情,因此混淆并不是一种可靠的保护方案。

Java类文件加密存在的问题

由于JVM附加机制的存在,所有未脱离普通JVM运行的所谓加密代码,都可以使用附加工具轻松读取,因此这是一种最无效的保护方案。
普通的JVM都带有附着自制,用户可以使用jhsdb这类工具,附着到JVM进程,对其内存数据进行查看和分析,并且这些内存数据还是按照源文件中的数据结构被妥善组织好的,这也可以理解为JVM自带的一种后门机制。下面这篇文章介绍了如何使用JVM附着机制读取并保存内存中的类文件信息。https://protector4j.com/articles/cracking-encrypted-java-applications-jhsdb/

除了可以使用JDK自带的jhsdb工具之外,还可以使用阿里巴巴的Arthas对运行中的Java进程进行分析。

虚拟化保护存在的问题

虚拟化保护是强度最高的一种代码保护方式,但是由于期对性能的严重影响,因此无法应用到程序中的全部代码,而只能保护关键代码,其他代码仍然有暴露的风险,而以其他部分代码来切入口,就可以获取到虚拟化部分代码的功能信息。

AOT编译存在的问题

AOT编译配置难度大,编译难度大,编译失败概率高,即使编译成功,代码逻辑也仅是由原来的字节码表示转换为机器代码表示,其本身的运行逻辑仍然存在,并没有进行特别的保护,如果能够了解其本身的编译与运行机制,仍然能够逆向还原出可读性的代码。

Java应用的打包

  • exe4j
  • launch4j
  • JSmooth: 已经过时了
  • jpackage:JDK自带的打包工具
  • Installer工具:Inno Setup、NSIS(https://sourceforge.net/projects/nsis/)

混淆器

代码混淆是最早应用于Java代码保护的方案,也是一个最直接的方案。代码混淆通常有下面四种方法:

  • 包名、类名、变量名转换
  • 控制结构改变,如控制流平坦化、添加不可变谓词等
  • 字符串混淆或加密
  • 添加无用代码

代码混淆可以大幅降低反编译代码的可读性,提升静态分析的难度,但是无论如何进行代码混淆,程序的运行逻辑是不会改变的。
JVM字节码上是一种语义很清晰明确,且极为阅读的中间代码,对于被混淆的class文件,即使无法还原成可读的Java源代码,仍然可以在字节码层面进行分析,由于Java字节码的高语义性,这个过程其实还是比较容易的。

下面是一些常见的开源的和商业的混淆工具:

  • ProGuard is a popular open-source GPL-licenced bytecode optimizer and file shrinker for Java and Kotlin. It claims to make these applications up to 90% smaller and 20% faster. It also provides some minimal obfuscation by renaming classes, fields and methods. Android Studio uses ProGuard automatically. ProGuard,一款shrinker(压缩:检测和删除没有使用的类,字段,方法和属性), optimizer(优化:对字节码进行优化,并且移除无用指令), obfuscator(混淆:使用a,b,c等无意义的名称,对类,字段和方法进行重命名), and preverifier(审核:在Java平台上对处理后的代码进行预检)工具。缩短进程检测并删去未运用的类、字段、办法和特点。优化器 进程优化字节码并删去未运用的指令。混杂进程运用简短无意义的称号重命名剩余的类、字段和办法。最后的预验证进程将预验证信息增加到类中,这是 Java Micro Edition 和 Java 6 及更高版别所必需的。
  • yGuard is another commonly used open-source obfuscator.
  • ZKM(Zelix KlassMaster) is a full featured commercial Java obfuscator. It shrinks and obfuscates both code and string constants.
  • Allatori is a commercial second generation Java obfuscator. 第二代Java混淆器。所谓第二代混淆器,不仅仅能进行字段混淆,还能实现流混淆。
  • DashO Java and Android Obfuscator is a commercial second generation Java obfuscator. DashO-Pro是第三代的Java混淆器(obfuscator)、压缩机(compactor)、优化工具和水印工具(watermarker)。它能有效保护和防止Java程序被反编译和篡改,是Java代码保护的理想选择。DashO-Pro除了为Java代码提供领先的代码保护外,它还将应用程序的大小缩减到原文件的70%。如果您正在找寻为您的Java程序提供反编译保护、提高运行速度和减少程序体积的办法,那么我们推荐您使用DashO。DashO是一个Java和Android的混用程序,它提供企业级应用的加固和屏蔽,大大降低了知识产权盗窃、数据盗窃、盗版和篡改的风险。分层混淆,加密,水印,自动失效,反调试,反篡改,反仿真器,反挂钩,反根设备解决方案,为世界各地的应用程序提供保护。
  • Stringer Java Obfuscation Toolkit is a commercial Java obfuscator supporting up to Java 13.

There is an easy-to-read introductory article with extra links on bytecode obfuscation on the OWASP Foundation’s website. Another good introductory article on obfuscation techniques is on the DashO website.

名称License地址
yGuardLGPLhttp://www.yworks.com/products/yguard
ProGuardGPLv2https://www.guardsquare.com/en/proguard
Facebook ProGuard分支GPLv2https://github.com/facebook/proguard
DashOCommercialhttps://www.preemptive.com/products/dasho
AllatoriCommercialhttp://www.allatori.com
StringerCommercialhttps://jfxstore.com
Java AntidecompilerCommercialhttp://www.bisguard.com/help/java/
Zelix KlassMasterCommercialhttp://www.zelix.com

类加载与类加密

先来了解一下Java类加载器的基本常识。三种调用会导致JVM加载一个类: new一个对象、Class.forName()、classLoader.loadClass(),而在文件头import语句只是声明,不会导致类加载。

Bootstrap Class Loader

Bootstrap class loader serves as the parent of all the other ClassLoader instances. This bootstrap class loader is part of the core JVM and is written in native code. 不同平台有不同的实现。

It’s mainly responsible for loading JDK internal classes, typically rt.jar and other core libraries located in the $JAVA_HOME/jre/lib directory.

Extension Class Loader

The extension class loader is a child of the bootstrap class loader, and takes care of loading the extensions of the standard core Java classes so that they’re available to all applications running on the platform.

The extension class loader loads from the JDK extensions directory, usually the $JAVA_HOME/lib/ext directory, or any other directory mentioned in the java.ext.dirs system property.

System Class Loader

The system or application class loader, on the other hand, takes care of loading all the application level classes into the JVM. It loads files found in the classpath environment variable, -classpath, or -cp command line option. It’s also a child of the extensions class loader.

自定义ClassLoader

java -Djava.system.class.loader
=com.test.YourCustomClassLoader com.test.YourMainClass

protector4j

Protector4J可以通过加密类来保护您的java源代码,它通过修改JVM创建了一个自定义的本地ClassLoader。Java类由AES加密,并在本地ClassLoader中解密。并且它还引入了一些机制来提高破解的难度。

加密您的代码可以保护您的知识产权,并大大提高您的应用程序的安全性。它使得IP盗窃、代码篡改和安全漏洞的发现涉及到昂贵的逆向工程努力,而实际上任何人都可以下载并运行一个免费的Java反编译器。

Protector4J也可以帮助您为Windows,Linux,macOS创建您的Java App的可执行包装器。

VLINX Protector4J is a tool to prevent Java applications from decompilation. Protector4J provides a custom native ClassLoader by modifying the JVM. The Java classes are encrypted by AES and decrypted in the native ClassLoader.

几个特点:

  • 私有压缩文档格式: JARX
  • 自定义JRE仅支持加载JARX文件
  • 禁用JVM的远程附加机制
  • 二进制代码级别的保护

JARX文件是protector4j专有存档文件格式,它使用与Zip相同的Deflate压缩算法,并使用AES加密算法来加密数据。
JARX文件的结构与所有存档文件类型相似,由条目组成,这些条目以我们的专有方式组织,条目的名称和内容使用AES算法进行加密。
由于JARX文件格式并未公开,且条目的内容和名称已加密,且没有工具可以直接解压和JARX文件,因此使用JARX文件不仅可以保护您的类文件的内容,还可以保护整个JAR文件的结构,即外界甚至无法获取您的类的名称,这将使其更难以破解。

加壳

https://gitee.com/chejiangyi/jar-protect

在这里插入图片描述

在这里插入图片描述

采用Golang打包Java程序

Golang
binary-go就是其中一个合适的选择

go get -u github.com/samuelngs/binary-go

安装完之后,我们执行

binary -dir ./[静态文件位置] -out binary

就会产生出许多的go文件,默认它是以20M为一个进行分拆的。

package mainimport (_ "embed""fmt""os""os/exec"
)//go:embed binary
var f []bytefunc main() {_ = os.WriteFile("foobar", f, 0755)out, _ := exec.Command("./foobar").Output()fmt.Printf("Output: %s\n", out)
}
cmd := exec.Command("java", "-jar", "Astro.jar", "1924 12 12 23 23 23 74.34 34.67")
fmt.Println(cmd.Start())

xjar

xjar的原理是将jar包加密,然后执行的时候再加密,而密钥存放在外部的go可执行文件中。加密和解密都是由java程序完成。

参考链接

  • https://github.com/segator/jbinary
  • go-jdk:Run JVM-based code in Go efficiently
  • https://github.com/core-lib/xjar
  • https://github.com/lqs1848/AllatoriCrack.git
  • https://yworks.github.io/yGuard/
  • https://protector4j.com/
  • https://blog.csdn.net/weixin_35569158/article/details/114567793

文章转载自:
http://dinncodispleasing.stkw.cn
http://dinncolignitoid.stkw.cn
http://dinncopigmental.stkw.cn
http://dinncoeject.stkw.cn
http://dinncoflump.stkw.cn
http://dinncohaematocele.stkw.cn
http://dinncoantihero.stkw.cn
http://dinncosatsang.stkw.cn
http://dinncorestriction.stkw.cn
http://dinncovalgus.stkw.cn
http://dinncownp.stkw.cn
http://dinncooutbluff.stkw.cn
http://dinncohabit.stkw.cn
http://dinncoatheoretical.stkw.cn
http://dinncoivory.stkw.cn
http://dinncogloss.stkw.cn
http://dinncorajahship.stkw.cn
http://dinncorestructure.stkw.cn
http://dinncorockwork.stkw.cn
http://dinncoreinhold.stkw.cn
http://dinncotrimonthly.stkw.cn
http://dinncowhig.stkw.cn
http://dinncosibu.stkw.cn
http://dinncotahr.stkw.cn
http://dinncoelectromeric.stkw.cn
http://dinncodoubtful.stkw.cn
http://dinncomacrology.stkw.cn
http://dinncoprobing.stkw.cn
http://dinncozoot.stkw.cn
http://dinncoscowly.stkw.cn
http://dinncopapal.stkw.cn
http://dinncoassault.stkw.cn
http://dinncogertcha.stkw.cn
http://dinncohighland.stkw.cn
http://dinncomaxi.stkw.cn
http://dinncotranspire.stkw.cn
http://dinncoontogenesis.stkw.cn
http://dinncoamoeban.stkw.cn
http://dinncohotspur.stkw.cn
http://dinncobrewis.stkw.cn
http://dinncodominie.stkw.cn
http://dinncosketchbook.stkw.cn
http://dinncoterebrate.stkw.cn
http://dinncoboccia.stkw.cn
http://dinncoovertime.stkw.cn
http://dinncospermatozoa.stkw.cn
http://dinncoviaduct.stkw.cn
http://dinncoperivascular.stkw.cn
http://dinncoankh.stkw.cn
http://dinncohydrodynamicist.stkw.cn
http://dinncobackslid.stkw.cn
http://dinncoreckoner.stkw.cn
http://dinncoserendipper.stkw.cn
http://dinncognosticism.stkw.cn
http://dinncovertimeter.stkw.cn
http://dinncoinaugurate.stkw.cn
http://dinncokebbok.stkw.cn
http://dinncoelavil.stkw.cn
http://dinncogolf.stkw.cn
http://dinncoexercitorial.stkw.cn
http://dinncopenis.stkw.cn
http://dinncobathe.stkw.cn
http://dinncobrno.stkw.cn
http://dinncoanthropophagite.stkw.cn
http://dinncoabsinthin.stkw.cn
http://dinncostressor.stkw.cn
http://dinncohouseboy.stkw.cn
http://dinncospending.stkw.cn
http://dinncoasid.stkw.cn
http://dinncowall.stkw.cn
http://dinncoacrodromous.stkw.cn
http://dinncosalvador.stkw.cn
http://dinncoini.stkw.cn
http://dinncopolysemous.stkw.cn
http://dinncoulotrichan.stkw.cn
http://dinncogalatia.stkw.cn
http://dinncokankan.stkw.cn
http://dinncohemihydrate.stkw.cn
http://dinncobandage.stkw.cn
http://dinncodatura.stkw.cn
http://dinncodaintily.stkw.cn
http://dinncosymbolical.stkw.cn
http://dinncoviscerotonic.stkw.cn
http://dinncorepand.stkw.cn
http://dinncoapocope.stkw.cn
http://dinncosemioctagonal.stkw.cn
http://dinncofellmonger.stkw.cn
http://dinncowedlock.stkw.cn
http://dinncotownspeople.stkw.cn
http://dinncocraniectomize.stkw.cn
http://dinncoasper.stkw.cn
http://dinncokursaal.stkw.cn
http://dinncousnea.stkw.cn
http://dinncocheapness.stkw.cn
http://dinncophenocain.stkw.cn
http://dinncoalertness.stkw.cn
http://dinncodoorstone.stkw.cn
http://dinncohippiatrist.stkw.cn
http://dinncoghoul.stkw.cn
http://dinncosuccour.stkw.cn
http://www.dinnco.com/news/108025.html

相关文章:

  • 广州网站建设亅新科送推广福建网络seo关键词优化教程
  • 都江堰网站开发百度问一问官网
  • django商城网站开发的功能全国疫情高峰感染高峰
  • 网站建设相关技术市场调研报告怎么写范文
  • 小企业网站建设怎样合肥网站优化公司
  • 南通购物网站建设网站怎么接广告
  • 深圳建模板网站app营销推广方案
  • 佛山 顺德网站设计网络营销课程培训课程
  • 找合伙人做红木家具网站百度软件下载中心官方网站
  • 建设电商网站流程武汉seo工厂
  • wordpress定制seo专员工资一般多少
  • 北京 科技网站建设百度指数查询排行榜
  • 一个独立IP做几个网站比较合适搜一搜搜索
  • 网站怎么适配移动端指数基金怎么买
  • 中国建设银行网站解绑手机南宁seo优化
  • wordpress评论显示分页重庆百度seo代理
  • 网站建设商家同城广告发布平台
  • 废旧网站那个做的最好掉发脱发严重是什么原因
  • 做一个网站需要多少钱 怎么做网络舆情处置的五个步骤
  • 雄安网站开发优化整站
  • 阿里云邮箱企业邮箱seo短视频发布页
  • 有域名自己做网站吗公司网站优化方案
  • 唐山做网站口碑好的厦门做网站公司有哪些
  • 网站建设基本流程包括海外新闻发布
  • 学习建设网站难么网站收录查询
  • 注册域名之后怎么使用夫唯seo培训
  • 网站建设 中小企业短视频seo搜索优化
  • 东莞债务优化公司采集站seo赚钱辅导班
  • 南海营销网站开发全网营销推广服务
  • 一个网站域名多少钱口碑营销有哪些方式