Skip to content

Instantly share code, notes, and snippets.

@ggrins
Last active July 3, 2017 22:58

Revisions

  1. ggrins revised this gist Jul 3, 2017. 4 changed files with 0 additions and 163 deletions.
    21 changes: 0 additions & 21 deletions Headers
    Original file line number Diff line number Diff line change
    @@ -1,21 +0,0 @@
    root@ggrins:~/Documents/NCL/Instructions Unclear Writeup# readelf -h NCL-2017-Spring-InstructionsUnclear-X32
    ELF Header:
    Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
    Class: ELF32
    Data: 2's complement, little endian
    Version: 1 (current)
    OS/ABI: UNIX - System V
    ABI Version: 0
    Type: EXEC (Executable file)
    Machine: Intel 80386
    Version: 0x1
    Entry point address: 0x80483dc
    Start of program headers: 52 (bytes into file)
    Start of section headers: 10279512 (bytes into file)
    Flags: 0x0
    Size of this header: 52 (bytes)
    Size of program headers: 32 (bytes)
    Number of program headers: 6
    Size of section headers: 40 (bytes)
    Number of section headers: 19
    Section header string table index: 18
    29 changes: 0 additions & 29 deletions Section Headers
    Original file line number Diff line number Diff line change
    @@ -1,29 +0,0 @@
    root@ggrins:~/Documents/NCL/Instructions Unclear Writeup# readelf -S NCL-2017-Spring-InstructionsUnclear-X32
    There are 19 section headers, starting at offset 0x9cda58:

    Section Headers:
    [Nr] Name Type Addr Off Size ES Flg Lk Inf Al
    [ 0] NULL 00000000 000000 000000 00 0 0 0
    [ 1] .interp PROGBITS 080480f4 0000f4 000013 00 A 0 0 1
    [ 2] .hash HASH 08048108 000108 000044 04 A 3 0 4
    [ 3] .dynsym DYNSYM 0804814c 00014c 0000c0 10 A 4 1 4
    [ 4] .dynstr STRTAB 0804820c 00020c 00007a 00 A 0 0 1
    [ 5] .gnu.version VERSYM 08048286 000286 000018 02 A 3 0 2
    [ 6] .gnu.version_r VERNEED 080482a0 0002a0 000030 00 A 4 1 4
    [ 7] .rel.dyn REL 080482d0 0002d0 000010 08 A 3 0 4
    [ 8] .rel.plt REL 080482e0 0002e0 000048 08 AI 3 13 4
    [ 9] .plt PROGBITS 08048330 000330 0000ac 04 AX 0 0 16
    [10] .text PROGBITS 080483dc 0003dc 010edf 00 AX 0 0 1
    [11] .eh_frame PROGBITS 080592bc 0112bc 000000 00 A 0 0 4
    [12] .dynamic DYNAMIC 0805af40 011f40 0000c0 08 WA 4 0 4
    [13] .got.plt PROGBITS 0805b000 012000 000030 04 WA 0 0 4
    [14] .data PROGBITS 0805b030 012030 5a972c 00 WA 0 0 16
    [15] .bss NOBITS 08604760 5bb75c 200010 00 WA 0 0 16
    [16] .symtab SYMTAB 00000000 5bb75c 207340 10 17 131121 4
    [17] .strtab STRTAB 00000000 7c2a9c 20af25 00 0 0 1
    [18] .shstrtab STRTAB 00000000 9cd9c1 000094 00 0 0 1
    Key to Flags:
    W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
    L (link order), O (extra OS processing required), G (group), T (TLS),
    C (compressed), x (unknown), o (OS specific), E (exclude),
    p (processor specific)
    113 changes: 0 additions & 113 deletions Strings
    Original file line number Diff line number Diff line change
    @@ -1,113 +0,0 @@
    root@ggrins:~/Documents/NCL/Instructions Unclear Writeup#strings NCL-2017-Spring-InstructionsUnclear-X32
    /lib/ld-linux.so.2
    libc.so.6
    libm.so.6
    sigaction
    exit
    strlen
    sprintf
    strcmp
    stderr
    fprintf
    stdout
    fflush
    __isoc99_scanf
    GLIBC_2.7
    GLIBC_2.0
    %4F`
    %pD
    SKY-ALTF-4810
    this doesn't seem right... try again
    whooooo, you got it!
    I guess, uh... type in a passcode:
    usage: %s <tid>
    /tmp/lcc231272.o
    __va_arg_tmp
    /root/tools/movfuscator/build//crtd.o
    pushpop
    def_not_the_flag
    discard
    validate
    and_0
    and_1
    xor_0
    xor_1
    xnor_0
    xnor_1
    alu_add16_0
    alu_add16_1
    alu_add16_2
    alu_add16_3
    alu_add16_4
    alu_add16_5
    alu_add16_6
    alu_add16_7
    alu_add16_8
    alu_add16_9
    alu_add16_10
    ...
    alu_add16_131068
    alu_add16_131069
    alu_add16_131070
    alu_add16_131071
    alu_cmp_of_0
    alu_cmp_of_1
    alu_cmp_of_00
    alu_cmp_of_01
    alu_cmp_of_10
    alu_cmp_of_11
    alu_cmp_of_000
    alu_cmp_of_001
    alu_cmp_of_010
    alu_cmp_of_011
    alu_cmp_of_100
    alu_cmp_of_101
    alu_cmp_of_110
    alu_cmp_of_111
    pop_guard
    push_guard
    no_fault
    _DYNAMIC
    _GLOBAL_OFFSET_TABLE_
    alu_bxor8_210
    alu_mul_mul8l_80
    alu_band8_56
    alu_bxor8_38
    alu_bor8_161
    alu_eq_238
    alu_bor8_169
    alu_bor8_124
    sa_dispatch
    alu_bxor8_152
    alu_bor8_20
    alu_bor8_26
    alu_mul_mul8h_226
    alu_eq_213
    sprintf@@GLIBC_2.0
    alu_bxor8_81
    __isoc99_scanf@@GLIBC_2.7
    alu_band8_184
    alu_mul_mul8h_224
    alu_add8l
    alu_rshu8_0
    alu_c
    alu_mul_mul8h_51
    alu_bor8_176
    toggle_execution
    .symtab
    .strtab
    .shstrtab
    .interp
    .hash
    .dynsym
    .dynstr
    .gnu.version
    .gnu.version_r
    .rel.dyn
    .rel.plt
    .text
    .eh_frame
    .dynamic
    .got.plt
    .data
    .bss
    File renamed without changes.
  2. ggrins revised this gist Jul 3, 2017. No changes.
  3. ggrins revised this gist Jul 3, 2017. 4 changed files with 50 additions and 0 deletions.
    File renamed without changes.
    21 changes: 21 additions & 0 deletions Headers
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    root@ggrins:~/Documents/NCL/Instructions Unclear Writeup# readelf -h NCL-2017-Spring-InstructionsUnclear-X32
    ELF Header:
    Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
    Class: ELF32
    Data: 2's complement, little endian
    Version: 1 (current)
    OS/ABI: UNIX - System V
    ABI Version: 0
    Type: EXEC (Executable file)
    Machine: Intel 80386
    Version: 0x1
    Entry point address: 0x80483dc
    Start of program headers: 52 (bytes into file)
    Start of section headers: 10279512 (bytes into file)
    Flags: 0x0
    Size of this header: 52 (bytes)
    Size of program headers: 32 (bytes)
    Number of program headers: 6
    Size of section headers: 40 (bytes)
    Number of section headers: 19
    Section header string table index: 18
    29 changes: 29 additions & 0 deletions Section Headers
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    root@ggrins:~/Documents/NCL/Instructions Unclear Writeup# readelf -S NCL-2017-Spring-InstructionsUnclear-X32
    There are 19 section headers, starting at offset 0x9cda58:

    Section Headers:
    [Nr] Name Type Addr Off Size ES Flg Lk Inf Al
    [ 0] NULL 00000000 000000 000000 00 0 0 0
    [ 1] .interp PROGBITS 080480f4 0000f4 000013 00 A 0 0 1
    [ 2] .hash HASH 08048108 000108 000044 04 A 3 0 4
    [ 3] .dynsym DYNSYM 0804814c 00014c 0000c0 10 A 4 1 4
    [ 4] .dynstr STRTAB 0804820c 00020c 00007a 00 A 0 0 1
    [ 5] .gnu.version VERSYM 08048286 000286 000018 02 A 3 0 2
    [ 6] .gnu.version_r VERNEED 080482a0 0002a0 000030 00 A 4 1 4
    [ 7] .rel.dyn REL 080482d0 0002d0 000010 08 A 3 0 4
    [ 8] .rel.plt REL 080482e0 0002e0 000048 08 AI 3 13 4
    [ 9] .plt PROGBITS 08048330 000330 0000ac 04 AX 0 0 16
    [10] .text PROGBITS 080483dc 0003dc 010edf 00 AX 0 0 1
    [11] .eh_frame PROGBITS 080592bc 0112bc 000000 00 A 0 0 4
    [12] .dynamic DYNAMIC 0805af40 011f40 0000c0 08 WA 4 0 4
    [13] .got.plt PROGBITS 0805b000 012000 000030 04 WA 0 0 4
    [14] .data PROGBITS 0805b030 012030 5a972c 00 WA 0 0 16
    [15] .bss NOBITS 08604760 5bb75c 200010 00 WA 0 0 16
    [16] .symtab SYMTAB 00000000 5bb75c 207340 10 17 131121 4
    [17] .strtab STRTAB 00000000 7c2a9c 20af25 00 0 0 1
    [18] .shstrtab STRTAB 00000000 9cd9c1 000094 00 0 0 1
    Key to Flags:
    W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
    L (link order), O (extra OS processing required), G (group), T (TLS),
    C (compressed), x (unknown), o (OS specific), E (exclude),
    p (processor specific)
    File renamed without changes.
  4. ggrins renamed this gist Jul 3, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  5. ggrins revised this gist Jul 3, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions strings
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    root@ggrins:~/Documents/NCL/Instructions Unclear Writeup#strings NCL-2017-Spring-InstructionsUnclear-X32
    /lib/ld-linux.so.2
    libc.so.6
    libm.so.6
  6. ggrins renamed this gist Jul 3, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions file → file.sh
    Original file line number Diff line number Diff line change
    @@ -1 +1,2 @@
    root@ggrins:~/Documents/NCL/Instructions Unclear Writeup#file NCL-2017-Spring-InstructionsUnclear-X32
    NCL-2017-Spring-InstructionsUnclear-X32: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, not stripped
  7. ggrins revised this gist Jul 3, 2017. No changes.
  8. ggrins revised this gist Jul 3, 2017. 1 changed file with 4 additions and 135712 deletions.
    135,716 changes: 4 additions & 135,712 deletions strings
    4 additions, 135,712 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
  9. ggrins revised this gist Jul 3, 2017. 1 changed file with 135820 additions and 0 deletions.
    135,820 changes: 135,820 additions & 0 deletions strings
    135,820 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
  10. ggrins renamed this gist Jul 3, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  11. ggrins renamed this gist Jul 3, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  12. ggrins renamed this gist Jul 3, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  13. ggrins created this gist Jul 3, 2017.
    1 change: 1 addition & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    NCL-2017-Spring-InstructionsUnclear-X32: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, not stripped