|
SandMark version 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sandmark.Algorithm | +--sandmark.obfuscate.GeneralObfuscator | +--sandmark.obfuscate.AppObfuscator | +--sandmark.obfuscate.ArrayObfuscation.IntArraySplitter
IntArraySplitter ,as the name suggests , does Data Obfuscation by splitting an integer array in the original program into two arrays ,and based on some encoding meothd , the elements are put in either of the two arrays .The current implementation suppots the following form of encoding : Even elements are put in one array and odd in another
Field Summary | |
(package private) int |
arr_assign_end
|
(package private) int |
arr_assign_start
|
(package private) int |
arr1_lvindex
|
(package private) int |
arr2_lvindex
|
(package private) int |
arraycount
|
(package private) byte |
arraytype
|
(package private) int |
cur_mtd
|
(package private) int |
delcount
|
(package private) de.fub.bytecode.generic.Instruction[] |
in
|
(package private) int |
increase
|
(package private) int |
len_of_array
|
(package private) int |
lvindex
|
(package private) int |
no_of_locals
|
(package private) int |
poscount
|
(package private) int |
returnhandle
|
(package private) de.fub.bytecode.generic.InstructionHandle[] |
todel
|
Constructor Summary | |
IntArraySplitter()
Constructor |
Method Summary | |
int |
addDynaNewArr(byte type,
int xastores_offset,
int lens_offset,
int newarrays_offset,
de.fub.bytecode.generic.InstructionList local_il,
int[] local_pos,
de.fub.bytecode.generic.ConstantPoolGen cpg1)
If the array 's length will be known only at runtime , use this meothd to add two new integer arrays and delete the old array |
int |
addNewArrays(byte type,
int xastores_offset,
int lens_offset,
de.fub.bytecode.generic.InstructionList local_il,
int[] local_pos,
de.fub.bytecode.generic.ConstantPoolGen cpg1)
Add two new integer arrays and delete the old array |
void |
adjustArrLengths()
|
void |
adjustArrReads()
|
void |
adjustArrWrites()
|
void |
apply(ClassFileCollection cfc)
Calls the other methods to obfuscate the class file |
void |
arr_creat_split()
The main function that coordinates the calls to all other functinos which actually do the algorithm |
de.fub.bytecode.generic.InstructionList |
createIndexIlist(int sip,
int eip,
de.fub.bytecode.generic.InstructionList local_il,
int[] local_pos)
|
de.fub.bytecode.generic.InstructionList |
createValueIlist(de.fub.bytecode.generic.InstructionHandle[] val,
de.fub.bytecode.generic.InstructionList local_il,
int[] local_pos)
|
int |
deleteIlist(int sip,
int eip,
de.fub.bytecode.generic.InstructionList local_il,
int[] local_pos)
|
int |
editingReads(de.fub.bytecode.generic.InstructionList local_il,
int[] local_pos,
int aloadsoffset,
int ialoadsoffset)
|
int |
editlength(de.fub.bytecode.generic.InstructionList local_il,
int[] local_pos,
int aloads_offset)
|
int |
finish_insert(de.fub.bytecode.generic.InstructionList local_il,
int[] local_pos,
int aloads_offset,
int Ilistlen,
int Vlistlen,
de.fub.bytecode.generic.InstructionList Ilist,
de.fub.bytecode.generic.InstructionList Vlist,
int cur_xastore_ip)
|
java.lang.String |
getAlgHTML()
Gives a description of what the algorithm does. |
java.lang.String |
getAlgURL()
Specifies the URL of where the user can find more information about the algorithm. |
java.lang.String |
getAuthor()
Specifies the author of the algorithm. |
java.lang.String |
getAuthorEmail()
Specifies the email address author of the algorithm. |
ConfigProperties |
getConfigProperties()
Get the properties of NodeSplitter |
java.lang.String |
getDescription()
Specifies what this algorithm does, briefly. |
int |
getLength(int i,
de.fub.bytecode.generic.Instruction[] l)
Obtain the length of an array ,whose length is constant ,from bytecode |
java.lang.String |
getLongName()
Specifies this algorithm's long name. |
ModificationProperty[] |
getMutations()
Specifies the types of modifications that the algorithm makes. |
java.lang.String |
getShortName()
Specifies this algorithm's short name. |
int |
initialize(ClassFileCollection cfc,
java.lang.String classname)
Gets all the BCEL bytecode editing class objects up and running |
int |
insert_iby_2(de.fub.bytecode.generic.InstructionList local_il,
int[] local_pos,
int index_end_ip,
int incr_tillnow)
|
void |
setConfigProperties(ConfigProperties props)
Set the properties of NodeSplitter |
int |
setIndex(int aload,
de.fub.bytecode.generic.InstructionList local_il,
int[] local_pos,
de.fub.bytecode.generic.InstructionHandle ih)
|
void |
split(int dup,
int xstore,
int flag,
byte arrtype)
|
boolean |
testifok(de.fub.bytecode.generic.Instruction[] local_in,
int[] local_pos,
de.fub.bytecode.generic.InstructionList local_il,
de.fub.bytecode.generic.ConstantPoolGen cpg1,
de.fub.bytecode.generic.MethodGen local_mg)
The future work will include the integration of Array Merging with Array Splitting. |
Methods inherited from class sandmark.obfuscate.AppObfuscator |
toString |
Methods inherited from class sandmark.Algorithm |
getPostprohibited, getPostrequisites, getPostsuggestions, getPreprohibited, getPrerequisites, getPresuggestions, getReferences |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
de.fub.bytecode.generic.Instruction[] in
de.fub.bytecode.generic.InstructionHandle[] todel
int arraycount
int returnhandle
int no_of_locals
int len_of_array
int arr1_lvindex
int arr2_lvindex
int arr_assign_start
int arr_assign_end
int lvindex
int poscount
int delcount
byte arraytype
int increase
int cur_mtd
Constructor Detail |
public IntArraySplitter()
Method Detail |
public int initialize(ClassFileCollection cfc, java.lang.String classname)
cfc
- classname
- public int getLength(int i, de.fub.bytecode.generic.Instruction[] l)
i
- Offset of the newarray instructionl
- Instruction array for this method .public int addDynaNewArr(byte type, int xastores_offset, int lens_offset, int newarrays_offset, de.fub.bytecode.generic.InstructionList local_il, int[] local_pos, de.fub.bytecode.generic.ConstantPoolGen cpg1)
type
- The type of the arrayxastores_offset
- lens_offset
- The offset in bytecode where you can find the instruction that specifies the length of the arraylocal_il
- Instruction List Arraylocal_pos
- Instruction Position Arraycpg1
- ConstantPoolGenpublic int addNewArrays(byte type, int xastores_offset, int lens_offset, de.fub.bytecode.generic.InstructionList local_il, int[] local_pos, de.fub.bytecode.generic.ConstantPoolGen cpg1)
type
- The type of the arrayxastores_offset
- lens_offset
- The offset in bytecode where you can find the instruction that specifies the length of the arraylocal_il
- Instruction List Arraylocal_pos
- Instruction Position Arraycpg1
- ConstantPoolGenpublic int setIndex(int aload, de.fub.bytecode.generic.InstructionList local_il, int[] local_pos, de.fub.bytecode.generic.InstructionHandle ih)
public int deleteIlist(int sip, int eip, de.fub.bytecode.generic.InstructionList local_il, int[] local_pos)
public int insert_iby_2(de.fub.bytecode.generic.InstructionList local_il, int[] local_pos, int index_end_ip, int incr_tillnow)
public int finish_insert(de.fub.bytecode.generic.InstructionList local_il, int[] local_pos, int aloads_offset, int Ilistlen, int Vlistlen, de.fub.bytecode.generic.InstructionList Ilist, de.fub.bytecode.generic.InstructionList Vlist, int cur_xastore_ip)
public int editingReads(de.fub.bytecode.generic.InstructionList local_il, int[] local_pos, int aloadsoffset, int ialoadsoffset)
public void adjustArrLengths()
public int editlength(de.fub.bytecode.generic.InstructionList local_il, int[] local_pos, int aloads_offset)
public void adjustArrReads()
public void adjustArrWrites()
public de.fub.bytecode.generic.InstructionList createIndexIlist(int sip, int eip, de.fub.bytecode.generic.InstructionList local_il, int[] local_pos)
public de.fub.bytecode.generic.InstructionList createValueIlist(de.fub.bytecode.generic.InstructionHandle[] val, de.fub.bytecode.generic.InstructionList local_il, int[] local_pos)
public void split(int dup, int xstore, int flag, byte arrtype)
public void arr_creat_split()
public boolean testifok(de.fub.bytecode.generic.Instruction[] local_in, int[] local_pos, de.fub.bytecode.generic.InstructionList local_il, de.fub.bytecode.generic.ConstantPoolGen cpg1, de.fub.bytecode.generic.MethodGen local_mg)
local_in
- Instruction Arraylocal_il
- Instruction List Array (editing purposes)local_pos
- Instruction Position Arraycpg1
- ConstantPoolGenlocal_mg
- MethodGenpublic void apply(ClassFileCollection cfc) throws java.lang.Exception
apply
in class AppObfuscator
cfc
-
java.lang.Exception
public ModificationProperty[] getMutations()
Algorithm
ModificationProperty
.
getMutations
in class Algorithm
public ConfigProperties getConfigProperties()
getConfigProperties
in class Algorithm
public void setConfigProperties(ConfigProperties props)
setConfigProperties
in class Algorithm
props
- public java.lang.String getShortName()
Algorithm
getShortName
in class Algorithm
public java.lang.String getDescription()
Algorithm
getDescription
in class Algorithm
public java.lang.String getAuthor()
Algorithm
getAuthor
in class Algorithm
public java.lang.String getAuthorEmail()
Algorithm
getAuthorEmail
in class Algorithm
public java.lang.String getLongName()
Algorithm
getLongName
in class Algorithm
public java.lang.String getAlgHTML()
Algorithm
getAlgHTML
in class Algorithm
public java.lang.String getAlgURL()
Algorithm
getAlgURL
in class Algorithm
|
SandMark version 3.0 Wed Jan 29 10:30:05 MST 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |