-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME.txt
57 lines (45 loc) · 3.43 KB
/
README.txt
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
##################################################################
CSE 524
Name : Saketa Chandra Chalamchala
Project : Study of disassembly accuracy
##################################################################
disassemble.bat : batch disasssembly of binaries
Command to run : disassemble.bat <source directory of binaries> <destination directory where assembly code should be placed>
Application source code :
Source code for applications studied is under Applications/<Application_name>
Results of Comparison :
Results of comparing assembly code generated during compilation and assembly code generated by IDA Pro are under results = ComparisonResults/<Application_name>
Folder Structure :
$results/obj - .o files used in study
$results/dlls/original - dll files used in study
$results/dlls/full - stripped dll files used in study
$results/asms/original - .asm generated during compilation
$results/asms/disassembled - .asm files generated by disassembling .o files of alppication
$results/asms/original_dll - .asm files generated by disassembling .dll files of alppication
$results/asms/full_dll - .asm files generated by disassembling stripped .dll files of alppication
$results/formatted/original - formatted $results/asms/original files (generated by python code) used for comparison
$results/formatted/disassembled - formatted $results/asms/disassembled files (generated by python code) used for comparison
$results/Diff - results of comparing(we are comparing sequence of operations performed in functions) formatted .asm files (generated by python code).
Format of file :
<function_name>
original code : operators separated by '|' delimiter in original asms
disassembled code : operators separated by '|' delimiter in disassembled asm
end
Code for Comparison :
Python code to compare formatted .asm files is present under Python_Source_for_Comparison/
Sometimes, 'Beyond Compare' tool was used for comparison
Files :
Diff.py - compares formatted assembly code and writes the output to a file in $results/Diff location
Command : Diff.py <directory of formatted original asm files> <directory of formatted disassembled asm files> <Diff directory>
IDAcmdfile.py - formats .asm files generated using disassemble.bat to be used as input for Diff.py
Command : IDAcmdfile.py <directory of .asm files> <directory of formatted .asm files>
OBJfile.py - formats .asm files generated on compiling code using Visual Studio to be used as input for Diff.py
Command : OBJfile.py <directory of .asm files> <directory of formatted .asm files>
OBJgccfile.py - formats .asm files generated on compiling code using gcc to be used as input for Diff.py
Command : OBJgccfile.py <directory of .asm files> <directory of formatted .asm files>
Diff_dll_format.py - formats .asm files generated by IDA Pro to have only a sequence of operands and nothing else
Command : Diff_dll_format.py <directory of .asm files> <directory of formatted .asm files>
formate_VS_asm.py - formats .asm files generated during source code compilation to have only a sequence of operands and nothing else
Command : formate_VS_asm.py <directory of .asm files> <directory of formatted .asm files>
Comparison of formatted files was done using 'Beyond Compare' tool
##################################################################################################################