ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [2021/01/18][짤막한 이야기 - 섹션 권한]
    짤막한 이야기 2021. 2. 3. 15:12
    728x90
    반응형

    [2021/01/18][짤막한 이야기 - 섹션 권한]
    Windows 프로그램은 헤더와 본문으로 구성된다.
    정확히는 “PE 헤더”, “몇몇개의 섹션 헤더”, 그리고 “몇몇개의 섹션 본문”이 프로그램의 구성 요소이다.
    각 섹션 헤더에는 이름, 주소, 크기, 권한 등의 섹션 본문에 대한 정보가 저장되어 있다.
    “읽기/쓰기/실행” 권한은 잘못 설정되면 프로그램이 쉽게 공격받기 때문에 섹션에서 매우 중요한 요소이다.
    기본적으로 프로그램에는 쓰기 권한과 실행 권한을 동시에 가지는 섹션이 없도록 설정하는 것이 중요하다.
    위의 사항을 만족하면 악성코드가 섹션에 삽입되더라도 이를 실행할 수 없고, 악성코드가 실행 가능하더라도 삽입이 불가능하기 때문에 다소 안전할 수 있다.
    이러한 보안 속성을 DEP(Data Execution Prevention, 데이터 실행 방지) 혹은 W^X(Write ^ eXecute)라고 한다.
    코드 패킹 기법은 위의 보안 속성을 만족하지 않는 대표적인 보호 기법(언패킹 과정에서는 쓰기 권한을 사용하고, 언패킹 완료된 코드를 실행하기 때문)이다.
    따라서 코드 패킹은 매우 유용한 보호 기술이지만, 한편으로는 코드 주입 공격에 취약할 수 있다.
    [관련된 짤막한 이야기 - 코드 패킹[2021/01/15]]
    #이야기#루니프#섹션#권한#DEP#W^Y#악성코드#코드주입

    [2021/01/18][Short Story - Section Permission]
    The Windows program consists of a header and body.
    More precisely, “PE Header”, “# of Section Headers”, and “# of Section Bodys” are components of the program.
    Each section header has information about the section body such as a name, address, size, and permissions.
    “Read/Write/Execute” permissions are very important in the section because if they are set incorrectly, the program is easily attacked.
    Basically, it is important that there is no section in the program that has both write and execute permission.
    If the above is satisfied, even if the malicious code is inserted into the section, it cannot be executed, and even if malicious code is executable because it cannot be inserted, so it may be somewhat safe.
    This security property is called DEP(Data Execution Prevention) or W^X(Write ^ eXecute).
    Code packing technique is a representative protection technique that does not satisfy the above security property(because write permission is used in the unpacking process and execute permission is used in the execution of unpacked code).
    Therefore it may be somewhat vulnerable to code injection attack even if it is a very useful protection technique.
    [Related Short Story - Code Packing [2021/01/15]]
    #Story#LootNiP#Section#Permission#DEP#W^X#Malware#CodeInjection

    728x90
    반응형
Designed by Tistory.