리눅스 바이너리 보안설정 확인

문제 바이너리의 보안설정을 확인할 수 있는 스크립트다.
http://www.trapkit.de/tools/checksec.html

tester@ubuntu:~$ file tiny_easy
tiny_easy: ELF 32-bit LSB  executable, Intel 80386, version 1 (SYSV), statically linked, corrupted section header size
tester@ubuntu:~$ ./checksec.sh --file tiny_easy
RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      FILE
No RELRO        No canary found   NX enabled    No PIE          No RPATH   No RUNPATH   tiny_easy

이 외에 PEDA에서 'checksec' 명령어로도 확인이 가능하다.
https://github.com/longld/peda

tester@ubuntu:~$ gdb tiny_easy
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from tiny_easy...(no debugging symbols found)...done.
gdb-peda$ checksec
CANARY    : disabled
FORTIFY   : disabled
NX        : ENABLED
PIE       : disabled
RELRO     : disabled
gdb-peda$

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다