ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • object file 분석 tool
    tool 2015. 2. 6. 09:21
    Tool

    objdump :  하나 이상의 목적 파일의 정보를 화면에 표시하는 프로그램이다. disassemble이 가능하다.

    readelf :  objdump 이외에 ELF 포맷 파일의 내용을 출력하는데 유용하게 사용될 수 있는 툴이다.

    nm : 라이브러리나 실행파일에 특정 심볼(함수)가 있는지 검색가능하다.근데 readelf를 사용하면 되게 때문에 딱히 사용하지 않는 tool.
    reference :http://devanix.tistory.com/190

    ldd : 런타임때 프로그램 또는 공유 라이브러리 실행에 필요한 공유 라이브러리 목록을 보여준다. 

    즉 현재 실행 파일의 동적 의존성 라이브러리를 열거한다.

    dynamic execution에 대해서만 가능하다고 한다....


    file: file에 대한 정보알려줌.



    readelf

    이것저것 옵션을 써본 결과 readelf가 보기 편하다. 

    readelf : 

    -a --all               Equivalent to: -h -l -S -s -r -d -V -A -I

      -h --file-header       Display the ELF file header

      -l --program-headers   Display the program headers

         --segments          An alias for --program-headers

      -S --section-headers   Display the sections' header

         --sections          An alias for --section-headers

      -g --section-groups    Display the section groups

      -t --section-details   Display the section details

      -e --headers           Equivalent to: -h -l -S

      -s --syms              Display the symbol table

         --symbols           An alias for --syms

      --dyn-syms             Display the dynamic symbol table

      -n --notes             Display the core notes (if present)

      -r --relocs            Display the relocations (if present)

      -u --unwind            Display the unwind info (if present)

      -d --dynamic           Display the dynamic section (if present)

      -V --version-info      Display the version sections (if present)

      -A --arch-specific     Display architecture specific information (if any)

      -c --archive-index     Display the symbol/file index in an archive

      -D --use-dynamic       Use the dynamic section info when displaying symbols

      -x --hex-dump=<number|name>

                             Dump the contents of section <number|name> as bytes

      -p --string-dump=<number|name>

                             Dump the contents of section <number|name> as strings

      -R --relocated-dump=<number|name>

                             Dump the contents of section <number|name> as relocated bytes


    program header 


    readelf -l output.lo



    program section header 


    readelf -S output.lo

    readelf -t output.lo(more specific

    objdump -h output.lo



    elf파일의 section정보를 확인할 수 있다.


    program header 


    readelf -l a.out

    objdump -p a.out




    symbol table확인 : objdump -t a.out, readelf -s a.out




    relocation table확인 : readelf -r a.out



    'tool' 카테고리의 다른 글

    [linux] sublime  (0) 2016.05.26
    Virtuoso installation and walkthorugh  (0) 2015.05.18
    Virtual Machine Introspection  (0) 2015.03.12
    windows putty로 ssh 터널링  (0) 2014.10.02
    IDA, olly, windbg shortcut  (0) 2013.07.25
Designed by Tistory.