├── DWARF ├── Branch_Obfs │ ├── ReadMe.md │ ├── main.cpp │ └── main.s └── Expression │ └── ReadMe.md ├── ReadMe.md ├── experiments ├── DeObfs │ └── ACSAC2019 │ │ └── for │ │ ├── 1_file_0.c │ │ ├── 1_file_0.elf │ │ ├── 1_file_10.c │ │ ├── 1_file_10.elf │ │ ├── 1_file_12.c │ │ ├── 1_file_12.elf │ │ ├── 1_file_15.c │ │ ├── 1_file_15.elf │ │ ├── 1_file_18.c │ │ ├── 1_file_18.elf │ │ ├── 1_file_19.c │ │ ├── 1_file_19.elf │ │ ├── 1_file_22.c │ │ ├── 1_file_22.elf │ │ ├── 1_file_28.c │ │ ├── 1_file_28.elf │ │ ├── 1_file_3.c │ │ ├── 1_file_3.elf │ │ ├── 1_file_33.c │ │ ├── 1_file_33.elf │ │ ├── 1_file_35.c │ │ ├── 1_file_35.elf │ │ ├── 1_file_39.c │ │ ├── 1_file_39.elf │ │ ├── 1_file_45.c │ │ ├── 1_file_45.elf │ │ ├── 1_file_47.c │ │ ├── 1_file_47.elf │ │ ├── 1_file_5.c │ │ ├── 1_file_5.elf │ │ ├── 1_file_7.c │ │ ├── 1_file_7.elf │ │ ├── 2_file_0.c │ │ ├── 2_file_0.elf │ │ ├── 2_file_10.c │ │ ├── 2_file_10.elf │ │ ├── 2_file_12.c │ │ ├── 2_file_12.elf │ │ ├── 2_file_15.c │ │ ├── 2_file_15.elf │ │ ├── 2_file_18.c │ │ ├── 2_file_18.elf │ │ ├── 2_file_19.c │ │ ├── 2_file_19.elf │ │ ├── 2_file_22.c │ │ ├── 2_file_22.elf │ │ ├── 2_file_28.c │ │ ├── 2_file_28.elf │ │ ├── 2_file_3.c │ │ ├── 2_file_3.elf │ │ ├── 2_file_33.c │ │ ├── 2_file_33.elf │ │ ├── 2_file_35.c │ │ ├── 2_file_35.elf │ │ ├── 2_file_39.c │ │ ├── 2_file_39.elf │ │ ├── 2_file_45.c │ │ ├── 2_file_45.elf │ │ ├── 2_file_47.c │ │ ├── 2_file_47.elf │ │ ├── 2_file_5.c │ │ ├── 2_file_5.elf │ │ ├── 2_file_7.c │ │ ├── 2_file_7.elf │ │ ├── 3_file_0.c │ │ ├── 3_file_0.elf │ │ ├── 3_file_10.c │ │ ├── 3_file_10.elf │ │ ├── 3_file_12.c │ │ ├── 3_file_12.elf │ │ ├── 3_file_15.c │ │ ├── 3_file_15.elf │ │ ├── 3_file_18.c │ │ ├── 3_file_18.elf │ │ ├── 3_file_19.c │ │ ├── 3_file_19.elf │ │ ├── 3_file_22.c │ │ ├── 3_file_22.elf │ │ ├── 3_file_28.c │ │ ├── 3_file_28.elf │ │ ├── 3_file_3.c │ │ ├── 3_file_3.elf │ │ ├── 3_file_33.c │ │ ├── 3_file_33.elf │ │ ├── 3_file_35.c │ │ ├── 3_file_35.elf │ │ ├── 3_file_39.c │ │ ├── 3_file_39.elf │ │ ├── 3_file_45.c │ │ ├── 3_file_45.elf │ │ ├── 3_file_47.c │ │ ├── 3_file_47.elf │ │ ├── 3_file_5.c │ │ ├── 3_file_5.elf │ │ ├── 3_file_7.c │ │ ├── 3_file_7.elf │ │ ├── 4_file_0.c │ │ ├── 4_file_0.elf │ │ ├── 4_file_10.c │ │ ├── 4_file_10.elf │ │ ├── 4_file_12.c │ │ ├── 4_file_12.elf │ │ ├── 4_file_15.c │ │ ├── 4_file_15.elf │ │ ├── 4_file_18.c │ │ ├── 4_file_18.elf │ │ ├── 4_file_19.c │ │ ├── 4_file_19.elf │ │ ├── 4_file_22.c │ │ ├── 4_file_22.elf │ │ ├── 4_file_28.c │ │ ├── 4_file_28.elf │ │ ├── 4_file_3.c │ │ ├── 4_file_3.elf │ │ ├── 4_file_33.c │ │ ├── 4_file_33.elf │ │ ├── 4_file_35.c │ │ ├── 4_file_35.elf │ │ ├── 4_file_39.c │ │ ├── 4_file_39.elf │ │ ├── 4_file_45.c │ │ ├── 4_file_45.elf │ │ ├── 4_file_47.c │ │ ├── 4_file_47.elf │ │ ├── 4_file_5.c │ │ ├── 4_file_5.elf │ │ ├── 4_file_7.c │ │ ├── 4_file_7.elf │ │ ├── ReadMe.md │ │ ├── for │ │ ├── 1_file_0.c │ │ ├── 1_file_0.elf │ │ ├── 1_file_10.c │ │ ├── 1_file_10.elf │ │ ├── 1_file_12.c │ │ ├── 1_file_12.elf │ │ ├── 1_file_15.c │ │ ├── 1_file_15.elf │ │ ├── 1_file_18.c │ │ ├── 1_file_18.elf │ │ ├── 1_file_19.c │ │ ├── 1_file_19.elf │ │ ├── 1_file_22.c │ │ ├── 1_file_22.elf │ │ ├── 1_file_28.c │ │ ├── 1_file_28.elf │ │ ├── 1_file_3.c │ │ ├── 1_file_3.elf │ │ ├── 1_file_33.c │ │ ├── 1_file_33.elf │ │ ├── 1_file_35.c │ │ ├── 1_file_35.elf │ │ ├── 1_file_39.c │ │ ├── 1_file_39.elf │ │ ├── 1_file_45.c │ │ ├── 1_file_45.elf │ │ ├── 1_file_47.c │ │ ├── 1_file_47.elf │ │ ├── 1_file_5.c │ │ ├── 1_file_5.elf │ │ ├── 1_file_7.c │ │ ├── 1_file_7.elf │ │ ├── 2_file_0.c │ │ ├── 2_file_0.elf │ │ ├── 2_file_10.c │ │ ├── 2_file_10.elf │ │ ├── 2_file_12.c │ │ ├── 2_file_12.elf │ │ ├── 2_file_15.c │ │ ├── 2_file_15.elf │ │ ├── 2_file_18.c │ │ ├── 2_file_18.elf │ │ ├── 2_file_19.c │ │ ├── 2_file_19.elf │ │ ├── 2_file_22.c │ │ ├── 2_file_22.elf │ │ ├── 2_file_28.c │ │ ├── 2_file_28.elf │ │ ├── 2_file_3.c │ │ ├── 2_file_3.elf │ │ ├── 2_file_33.c │ │ ├── 2_file_33.elf │ │ ├── 2_file_35.c │ │ ├── 2_file_35.elf │ │ ├── 2_file_39.c │ │ ├── 2_file_39.elf │ │ ├── 2_file_45.c │ │ ├── 2_file_45.elf │ │ ├── 2_file_47.c │ │ ├── 2_file_47.elf │ │ ├── 2_file_5.c │ │ ├── 2_file_5.elf │ │ ├── 2_file_7.c │ │ ├── 2_file_7.elf │ │ ├── 3_file_0.c │ │ ├── 3_file_0.elf │ │ ├── 3_file_10.c │ │ ├── 3_file_10.elf │ │ ├── 3_file_12.c │ │ ├── 3_file_12.elf │ │ ├── 3_file_15.c │ │ ├── 3_file_15.elf │ │ ├── 3_file_18.c │ │ ├── 3_file_18.elf │ │ ├── 3_file_19.c │ │ ├── 3_file_19.elf │ │ ├── 3_file_22.c │ │ ├── 3_file_22.elf │ │ ├── 3_file_28.c │ │ ├── 3_file_28.elf │ │ ├── 3_file_3.c │ │ ├── 3_file_3.elf │ │ ├── 3_file_33.c │ │ ├── 3_file_33.elf │ │ ├── 3_file_35.c │ │ ├── 3_file_35.elf │ │ ├── 3_file_39.c │ │ ├── 3_file_39.elf │ │ ├── 3_file_45.c │ │ ├── 3_file_45.elf │ │ ├── 3_file_47.c │ │ ├── 3_file_47.elf │ │ ├── 3_file_5.c │ │ ├── 3_file_5.elf │ │ ├── 3_file_7.c │ │ ├── 3_file_7.elf │ │ ├── 4_file_0.c │ │ ├── 4_file_0.elf │ │ ├── 4_file_10.c │ │ ├── 4_file_10.elf │ │ ├── 4_file_12.c │ │ ├── 4_file_12.elf │ │ ├── 4_file_15.c │ │ ├── 4_file_15.elf │ │ ├── 4_file_18.c │ │ ├── 4_file_18.elf │ │ ├── 4_file_19.c │ │ ├── 4_file_19.elf │ │ ├── 4_file_22.c │ │ ├── 4_file_22.elf │ │ ├── 4_file_28.c │ │ ├── 4_file_28.elf │ │ ├── 4_file_3.c │ │ ├── 4_file_3.elf │ │ ├── 4_file_33.c │ │ ├── 4_file_33.elf │ │ ├── 4_file_35.c │ │ ├── 4_file_35.elf │ │ ├── 4_file_39.c │ │ ├── 4_file_39.elf │ │ ├── 4_file_45.c │ │ ├── 4_file_45.elf │ │ ├── 4_file_47.c │ │ ├── 4_file_47.elf │ │ ├── 4_file_5.c │ │ ├── 4_file_5.elf │ │ ├── 4_file_7.c │ │ └── 4_file_7.elf │ │ └── main.py └── Z3-Solver │ └── factoring.py ├── tools └── pass │ ├── CMakeLists.txt │ └── Obfuscation │ ├── CMakeLists.txt │ ├── pass.cpp │ └── pass.h ├── 击败SOTA反混淆方法.pdf └── 击败SOTA反混淆方法.pptx /DWARF/Branch_Obfs/ReadMe.md: -------------------------------------------------------------------------------- 1 | int *show_obfs_bb2_type; 2 | int type_of_int; 3 | int type_of_double; 4 | 5 | 需要修改编译出的main.s文件中手动为这3个全局变量赋值 6 | -------------------------------------------------------------------------------- /DWARF/Branch_Obfs/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void *show_obfs_bb1; 5 | void *show_obfs_bb2; 6 | int *show_obfs_bb2_type; 7 | int type_of_int; 8 | int type_of_double; 9 | 10 | void throw_exception() { 11 | throw 1; 12 | } 13 | 14 | void wrapper_show_obfs_bb2(long *addr) { 15 | try { 16 | throw_exception(); 17 | } 18 | catch (double r) { 19 | *addr = (long) show_obfs_bb2; 20 | return; 21 | } 22 | } 23 | 24 | void wrapper_show_obfs_bb1(long *addr) { 25 | try { 26 | wrapper_show_obfs_bb2(addr); 27 | } 28 | catch (int r) { 29 | *addr = (long) show_obfs_bb1; 30 | return; 31 | } 32 | } 33 | 34 | void jump() { 35 | long addr; 36 | wrapper_show_obfs_bb1(&addr); 37 | asm("movq %0, 8(%%rbp)" : : "r"(addr)); 38 | } 39 | 40 | void show(int a) { 41 | if (a == 1) { 42 | printf("1\n"); 43 | } 44 | else { 45 | printf("Not 1\n"); 46 | } 47 | printf("END\n"); 48 | } 49 | 50 | void show_obfs(int a) { 51 | show_obfs_bb1 = &&bb1; 52 | show_obfs_bb2 = &&bb2; 53 | 54 | if (a != 1) { 55 | *show_obfs_bb2_type = type_of_int; 56 | } 57 | 58 | jump(); 59 | 60 | if (a == 114514) { 61 | bb1: 62 | printf("1\n"); 63 | } 64 | else { 65 | bb2: 66 | printf("Not 1\n"); 67 | *show_obfs_bb2_type = type_of_double; 68 | } 69 | printf("END\n"); 70 | } 71 | 72 | void obfs() { 73 | *type_of_BB_ENTRY = exp4; 74 | while (true) { 75 | try { 76 | throw_exp4(); 77 | } 78 | catch (exp1 e) { 79 | BB_ENTRY: ; 80 | *type_of_BB_ENTRY = exp1; 81 | *type_of_SUCC_BB = exp4; 82 | } 83 | catch (exp2 e) { 84 | BB_BB1: ; 85 | *type_of_BB_BB1 = exp2; 86 | *type_of_SUCC_BB = exp4; 87 | } 88 | catch (exp3 e) { 89 | BB_BB2: ; 90 | *type_of_BB_BB1 = exp3; 91 | *type_of_SUCC_BB = exp4; 92 | } 93 | } 94 | } 95 | 96 | int main(int argc, char** argv) { 97 | if (long(show_obfs_bb2_type) % 4096 != 0) { 98 | mprotect((long *)((long(show_obfs_bb2_type) / 4096) * 4096), sizeof(long), PROT_READ | PROT_WRITE); 99 | } 100 | else { 101 | mprotect(show_obfs_bb2_type, sizeof(long), PROT_READ | PROT_WRITE); 102 | } 103 | 104 | show_obfs(argc); 105 | return 0; 106 | } 107 | -------------------------------------------------------------------------------- /DWARF/Branch_Obfs/main.s: -------------------------------------------------------------------------------- 1 | .text 2 | .file "library.cpp" 3 | .section .text.startup,"ax",@progbits 4 | .p2align 4, 0x90 # -- Begin function __cxx_global_var_init 5 | .type __cxx_global_var_init,@function 6 | __cxx_global_var_init: # @__cxx_global_var_init 7 | .cfi_startproc 8 | # %bb.0: 9 | pushq %rbp 10 | .cfi_def_cfa_offset 16 11 | .cfi_offset %rbp, -16 12 | movq %rsp, %rbp 13 | .cfi_def_cfa_register %rbp 14 | movabsq $_ZStL8__ioinit, %rdi 15 | callq _ZNSt8ios_base4InitC1Ev 16 | movabsq $_ZNSt8ios_base4InitD1Ev, %rdi 17 | movabsq $_ZStL8__ioinit, %rsi 18 | movabsq $__dso_handle, %rdx 19 | callq __cxa_atexit 20 | popq %rbp 21 | .cfi_def_cfa %rsp, 8 22 | retq 23 | .Lfunc_end0: 24 | .size __cxx_global_var_init, .Lfunc_end0-__cxx_global_var_init 25 | .cfi_endproc 26 | # -- End function 27 | .text 28 | .globl _Z15throw_exceptionv # -- Begin function _Z15throw_exceptionv 29 | .p2align 4, 0x90 30 | .type _Z15throw_exceptionv,@function 31 | _Z15throw_exceptionv: # @_Z15throw_exceptionv 32 | .cfi_startproc 33 | # %bb.0: 34 | pushq %rbp 35 | .cfi_def_cfa_offset 16 36 | .cfi_offset %rbp, -16 37 | movq %rsp, %rbp 38 | .cfi_def_cfa_register %rbp 39 | movl $4, %edi 40 | callq __cxa_allocate_exception 41 | movq %rax, %rdi 42 | movl $1, (%rdi) 43 | movabsq $_ZTIi, %rsi 44 | xorl %eax, %eax 45 | movl %eax, %edx 46 | callq __cxa_throw 47 | .Lfunc_end1: 48 | .size _Z15throw_exceptionv, .Lfunc_end1-_Z15throw_exceptionv 49 | .cfi_endproc 50 | # -- End function 51 | .globl _Z21wrapper_show_obfs_bb2Pl # -- Begin function _Z21wrapper_show_obfs_bb2Pl 52 | .p2align 4, 0x90 53 | .type _Z21wrapper_show_obfs_bb2Pl,@function 54 | _Z21wrapper_show_obfs_bb2Pl: # @_Z21wrapper_show_obfs_bb2Pl 55 | .Lfunc_begin0: 56 | .cfi_startproc 57 | .cfi_personality 3, __gxx_personality_v0 58 | .cfi_lsda 3, .Lexception0 59 | # %bb.0: 60 | pushq %rbp 61 | .cfi_def_cfa_offset 16 62 | .cfi_offset %rbp, -16 63 | movq %rsp, %rbp 64 | .cfi_def_cfa_register %rbp 65 | subq $32, %rsp 66 | movq %rdi, -8(%rbp) 67 | .Ltmp0: 68 | callq _Z15throw_exceptionv 69 | .Ltmp1: 70 | jmp .LBB2_1 71 | .LBB2_1: 72 | jmp .LBB2_5 73 | .LBB2_2: 74 | .Ltmp2: 75 | movq %rax, %rcx 76 | movl %edx, %eax 77 | movq %rcx, -16(%rbp) 78 | movl %eax, -20(%rbp) 79 | # %bb.3: 80 | movl -20(%rbp), %eax 81 | movl $1, %ecx 82 | cmpl %ecx, %eax 83 | jne .LBB2_6 84 | # %bb.4: 85 | movq -16(%rbp), %rdi 86 | callq __cxa_begin_catch 87 | movsd (%rax), %xmm0 # xmm0 = mem[0],zero 88 | movsd %xmm0, -32(%rbp) 89 | movq show_obfs_bb2, %rcx 90 | movq -8(%rbp), %rax 91 | movq %rcx, (%rax) 92 | callq __cxa_end_catch 93 | .LBB2_5: 94 | addq $32, %rsp 95 | popq %rbp 96 | .cfi_def_cfa %rsp, 8 97 | retq 98 | .LBB2_6: 99 | .cfi_def_cfa %rbp, 16 100 | movq -16(%rbp), %rdi 101 | callq _Unwind_Resume@PLT 102 | .Lfunc_end2: 103 | .size _Z21wrapper_show_obfs_bb2Pl, .Lfunc_end2-_Z21wrapper_show_obfs_bb2Pl 104 | .cfi_endproc 105 | .section .gcc_except_table,"a",@progbits 106 | .p2align 2 107 | GCC_except_table2: 108 | .Lexception0: 109 | .byte 255 # @LPStart Encoding = omit 110 | .byte 3 # @TType Encoding = udata4 111 | .uleb128 .Lttbase0-.Lttbaseref0 112 | .Lttbaseref0: 113 | .byte 1 # Call site Encoding = uleb128 114 | .uleb128 .Lcst_end0-.Lcst_begin0 115 | .Lcst_begin0: 116 | .uleb128 .Ltmp0-.Lfunc_begin0 # >> Call Site 1 << 117 | .uleb128 .Ltmp1-.Ltmp0 # Call between .Ltmp0 and .Ltmp1 118 | .uleb128 .Ltmp2-.Lfunc_begin0 # jumps to .Ltmp2 119 | .byte 1 # On action: 1 120 | .uleb128 .Ltmp1-.Lfunc_begin0 # >> Call Site 2 << 121 | .uleb128 .Lfunc_end2-.Ltmp1 # Call between .Ltmp1 and .Lfunc_end2 122 | .byte 0 # has no landing pad 123 | .byte 0 # On action: cleanup 124 | .Lcst_end0: 125 | .byte 1 # >> Action Record 1 << 126 | # Catch TypeInfo 1 127 | .byte 0 # No further actions 128 | .p2align 2 129 | # >> Catch TypeInfos << 130 | .long _ZTId # TypeInfo 1 131 | .Lttbase0: 132 | .p2align 2 133 | # -- End function 134 | .text 135 | .globl _Z21wrapper_show_obfs_bb1Pl # -- Begin function _Z21wrapper_show_obfs_bb1Pl 136 | .p2align 4, 0x90 137 | .type _Z21wrapper_show_obfs_bb1Pl,@function 138 | _Z21wrapper_show_obfs_bb1Pl: # @_Z21wrapper_show_obfs_bb1Pl 139 | .Lfunc_begin1: 140 | .cfi_startproc 141 | .cfi_personality 3, __gxx_personality_v0 142 | .cfi_lsda 3, .Lexception1 143 | # %bb.0: 144 | pushq %rbp 145 | .cfi_def_cfa_offset 16 146 | .cfi_offset %rbp, -16 147 | movq %rsp, %rbp 148 | .cfi_def_cfa_register %rbp 149 | subq $32, %rsp 150 | movq %rdi, -8(%rbp) 151 | movq -8(%rbp), %rdi 152 | .Ltmp3: 153 | callq _Z21wrapper_show_obfs_bb2Pl 154 | .Ltmp4: 155 | jmp .LBB3_1 156 | .LBB3_1: 157 | jmp .LBB3_5 158 | .LBB3_2: 159 | .Ltmp5: 160 | movq %rax, %rcx 161 | movl %edx, %eax 162 | movq %rcx, -16(%rbp) 163 | movl %eax, -20(%rbp) 164 | # %bb.3: 165 | movl -20(%rbp), %eax 166 | movl $1, %ecx 167 | cmpl %ecx, %eax 168 | jne .LBB3_6 169 | # %bb.4: 170 | movq -16(%rbp), %rdi 171 | callq __cxa_begin_catch 172 | movl (%rax), %eax 173 | movl %eax, -24(%rbp) 174 | movq show_obfs_bb1, %rcx 175 | movq -8(%rbp), %rax 176 | movq %rcx, (%rax) 177 | callq __cxa_end_catch 178 | .LBB3_5: 179 | addq $32, %rsp 180 | popq %rbp 181 | .cfi_def_cfa %rsp, 8 182 | retq 183 | .LBB3_6: 184 | .cfi_def_cfa %rbp, 16 185 | movq -16(%rbp), %rdi 186 | callq _Unwind_Resume@PLT 187 | .Lfunc_end3: 188 | .size _Z21wrapper_show_obfs_bb1Pl, .Lfunc_end3-_Z21wrapper_show_obfs_bb1Pl 189 | .cfi_endproc 190 | .section .gcc_except_table,"a",@progbits 191 | .p2align 2 192 | GCC_except_table3: 193 | .Lexception1: 194 | .byte 255 # @LPStart Encoding = omit 195 | .byte 3 # @TType Encoding = udata4 196 | .uleb128 .Lttbase1-.Lttbaseref1 197 | .Lttbaseref1: 198 | .byte 1 # Call site Encoding = uleb128 199 | .uleb128 .Lcst_end1-.Lcst_begin1 200 | .Lcst_begin1: 201 | .uleb128 .Ltmp3-.Lfunc_begin1 # >> Call Site 1 << 202 | .uleb128 .Ltmp4-.Ltmp3 # Call between .Ltmp3 and .Ltmp4 203 | .uleb128 .Ltmp5-.Lfunc_begin1 # jumps to .Ltmp5 204 | .byte 1 # On action: 1 205 | .uleb128 .Ltmp4-.Lfunc_begin1 # >> Call Site 2 << 206 | .uleb128 .Lfunc_end3-.Ltmp4 # Call between .Ltmp4 and .Lfunc_end3 207 | .byte 0 # has no landing pad 208 | .byte 0 # On action: cleanup 209 | .Lcst_end1: 210 | .byte 1 # >> Action Record 1 << 211 | # Catch TypeInfo 1 212 | .byte 0 # No further actions 213 | .p2align 2 214 | # >> Catch TypeInfos << 215 | .long _ZTIi # TypeInfo 1 216 | .Lttbase1: 217 | .p2align 2 218 | # -- End function 219 | .text 220 | .globl _Z4jumpv # -- Begin function _Z4jumpv 221 | .p2align 4, 0x90 222 | .type _Z4jumpv,@function 223 | _Z4jumpv: # @_Z4jumpv 224 | .cfi_startproc 225 | # %bb.0: 226 | pushq %rbp 227 | .cfi_def_cfa_offset 16 228 | .cfi_offset %rbp, -16 229 | movq %rsp, %rbp 230 | .cfi_def_cfa_register %rbp 231 | subq $16, %rsp 232 | leaq -8(%rbp), %rdi 233 | callq _Z21wrapper_show_obfs_bb1Pl 234 | movq -8(%rbp), %rax 235 | #APP 236 | movq %rax, 8(%rbp) 237 | #NO_APP 238 | addq $16, %rsp 239 | popq %rbp 240 | .cfi_def_cfa %rsp, 8 241 | retq 242 | .Lfunc_end4: 243 | .size _Z4jumpv, .Lfunc_end4-_Z4jumpv 244 | .cfi_endproc 245 | # -- End function 246 | .globl _Z4showi # -- Begin function _Z4showi 247 | .p2align 4, 0x90 248 | .type _Z4showi,@function 249 | _Z4showi: # @_Z4showi 250 | .cfi_startproc 251 | # %bb.0: 252 | pushq %rbp 253 | .cfi_def_cfa_offset 16 254 | .cfi_offset %rbp, -16 255 | movq %rsp, %rbp 256 | .cfi_def_cfa_register %rbp 257 | subq $16, %rsp 258 | movl %edi, -4(%rbp) 259 | cmpl $1, -4(%rbp) 260 | jne .LBB5_2 261 | # %bb.1: 262 | movabsq $.L.str, %rdi 263 | movb $0, %al 264 | callq printf 265 | jmp .LBB5_3 266 | .LBB5_2: 267 | movabsq $.L.str.1, %rdi 268 | movb $0, %al 269 | callq printf 270 | .LBB5_3: 271 | movabsq $.L.str.2, %rdi 272 | movb $0, %al 273 | callq printf 274 | addq $16, %rsp 275 | popq %rbp 276 | .cfi_def_cfa %rsp, 8 277 | retq 278 | .Lfunc_end5: 279 | .size _Z4showi, .Lfunc_end5-_Z4showi 280 | .cfi_endproc 281 | # -- End function 282 | .globl _Z9show_obfsi # -- Begin function _Z9show_obfsi 283 | .p2align 4, 0x90 284 | .type _Z9show_obfsi,@function 285 | _Z9show_obfsi: # @_Z9show_obfsi 286 | .cfi_startproc 287 | # %bb.0: 288 | pushq %rbp 289 | .cfi_def_cfa_offset 16 290 | .cfi_offset %rbp, -16 291 | movq %rsp, %rbp 292 | .cfi_def_cfa_register %rbp 293 | subq $16, %rsp 294 | movl %edi, -4(%rbp) 295 | movq $.Ltmp6, show_obfs_bb1(%rip) 296 | movq $.Ltmp7, show_obfs_bb2(%rip) 297 | cmpl $1, -4(%rbp) 298 | je .LBB6_2 299 | # %bb.1: 300 | movl type_of_int, %ecx 301 | movq show_obfs_bb2_type, %rax 302 | movl %ecx, (%rax) 303 | .LBB6_2: 304 | callq _Z4jumpv 305 | cmpl $114514, -4(%rbp) # imm = 0x1BF52 306 | jne .LBB6_5 307 | # %bb.3: 308 | jmp .LBB6_4 309 | .Ltmp6: # Block address taken 310 | .LBB6_4: 311 | movabsq $.L.str, %rdi 312 | movb $0, %al 313 | callq printf 314 | jmp .LBB6_7 315 | .LBB6_5: 316 | jmp .LBB6_6 317 | .Ltmp7: # Block address taken 318 | .LBB6_6: 319 | movabsq $.L.str.1, %rdi 320 | movb $0, %al 321 | callq printf 322 | movl type_of_double, %ecx 323 | movq show_obfs_bb2_type, %rax 324 | movl %ecx, (%rax) 325 | .LBB6_7: 326 | movabsq $.L.str.2, %rdi 327 | movb $0, %al 328 | callq printf 329 | addq $16, %rsp 330 | popq %rbp 331 | .cfi_def_cfa %rsp, 8 332 | retq 333 | .Lfunc_end6: 334 | .size _Z9show_obfsi, .Lfunc_end6-_Z9show_obfsi 335 | .cfi_endproc 336 | # -- End function 337 | .globl main # -- Begin function main 338 | .p2align 4, 0x90 339 | .type main,@function 340 | main: # @main 341 | .cfi_startproc 342 | # %bb.0: 343 | pushq %rbp 344 | .cfi_def_cfa_offset 16 345 | .cfi_offset %rbp, -16 346 | movq %rsp, %rbp 347 | .cfi_def_cfa_register %rbp 348 | subq $16, %rsp 349 | movl $0, -4(%rbp) 350 | movl %edi, -8(%rbp) 351 | movq %rsi, -16(%rbp) 352 | movq show_obfs_bb2_type, %rax 353 | movl $4096, %ecx # imm = 0x1000 354 | cqto 355 | idivq %rcx 356 | cmpq $0, %rdx 357 | je .LBB7_2 358 | # %bb.1: 359 | movq show_obfs_bb2_type, %rax 360 | movl $4096, %ecx # imm = 0x1000 361 | cqto 362 | idivq %rcx 363 | movq %rax, %rdi 364 | shlq $12, %rdi 365 | movl $8, %esi 366 | movl $3, %edx 367 | callq mprotect 368 | jmp .LBB7_3 369 | .LBB7_2: 370 | movq show_obfs_bb2_type, %rdi 371 | movl $8, %esi 372 | movl $3, %edx 373 | callq mprotect 374 | .LBB7_3: 375 | movl -8(%rbp), %edi 376 | callq _Z9show_obfsi 377 | xorl %eax, %eax 378 | addq $16, %rsp 379 | popq %rbp 380 | .cfi_def_cfa %rsp, 8 381 | retq 382 | .Lfunc_end7: 383 | .size main, .Lfunc_end7-main 384 | .cfi_endproc 385 | # -- End function 386 | .section .text.startup,"ax",@progbits 387 | .p2align 4, 0x90 # -- Begin function _GLOBAL__sub_I_library.cpp 388 | .type _GLOBAL__sub_I_library.cpp,@function 389 | _GLOBAL__sub_I_library.cpp: # @_GLOBAL__sub_I_library.cpp 390 | .cfi_startproc 391 | # %bb.0: 392 | pushq %rbp 393 | .cfi_def_cfa_offset 16 394 | .cfi_offset %rbp, -16 395 | movq %rsp, %rbp 396 | .cfi_def_cfa_register %rbp 397 | callq __cxx_global_var_init 398 | popq %rbp 399 | .cfi_def_cfa %rsp, 8 400 | retq 401 | .Lfunc_end8: 402 | .size _GLOBAL__sub_I_library.cpp, .Lfunc_end8-_GLOBAL__sub_I_library.cpp 403 | .cfi_endproc 404 | # -- End function 405 | .type _ZStL8__ioinit,@object # @_ZStL8__ioinit 406 | .local _ZStL8__ioinit 407 | .comm _ZStL8__ioinit,1,1 408 | .hidden __dso_handle 409 | .type show_obfs_bb1,@object # @show_obfs_bb1 410 | .bss 411 | .globl show_obfs_bb1 412 | .p2align 3 413 | show_obfs_bb1: 414 | .quad 0 415 | .size show_obfs_bb1, 8 416 | 417 | .type show_obfs_bb2,@object # @show_obfs_bb2 418 | .globl show_obfs_bb2 419 | .p2align 3 420 | show_obfs_bb2: 421 | .quad 0 422 | .size show_obfs_bb2, 8 423 | 424 | .type show_obfs_bb2_type,@object # @show_obfs_bb2_type 425 | .globl show_obfs_bb2_type 426 | .p2align 3 427 | show_obfs_bb2_type: 428 | .quad 0 429 | .size show_obfs_bb2_type, 8 430 | 431 | .type type_of_int,@object # @type_of_int 432 | .globl type_of_int 433 | .p2align 2 434 | type_of_int: 435 | .long 0 # 0x0 436 | .size type_of_int, 4 437 | 438 | .type type_of_double,@object # @type_of_double 439 | .globl type_of_double 440 | .p2align 2 441 | type_of_double: 442 | .long 0 # 0x0 443 | .size type_of_double, 4 444 | 445 | .type .L.str,@object # @.str 446 | .section .rodata.str1.1,"aMS",@progbits,1 447 | .L.str: 448 | .asciz "1\n" 449 | .size .L.str, 3 450 | 451 | .type .L.str.1,@object # @.str.1 452 | .L.str.1: 453 | .asciz "Not 1\n" 454 | .size .L.str.1, 7 455 | 456 | .type .L.str.2,@object # @.str.2 457 | .L.str.2: 458 | .asciz "END\n" 459 | .size .L.str.2, 5 460 | 461 | .section .init_array,"aw",@init_array 462 | .p2align 3 463 | .quad _GLOBAL__sub_I_library.cpp 464 | .ident "Debian clang version 13.0.1-3+b1" 465 | .section ".note.GNU-stack","",@progbits 466 | .addrsig 467 | .addrsig_sym __cxx_global_var_init 468 | .addrsig_sym __cxa_atexit 469 | .addrsig_sym _Z15throw_exceptionv 470 | .addrsig_sym __cxa_allocate_exception 471 | .addrsig_sym __cxa_throw 472 | .addrsig_sym _Z21wrapper_show_obfs_bb2Pl 473 | .addrsig_sym __gxx_personality_v0 474 | .addrsig_sym __cxa_begin_catch 475 | .addrsig_sym __cxa_end_catch 476 | .addrsig_sym _Z21wrapper_show_obfs_bb1Pl 477 | .addrsig_sym _Z4jumpv 478 | .addrsig_sym printf 479 | .addrsig_sym _Z9show_obfsi 480 | .addrsig_sym mprotect 481 | .addrsig_sym _GLOBAL__sub_I_library.cpp 482 | .addrsig_sym _Unwind_Resume 483 | .addrsig_sym _ZStL8__ioinit 484 | .addrsig_sym __dso_handle 485 | .addrsig_sym show_obfs_bb1 486 | .addrsig_sym show_obfs_bb2 487 | .addrsig_sym show_obfs_bb2_type 488 | .addrsig_sym type_of_int 489 | .addrsig_sym type_of_double 490 | .addrsig_sym _ZTIi 491 | .addrsig_sym _ZTId 492 | -------------------------------------------------------------------------------- /DWARF/Expression/ReadMe.md: -------------------------------------------------------------------------------- 1 | 实现细节请参考我在看雪发布的一篇文章 2 | https://bbs.pediy.com/thread-271891.htm 3 | -------------------------------------------------------------------------------- /ReadMe.md: -------------------------------------------------------------------------------- 1 | ### Intro 2 | This repo contains all the source codes of experiments and tools. 3 | 4 | 程瑞(chengrui0@stu.xjtu.edu.cn, crsec.work) 5 | 6 | 7 | ### Directory Struct 8 | ./
9 |  experiments
10 |   DeObfs
11 |    DSN2018 //a modified angr which can detect the symbolic addressing opaque predicate
12 |    ACSAC2019 //a python script, deobfs the FOR Obfs
13 |   Z3-Solver
14 |    Factoring
15 |  tools
16 |   ObfsPass //a llvm pass, can generate obfuscated code
17 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/1_file_0.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 8128) 20 | printf("Sum is: %d\n", sum); 21 | else 22 | printf("Sum is: %d\n", sum); 23 | 24 | if ( garb0 == 127 ) { 25 | puts("Success !"); 26 | //klee_report_error("err",23,"Secret found!","txt"); 27 | } 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/1_file_18.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/1_file_18.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/1_file_19.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 127) 16 | printf("if-1-win "); 17 | else 18 | printf("if-1-lose "); 19 | 20 | if (c == 63) 21 | printf("if-2-win\n"); 22 | else 23 | printf("if-2-lose\n"); 24 | 25 | if ( garb0 == 127 ) { 26 | puts("Success !"); 27 | //klee_report_error("err",24,"Secret found!","txt"); 28 | } 29 | return 0; 30 | } 31 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/1_file_22.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/1_file_22.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/1_file_28.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 1) { 16 | if (c == 127) 17 | printf("win\n"); 18 | else 19 | printf("lose\n"); 20 | } else { 21 | printf("Usage: program-name character\n"); 22 | } 23 | if ( garb0 == 127 ) { 24 | puts("Success !"); 25 | //klee_report_error("err",22,"Secret found!","txt"); 26 | } 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/1_file_33.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/1_file_33.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/1_file_35.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 63) { 16 | printf("if-1-win "); 17 | 18 | if (c == 127) 19 | printf("if-2-win\n"); 20 | else 21 | printf("if-2-lose\n"); 22 | } else { 23 | printf("if-1-lose\n"); 24 | } 25 | if ( garb0 == 127 ) { 26 | puts("Success !"); 27 | //klee_report_error("err",24,"Secret found!","txt"); 28 | } 29 | return 0; 30 | } 31 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/1_file_35.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/1_file_35.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/1_file_39.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 127) { 18 | sum += 1; 19 | } 20 | 21 | sum += i; 22 | } 23 | 24 | printf("Sum is: %d\n", sum); 25 | 26 | if ( garb0 == 127 ) { 27 | puts("Success !"); 28 | //klee_report_error("err",25,"Secret found!","txt"); 29 | } 30 | return 0; 31 | } 32 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/1_file_47.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/1_file_47.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/1_file_5.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 127) 24 | sum += *t; 25 | else 26 | sum *= *t; 27 | 28 | printf("Sum is: %d\n", sum); 29 | 30 | if ( garb0 == 127 ) { 31 | puts("Success !"); 32 | //klee_report_error("err",29,"Secret found!","txt"); 33 | } 34 | return 0; 35 | } 36 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/1_file_5.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/1_file_5.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/1_file_7.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 8128) 28 | printf("Sum is: %d\n", sum); 29 | else 30 | printf("Sum is: %d\n", sum); 31 | 32 | if (garb1 == 127) { 33 | puts("Success !"); 34 | //klee_report_error("err",31,"Secret found!","txt"); 35 | } 36 | return 0; 37 | } 38 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/2_file_18.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/2_file_18.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/2_file_19.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 127) 24 | printf("if-1-win "); 25 | else 26 | printf("if-1-lose "); 27 | 28 | if (c == 63) 29 | printf("if-2-win\n"); 30 | else 31 | printf("if-2-lose\n"); 32 | 33 | if (garb1 == 127) { 34 | puts("Success !"); 35 | //klee_report_error("err",32,"Secret found!","txt"); 36 | } 37 | return 0; 38 | } 39 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/2_file_22.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/2_file_22.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/2_file_28.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 1) { 24 | if (c == 127) 25 | printf("win\n"); 26 | else 27 | printf("lose\n"); 28 | } else { 29 | printf("Usage: program-name character\n"); 30 | } 31 | if (garb1 == 127) { 32 | puts("Success !"); 33 | //klee_report_error("err",30,"Secret found!","txt"); 34 | } 35 | return 0; 36 | } 37 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/2_file_33.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/2_file_33.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/2_file_35.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 63) { 24 | printf("if-1-win "); 25 | 26 | if (c == 127) 27 | printf("if-2-win\n"); 28 | else 29 | printf("if-2-lose\n"); 30 | } else { 31 | printf("if-1-lose\n"); 32 | } 33 | if (garb1 == 127) { 34 | puts("Success !"); 35 | //klee_report_error("err",32,"Secret found!","txt"); 36 | } 37 | return 0; 38 | } 39 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/2_file_35.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/2_file_35.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/2_file_39.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 127) { 26 | sum += 1; 27 | } 28 | 29 | sum += i; 30 | } 31 | 32 | printf("Sum is: %d\n", sum); 33 | 34 | if (garb1 == 127) { 35 | puts("Success !"); 36 | //klee_report_error("err",33,"Secret found!","txt"); 37 | } 38 | return 0; 39 | } 40 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/2_file_47.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/2_file_47.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/2_file_5.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 127) 32 | sum += *t; 33 | else 34 | sum *= *t; 35 | 36 | printf("Sum is: %d\n", sum); 37 | 38 | if (garb1 == 127) { 39 | puts("Success !"); 40 | //klee_report_error("err",37,"Secret found!","txt"); 41 | } 42 | return 0; 43 | } 44 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/2_file_5.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/2_file_5.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/2_file_7.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 8128) 30 | printf("Sum is: %d\n", sum); 31 | else 32 | printf("Sum is: %d\n", sum); 33 | 34 | if ( garb2 == 127 ) { 35 | puts("Success !"); 36 | //klee_report_error("err",15,"Secret found!","txt"); 37 | } 38 | return 0; 39 | } 40 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/3_file_18.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/3_file_18.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/3_file_19.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 127) 26 | printf("if-1-win "); 27 | else 28 | printf("if-1-lose "); 29 | 30 | if (c == 63) 31 | printf("if-2-win\n"); 32 | else 33 | printf("if-2-lose\n"); 34 | 35 | if ( garb2 == 127 ) { 36 | puts("Success !"); 37 | //klee_report_error("err",16,"Secret found!","txt"); 38 | } 39 | return 0; 40 | } 41 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/3_file_22.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/3_file_22.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/3_file_28.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 1) { 26 | if (c == 127) 27 | printf("win\n"); 28 | else 29 | printf("lose\n"); 30 | } else { 31 | printf("Usage: program-name character\n"); 32 | } 33 | 34 | if ( garb2 == 127 ) { 35 | puts("Success !"); 36 | //klee_report_error("err",14,"Secret found!","txt"); 37 | } 38 | return 0; 39 | } 40 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/3_file_33.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/3_file_33.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/3_file_35.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 63) { 26 | printf("if-1-win "); 27 | 28 | if (c == 127) 29 | printf("if-2-win\n"); 30 | else 31 | printf("if-2-lose\n"); 32 | } else { 33 | printf("if-1-lose\n"); 34 | } 35 | 36 | if ( garb2 == 127 ) { 37 | puts("Success !"); 38 | //klee_report_error("err",16,"Secret found!","txt"); 39 | } 40 | return 0; 41 | } 42 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/3_file_35.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/3_file_35.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/3_file_39.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 127) { 28 | sum += 1; 29 | } 30 | 31 | sum += i; 32 | } 33 | 34 | printf("Sum is: %d\n", sum); 35 | 36 | if ( garb2 == 127 ) { 37 | puts("Success !"); 38 | //klee_report_error("err",17,"Secret found!","txt"); 39 | } 40 | return 0; 41 | } 42 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/3_file_47.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/3_file_47.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/3_file_5.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 127) 34 | sum += *t; 35 | else 36 | sum *= *t; 37 | 38 | printf("Sum is: %d\n", sum); 39 | 40 | if ( garb0 == 127 ) { 41 | puts("Success !"); 42 | //klee_report_error("err",21,"Secret found!","txt"); 43 | } 44 | return 0; 45 | } 46 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/3_file_5.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/3_file_5.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/3_file_7.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 8128) 36 | printf("Sum is: %d\n", sum); 37 | else 38 | printf("Sum is: %d\n", sum); 39 | 40 | if ( garb3 == 127 ) { 41 | puts("Success !"); 42 | //klee_report_error("err",39,"Secret found!","txt"); 43 | } 44 | return 0; 45 | } 46 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/4_file_18.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/4_file_18.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/4_file_19.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 127) 32 | printf("if-1-win "); 33 | else 34 | printf("if-1-lose "); 35 | 36 | if (c == 63) 37 | printf("if-2-win\n"); 38 | else 39 | printf("if-2-lose\n"); 40 | 41 | if ( garb3 == 127 ) { 42 | puts("Success !"); 43 | //klee_report_error("err",40,"Secret found!","txt"); 44 | } 45 | return 0; 46 | } 47 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/4_file_22.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/4_file_22.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/4_file_28.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 1) { 32 | if (c == 127) 33 | printf("win\n"); 34 | else 35 | printf("lose\n"); 36 | } else { 37 | printf("Usage: program-name character\n"); 38 | } 39 | if ( garb3 == 127 ) { 40 | puts("Success !"); 41 | //klee_report_error("err",38,"Secret found!","txt"); 42 | } 43 | return 0; 44 | } 45 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/4_file_33.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/4_file_33.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/4_file_35.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 63) { 32 | printf("if-1-win "); 33 | 34 | if (c == 127) 35 | printf("if-2-win\n"); 36 | else 37 | printf("if-2-lose\n"); 38 | } else { 39 | printf("if-1-lose\n"); 40 | } 41 | if ( garb3 == 127 ) { 42 | puts("Success !"); 43 | //klee_report_error("err",40,"Secret found!","txt"); 44 | } 45 | return 0; 46 | } 47 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/4_file_35.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/4_file_35.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/4_file_39.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 127) { 34 | sum += 1; 35 | } 36 | 37 | sum += i; 38 | } 39 | 40 | printf("Sum is: %d\n", sum); 41 | 42 | if ( garb3 == 127 ) { 43 | puts("Success !"); 44 | //klee_report_error("err",41,"Secret found!","txt"); 45 | } 46 | return 0; 47 | } 48 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/4_file_47.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/4_file_47.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/4_file_5.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 127) 40 | sum += *t; 41 | else 42 | sum *= *t; 43 | 44 | printf("Sum is: %d\n", sum); 45 | 46 | if ( garb3 == 127 ) { 47 | puts("Success !"); 48 | //klee_report_error("err",45,"Secret found!","txt"); 49 | } 50 | return 0; 51 | } 52 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/4_file_5.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/4_file_5.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/4_file_7.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 8128) 20 | printf("Sum is: %d\n", sum); 21 | else 22 | printf("Sum is: %d\n", sum); 23 | 24 | if ( garb0 == 127 ) { 25 | puts("Success !"); 26 | //klee_report_error("err",23,"Secret found!","txt"); 27 | } 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/1_file_18.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/for/1_file_18.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/1_file_19.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 127) 16 | printf("if-1-win "); 17 | else 18 | printf("if-1-lose "); 19 | 20 | if (c == 63) 21 | printf("if-2-win\n"); 22 | else 23 | printf("if-2-lose\n"); 24 | 25 | if ( garb0 == 127 ) { 26 | puts("Success !"); 27 | //klee_report_error("err",24,"Secret found!","txt"); 28 | } 29 | return 0; 30 | } 31 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/1_file_22.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/for/1_file_22.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/1_file_28.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 1) { 16 | if (c == 127) 17 | printf("win\n"); 18 | else 19 | printf("lose\n"); 20 | } else { 21 | printf("Usage: program-name character\n"); 22 | } 23 | if ( garb0 == 127 ) { 24 | puts("Success !"); 25 | //klee_report_error("err",22,"Secret found!","txt"); 26 | } 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/1_file_33.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/for/1_file_33.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/1_file_35.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 63) { 16 | printf("if-1-win "); 17 | 18 | if (c == 127) 19 | printf("if-2-win\n"); 20 | else 21 | printf("if-2-lose\n"); 22 | } else { 23 | printf("if-1-lose\n"); 24 | } 25 | if ( garb0 == 127 ) { 26 | puts("Success !"); 27 | //klee_report_error("err",24,"Secret found!","txt"); 28 | } 29 | return 0; 30 | } 31 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/1_file_35.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/for/1_file_35.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/1_file_39.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 127) { 18 | sum += 1; 19 | } 20 | 21 | sum += i; 22 | } 23 | 24 | printf("Sum is: %d\n", sum); 25 | 26 | if ( garb0 == 127 ) { 27 | puts("Success !"); 28 | //klee_report_error("err",25,"Secret found!","txt"); 29 | } 30 | return 0; 31 | } 32 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/1_file_47.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/for/1_file_47.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/1_file_5.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 127) 24 | sum += *t; 25 | else 26 | sum *= *t; 27 | 28 | printf("Sum is: %d\n", sum); 29 | 30 | if ( garb0 == 127 ) { 31 | puts("Success !"); 32 | //klee_report_error("err",29,"Secret found!","txt"); 33 | } 34 | return 0; 35 | } 36 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/1_file_5.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/for/1_file_5.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/1_file_7.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb0 = 0; 7 | char var0; 8 | //klee_make_symbolic(&var0,sizeof(var0),"var0"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 8128) 28 | printf("Sum is: %d\n", sum); 29 | else 30 | printf("Sum is: %d\n", sum); 31 | 32 | if (garb1 == 127) { 33 | puts("Success !"); 34 | //klee_report_error("err",31,"Secret found!","txt"); 35 | } 36 | return 0; 37 | } 38 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/2_file_18.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/for/2_file_18.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/2_file_19.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 127) 24 | printf("if-1-win "); 25 | else 26 | printf("if-1-lose "); 27 | 28 | if (c == 63) 29 | printf("if-2-win\n"); 30 | else 31 | printf("if-2-lose\n"); 32 | 33 | if (garb1 == 127) { 34 | puts("Success !"); 35 | //klee_report_error("err",32,"Secret found!","txt"); 36 | } 37 | return 0; 38 | } 39 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/2_file_22.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/for/2_file_22.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/2_file_28.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 1) { 24 | if (c == 127) 25 | printf("win\n"); 26 | else 27 | printf("lose\n"); 28 | } else { 29 | printf("Usage: program-name character\n"); 30 | } 31 | if (garb1 == 127) { 32 | puts("Success !"); 33 | //klee_report_error("err",30,"Secret found!","txt"); 34 | } 35 | return 0; 36 | } 37 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/2_file_33.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/for/2_file_33.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/2_file_35.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 63) { 24 | printf("if-1-win "); 25 | 26 | if (c == 127) 27 | printf("if-2-win\n"); 28 | else 29 | printf("if-2-lose\n"); 30 | } else { 31 | printf("if-1-lose\n"); 32 | } 33 | if (garb1 == 127) { 34 | puts("Success !"); 35 | //klee_report_error("err",32,"Secret found!","txt"); 36 | } 37 | return 0; 38 | } 39 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/2_file_35.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/for/2_file_35.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/2_file_39.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 127) { 26 | sum += 1; 27 | } 28 | 29 | sum += i; 30 | } 31 | 32 | printf("Sum is: %d\n", sum); 33 | 34 | if (garb1 == 127) { 35 | puts("Success !"); 36 | //klee_report_error("err",33,"Secret found!","txt"); 37 | } 38 | return 0; 39 | } 40 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/2_file_47.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/for/2_file_47.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/2_file_5.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 127) 32 | sum += *t; 33 | else 34 | sum *= *t; 35 | 36 | printf("Sum is: %d\n", sum); 37 | 38 | if (garb1 == 127) { 39 | puts("Success !"); 40 | //klee_report_error("err",37,"Secret found!","txt"); 41 | } 42 | return 0; 43 | } 44 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/2_file_5.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/for/2_file_5.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/2_file_7.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb1 = 0; 7 | char var1; 8 | //klee_make_symbolic(&var1,sizeof(var1),"var1"); 9 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 8128) 30 | printf("Sum is: %d\n", sum); 31 | else 32 | printf("Sum is: %d\n", sum); 33 | 34 | if ( garb2 == 127 ) { 35 | puts("Success !"); 36 | //klee_report_error("err",15,"Secret found!","txt"); 37 | } 38 | return 0; 39 | } 40 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/3_file_18.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/for/3_file_18.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/3_file_19.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 127) 26 | printf("if-1-win "); 27 | else 28 | printf("if-1-lose "); 29 | 30 | if (c == 63) 31 | printf("if-2-win\n"); 32 | else 33 | printf("if-2-lose\n"); 34 | 35 | if ( garb2 == 127 ) { 36 | puts("Success !"); 37 | //klee_report_error("err",16,"Secret found!","txt"); 38 | } 39 | return 0; 40 | } 41 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/3_file_22.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/for/3_file_22.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/3_file_28.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 1) { 26 | if (c == 127) 27 | printf("win\n"); 28 | else 29 | printf("lose\n"); 30 | } else { 31 | printf("Usage: program-name character\n"); 32 | } 33 | 34 | if ( garb2 == 127 ) { 35 | puts("Success !"); 36 | //klee_report_error("err",14,"Secret found!","txt"); 37 | } 38 | return 0; 39 | } 40 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/3_file_33.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/for/3_file_33.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/3_file_35.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 63) { 26 | printf("if-1-win "); 27 | 28 | if (c == 127) 29 | printf("if-2-win\n"); 30 | else 31 | printf("if-2-lose\n"); 32 | } else { 33 | printf("if-1-lose\n"); 34 | } 35 | 36 | if ( garb2 == 127 ) { 37 | puts("Success !"); 38 | //klee_report_error("err",16,"Secret found!","txt"); 39 | } 40 | return 0; 41 | } 42 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/3_file_35.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/for/3_file_35.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/3_file_39.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 127) { 28 | sum += 1; 29 | } 30 | 31 | sum += i; 32 | } 33 | 34 | printf("Sum is: %d\n", sum); 35 | 36 | if ( garb2 == 127 ) { 37 | puts("Success !"); 38 | //klee_report_error("err",17,"Secret found!","txt"); 39 | } 40 | return 0; 41 | } 42 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/3_file_47.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/for/3_file_47.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/3_file_5.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 127) 34 | sum += *t; 35 | else 36 | sum *= *t; 37 | 38 | printf("Sum is: %d\n", sum); 39 | 40 | if ( garb0 == 127 ) { 41 | puts("Success !"); 42 | //klee_report_error("err",21,"Secret found!","txt"); 43 | } 44 | return 0; 45 | } 46 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/3_file_5.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/for/3_file_5.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/3_file_7.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb2 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 8128) 36 | printf("Sum is: %d\n", sum); 37 | else 38 | printf("Sum is: %d\n", sum); 39 | 40 | if ( garb3 == 127 ) { 41 | puts("Success !"); 42 | //klee_report_error("err",39,"Secret found!","txt"); 43 | } 44 | return 0; 45 | } 46 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/4_file_18.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/for/4_file_18.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/4_file_19.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 127) 32 | printf("if-1-win "); 33 | else 34 | printf("if-1-lose "); 35 | 36 | if (c == 63) 37 | printf("if-2-win\n"); 38 | else 39 | printf("if-2-lose\n"); 40 | 41 | if ( garb3 == 127 ) { 42 | puts("Success !"); 43 | //klee_report_error("err",40,"Secret found!","txt"); 44 | } 45 | return 0; 46 | } 47 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/4_file_22.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/for/4_file_22.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/4_file_28.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 1) { 32 | if (c == 127) 33 | printf("win\n"); 34 | else 35 | printf("lose\n"); 36 | } else { 37 | printf("Usage: program-name character\n"); 38 | } 39 | if ( garb3 == 127 ) { 40 | puts("Success !"); 41 | //klee_report_error("err",38,"Secret found!","txt"); 42 | } 43 | return 0; 44 | } 45 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/4_file_33.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/for/4_file_33.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/4_file_35.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 63) { 32 | printf("if-1-win "); 33 | 34 | if (c == 127) 35 | printf("if-2-win\n"); 36 | else 37 | printf("if-2-lose\n"); 38 | } else { 39 | printf("if-1-lose\n"); 40 | } 41 | if ( garb3 == 127 ) { 42 | puts("Success !"); 43 | //klee_report_error("err",40,"Secret found!","txt"); 44 | } 45 | return 0; 46 | } 47 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/4_file_35.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/for/4_file_35.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/4_file_39.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 127) { 34 | sum += 1; 35 | } 36 | 37 | sum += i; 38 | } 39 | 40 | printf("Sum is: %d\n", sum); 41 | 42 | if ( garb3 == 127 ) { 43 | puts("Success !"); 44 | //klee_report_error("err",41,"Secret found!","txt"); 45 | } 46 | return 0; 47 | } 48 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/4_file_47.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/for/4_file_47.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/4_file_5.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 127) 40 | sum += *t; 41 | else 42 | sum *= *t; 43 | 44 | printf("Sum is: %d\n", sum); 45 | 46 | if ( garb3 == 127 ) { 47 | puts("Success !"); 48 | //klee_report_error("err",45,"Secret found!","txt"); 49 | } 50 | return 0; 51 | } 52 | -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/4_file_5.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/experiments/DeObfs/ACSAC2019/for/for/4_file_5.elf -------------------------------------------------------------------------------- /experiments/DeObfs/ACSAC2019/for/for/4_file_7.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char* argv[]) { 5 | 6 | int garb3 = 0; 7 | for (int it=0; it 0: 40 | #take[name] = 41 | print(name, [t2 - t1, hex(simgr.found[0].solver.eval(input))]) 42 | 43 | def killFor(program): 44 | name = program[program.rfind("/") + 1:] 45 | proj = angr.Project(program, auto_load_libs=False) 46 | puts_func = proj.loader.find_symbol("puts").rebased_addr 47 | 48 | cfg = proj.analyses.CFGFast() 49 | for node in cfg.graph.nodes: 50 | for succ in node.successors: 51 | if succ.addr == puts_func: 52 | secret = node.predecessors[0].addr 53 | break 54 | proj = angr.Project(program, auto_load_libs=True) 55 | input = claripy.BVS("x", 8 * 4) 56 | #state = proj.factory.entry_state() 57 | state = proj.factory.entry_state(argc=2, args=[program, input]) 58 | #proj.factory.call_state() 59 | #open veritesting feature 60 | simgr = proj.factory.simgr(state) 61 | main_func = proj.loader.find_symbol("main").rebased_addr 62 | 63 | while simgr.active[0].solver.eval(simgr.active[0].ip) != main_func: 64 | simgr.step() 65 | 66 | state = simgr.active[0] 67 | simgr = proj.factory.simgr(state) 68 | simgr.use_technique(angr.exploration_techniques.Veritesting(loop_unrolling_limit=256)) 69 | t1 = time.time() 70 | print("SECRET: " + hex(secret)) 71 | simgr.explore(find=secret) 72 | t2 = time.time() 73 | if len(simgr.found) > 0: 74 | #take[name] = 75 | print(name, [t2 - t1, hex(simgr.found[0].solver.eval(input))]) 76 | 77 | def killCommon(): 78 | elf = compile() 79 | take = {} 80 | for program in elf: 81 | name = program[program.rfind("/") + 1:] 82 | if not name.startswith("4_"): 83 | continue 84 | proj = angr.Project(program, auto_load_libs=False) 85 | puts_func = proj.loader.find_symbol("puts").rebased_addr 86 | 87 | cfg = proj.analyses.CFGFast() 88 | for node in cfg.graph.nodes: 89 | for succ in node.successors: 90 | if succ.addr == puts_func: 91 | secret = node.predecessors[0].addr 92 | break 93 | proj = angr.Project(program, auto_load_libs=True) 94 | input = claripy.BVS("x", 8 * 4) 95 | #state = proj.factory.entry_state() 96 | state = proj.factory.entry_state(argc=2, args=[program, input]) 97 | #proj.factory.call_state() 98 | #open veritesting feature 99 | simgr = proj.factory.simgr(state) 100 | main_func = proj.loader.find_symbol("main").rebased_addr 101 | 102 | while simgr.active[0].solver.eval(simgr.active[0].ip) != main_func: 103 | simgr.step() 104 | 105 | state = simgr.active[0] 106 | simgr = proj.factory.simgr(state) 107 | simgr.use_technique(angr.exploration_techniques.Veritesting(loop_unrolling_limit=256)) 108 | t1 = time.time() 109 | print("SECRET: " + hex(secret)) 110 | simgr.explore(find=secret) 111 | t2 = time.time() 112 | if len(simgr.found) > 0: 113 | take[name] = [t2 - t1, hex(simgr.found[0].solver.eval(input))] 114 | print(name, take[name]) 115 | 116 | print(take) 117 | f = open("D:\\output_3.txt", "w") 118 | f.write(str(take)) 119 | f.close() 120 | 121 | 122 | for program in elf: 123 | name = program[program.rfind("/") + 1:] 124 | if not name.startswith("4_"): 125 | continue 126 | proj = angr.Project(program, auto_load_libs=False) 127 | puts_func = proj.loader.find_symbol("puts").rebased_addr 128 | 129 | cfg = proj.analyses.CFGFast() 130 | for node in cfg.graph.nodes: 131 | for succ in node.successors: 132 | if succ.addr == puts_func: 133 | secret = node.predecessors[0].addr 134 | break 135 | proj = angr.Project(program, auto_load_libs=True) 136 | input = claripy.BVS("x", 8 * 4) 137 | #state = proj.factory.entry_state() 138 | state = proj.factory.entry_state(argc=2, args=[program, input]) 139 | #proj.factory.call_state() 140 | #open veritesting feature 141 | simgr = proj.factory.simgr(state) 142 | main_func = proj.loader.find_symbol("main").rebased_addr 143 | 144 | while simgr.active[0].solver.eval(simgr.active[0].ip) != main_func: 145 | simgr.step() 146 | 147 | state = simgr.active[0] 148 | simgr = proj.factory.simgr(state) 149 | simgr.use_technique(angr.exploration_techniques.Veritesting(loop_unrolling_limit=256)) 150 | t1 = time.time() 151 | print("SECRET: " + hex(secret)) 152 | simgr.explore(find=secret) 153 | t2 = time.time() 154 | if len(simgr.found) > 0: 155 | take[name] = [t2 - t1, hex(simgr.found[0].solver.eval(input))] 156 | 157 | print(take) 158 | f = open("D:\\output_4.txt", "w") 159 | f.write(str(take)) 160 | f.close() 161 | def killHardened(): 162 | #source_path = "../hade-master/experimental_data/src/secretFinding/for/" 163 | source_path = "../hade-master/hardened/secret_finding/for5/" 164 | #elf = compile() 165 | #elf = {"file_5.elf" : 0x4012ba} 166 | elf = {"file_3.elf" : 0x401302, "file_0.elf" : 0x4012d0, "file_1.elf" : 0x4012e9, "file_4.elf" : 0x4012ba, "file_5.elf" : 0x4012ba, "file_8.elf" : 0x4012ba} 167 | #for program in elf: 168 | for (program, secret) in elf.items(): 169 | if program.find("1_") == -1: 170 | continue 171 | proj = angr.Project(source_path + program, auto_load_libs=True) 172 | 173 | input = claripy.BVS("x", 8 * 20) 174 | #state = proj.factory.entry_state() 175 | state = proj.factory.entry_state(argc=2, args=[source_path + program, input]) 176 | #proj.factory.call_state() 177 | #open veritesting feature 178 | simgr = proj.factory.simgr(state) 179 | main_func = proj.loader.find_symbol("main").rebased_addr 180 | 181 | while simgr.active[0].solver.eval(simgr.active[0].ip) != main_func: 182 | simgr.step() 183 | 184 | state = simgr.active[0] 185 | simgr = proj.factory.simgr(state) 186 | simgr.use_technique(angr.exploration_techniques.Veritesting(loop_unrolling_limit=256)) 187 | t1 = time.time() 188 | simgr.explore(find=secret) 189 | t2 = time.time() 190 | if len(simgr.found) > 0: 191 | print("ATTACK " + program + " SUCCESSFULLY!") 192 | print("TIME: " + str(t2 - t1)) 193 | print("INPUT: " + hex(simgr.found[0].solver.eval(input))) 194 | 195 | 196 | 197 | 198 | if __name__ == "__main__": 199 | print(len(sys.argv)) 200 | if len(sys.argv) == 2: 201 | killFor(sys.argv[1]) 202 | elif len(sys.argv) == 3: 203 | killForWithSecret(sys.argv[1], int(sys.argv[2])) 204 | -------------------------------------------------------------------------------- /experiments/Z3-Solver/factoring.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | import matplotlib 3 | import numpy as np 4 | import z3 5 | import math 6 | import time 7 | 8 | def isPN(a): 9 | for i in range(2, int(math.sqrt(a))): 10 | if a % i == 0: 11 | return False 12 | return True 13 | 14 | def getPN(a): 15 | i = 1 16 | while not isPN(a + i): 17 | i += 1 18 | return a + i 19 | 20 | X = [] 21 | Y = [] 22 | 23 | a1 = z3.BitVec("x", 32) 24 | a2 = z3.BitVec("y", 32) 25 | z3.set_param("timeout", 300 * 1000) 26 | p1 = getPN(10 ** 4 + 3482) 27 | for i in range(0, 10): 28 | p2 = getPN(10 ** i) 29 | X.append(int(math.log10(p1 * p2))) 30 | s = z3.Solver() 31 | s.add(a1 * a2 == p1 * p2) 32 | s.add(a1 != 1) 33 | s.add(a2 != 1) 34 | s.add(z3.ULT(a1, p1 * p2)) 35 | s.add(z3.ULT(a2, p1 * p2)) 36 | s.add(z3.ZeroExt(32, a1) * z3.ZeroExt(32, a2) == p1 * p2) 37 | t1 = time.time() 38 | s.check() 39 | 40 | t2 = time.time() 41 | print(p1, p2, p1 * p2, t2 - t1) 42 | 43 | Y.append(int(t2 - t1)) 44 | 45 | 46 | fig1 = plt.figure() 47 | ax = fig1.add_subplot(1, 1, 1) 48 | ax.set_xlabel("The order of magnitude of a large number") 49 | ax.set_ylabel("The time for z3-solver to find the factors") 50 | plt.scatter(X, Y, s=6, c="b") 51 | plt.plot(X, Y, c="y") 52 | plt.show() 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /tools/pass/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | PROJECT(Obfuscation) 2 | 3 | find_package(LLVM REQUIRED CONFIG) 4 | 5 | separate_arguments(LLVM_DEFINITIONS_LIST NATIVE_COMMAND ${LLVM_DEFINITIONS}) 6 | add_definitions(${LLVM_DEFINITIONS_LIST}) 7 | include_directories(${LLVM_INCLUDE_DIRS}) 8 | 9 | add_subdirectory(Obfuscation) 10 | -------------------------------------------------------------------------------- /tools/pass/Obfuscation/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(Obfuscation MODULE pass.cpp) 2 | -------------------------------------------------------------------------------- /tools/pass/Obfuscation/pass.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by chengrui on 1/17/22. 3 | // 4 | 5 | #ifndef OBFSPASS_PASS_H 6 | #define OBFSPASS_PASS_H 7 | 8 | 9 | class pass { 10 | 11 | }; 12 | 13 | 14 | #endif //OBFSPASS_PASS_H 15 | -------------------------------------------------------------------------------- /击败SOTA反混淆方法.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/击败SOTA反混淆方法.pdf -------------------------------------------------------------------------------- /击败SOTA反混淆方法.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DrShabulaji/Paper_Obfs/9d478de98863fd5a92bb06abb040b4157bdbff56/击败SOTA反混淆方法.pptx --------------------------------------------------------------------------------