-
Notifications
You must be signed in to change notification settings - Fork 4
/
example_config.yml
112 lines (92 loc) · 4.19 KB
/
example_config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# Example config.
# List of jar files that should be obfuscated, optionally with the output path for each one.
sources:
- example_jar_0:
input: obfuscate_me.jar
output: obfuscated.jar
- example_jar_1:
input: obfuscate_me_too.jar
output: also_obfuscated.jar
# Optional output jar, default is to append `-obf` to the filename (before the `.jar` extension).
# output: waterqueue.jar
# List of jar files to be used for inheritance information
# Directories can be specified, in which case they will be recursively searched for jar or zip files to include
libraries:
- required_library.jar
# List of class names to be completely ignored by the obfuscator
# This will help peformance but may prevent remapping from properly taking place
# Because of this I suggest you only do this for classes that are called but never inherited
hardExclusions:
- com/example/library/
# Rename identifiers
remap:
enabled: true
dictionary: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
classes: true # obfuscate class names
methods: true # obfuscate method names
fields: true # obfuscate field names
localVariables: true # obfuscate local variable names
obfuscateEnums: true # obfuscate enum names
classPrefix: "FIELD"
methodPrefix: "CLASS"
fieldPrefix: "METHOD"
localVariableName: "" # can be emptyto delete local variable names
aggressiveOverloading: false # aggresively overload names (may break)
# per transformer exclusions inherit the root exclusions and can add to them
exclusions:
- com/example/application/reflection
# Remove source debug information (used in stacktraces)
sourceStrip:
enabled: true
lineNumbers: REMOVE # or KEEP. Specifies whether to remove line numbers. Keeping them can help stack traces.
# Remove extra information stored by the kotlin compiler
kotlinMetadata:
enabled: true
type: REMOVE # or CENSOR. Either remove
# Crash reverse engineering tools like decompilers and dissasemblers
crasher:
enabled: true
checksums: true # crash some zip archiving tools
decompilers: true # crash some decompilers
antiAsm: true # crash the ow2 ASM library. May not work in conjunction with tools like Spigot and Forge
recaf: true # hinder the functionality of the Recaf tool
# Ture static method calls into dynamic ones. Makes static reverse engineering of execution flow significantly harder.
indirection:
enabled: true
# Encrypt strings and dynamically decrypt them at runtime (with anti tampering checks)
stringObfuscation:
enabled: true
# Substitute arithmetic operations with mixed boolean substitutes
arithmetic:
enabled: true
repeat: 3 # number of times to apply the arithmetic obfuscation (exponential). Around 2-4 is good.
# Obscure the control flow of the application
flowObfuscation:
enabled: true
severity: 5 # lower = more severe, larger file size, slower peformance; higher = less severe...
mergeMethods: BLOAT_CLASSES # or EXISTING_CLASSES/NONE. Relocates methods into new classes, creating confusing methods that do not match the class they are situated in
arithmetic: false # old arithmetic obfuscation, now legacy
noverify: false # create unverifiable bytecode that is very hard to decompile or dissasemble. Requires output application to be run with -noverify argument.
java8: false # If the application only targets java 8 virtual machines by setting this to true the output application will NOT have to be run with -noverify
# Add additional arguments to method parameters which will be used for flow obfuscation.
# This will make static analysis hard as the arguments will have to be retrieved from callsites
methodParameter:
enabled: true
# Some minor peformance optimisations
optimisation:
enabled: true
mutableEnumValues: false # optimise enum values() method. May have unintended consequences if the returned array is modified
# Obfuscate number constants
numberObfuscation:
enabled: true
# Ignore warning errors about classes not being present in classpath
ignoreClassPathNotFound: false
# Use the java class loader to load libraries (not recommended)
useJavaClassloader: false
# Shuffle output
shuffleClasses: true
shuffleMethods: true
shuffleFields: true
resetLineProgress: true
printProgress: true
watermark: true