PE file security directory

Тема в разделе "WASM.RESEARCH", создана пользователем Broken Sword, 4 фев 2006.

  1. Broken Sword

    Broken Sword Robert

    Публикаций:
    0
    Регистрация:
    30 авг 2002
    Сообщения:
    433
    Собсно, сабж. Не нарыл никакой инфы. Поделитесь кто копал.
     
  2. TermoSINteZ

    TermoSINteZ Синоби даоса Команда форума

    Публикаций:
    2
    Регистрация:
    11 июн 2004
    Сообщения:
    3.552
    Адрес:
    Russia
    в одном документе нашел кусочек :

    ....

    After the 'NumberOfRvaAndSizes' there is an array of

    IMAGE_NUMBEROF_DIRECTORY_ENTRIES (16) IMAGE_DATA_DIRECTORYs.

    Each of these directories describes the location (32 bits RVA called

    'VirtualAddress') and size (also 32 bit, called 'Size') of a particular

    piece of information, which is located in one of the sections that

    follow the directory entries.

    For example, the security directory is found at the RVA and has the size

    that are given at index 4.

    The directories that I know the structure of will be discussed later.

    Defined directory indexes are:



    IMAGE_DIRECTORY_ENTRY_EXPORT (0)

    The directory of exported symbols; mostly used for DLLs.

    Described below.



    IMAGE_DIRECTORY_ENTRY_IMPORT (1)

    The directory of imported symbols; see below.



    IMAGE_DIRECTORY_ENTRY_RESOURCE (2)

    Directory of resources. Described below.



    IMAGE_DIRECTORY_ENTRY_EXCEPTION (3)

    Exception directory - structure and purpose unknown.



    IMAGE_DIRECTORY_ENTRY_SECURITY (4)

    Security directory - structure and purpose unknown.



    ....



    Вот собственно все, что нашел у себя в доках.

    Но сам не копал в эту сторону.
     
  3. Broken Sword

    Broken Sword Robert

    Публикаций:
    0
    Регистрация:
    30 авг 2002
    Сообщения:
    433
    Security directory - structure and purpose unknown.

    мега полезная инфа
     
  4. bugg333

    bugg333 New Member

    Публикаций:
    0
    Регистрация:
    4 фев 2006
    Сообщения:
    5
    Цифовая подпись туда пишатся.
     
  5. volodya

    volodya wasm.ru

    Публикаций:
    0
    Регистрация:
    22 апр 2003
    Сообщения:
    1.169
    http://www.cs.auckland.ac.nz/~pgut001/pubs/authenticode.txt



    Dumping DLL certs



    Is there a openssl command to dump the details of a

    signed DLL under Win-XP?



    With a command like

    CertMgr -add -all ipworks6.dll copy.crt



    I can extract the security part of the IPWorks6.dll. Now I want to dump

    and process the contents of copy.crt using OpenSSL tools.



    pedump says the format is PKCS, but I'm not sure if it some

    MS proprietary format or not (AuthentiCode?). The above dll is just an

    example (ships with the 4NT cmd-processor).



    BTW. Anybody know of a free program (cross-platform?) that can add

    certificates to a DLL? AFAICS, the cert is written in a PE optional header

    IMAGE_DIRECTORY_ENTRY_SECURITY with a simple length/type header

    (struct _WIN_CERTIFICATE). Should be easy enough to add once I know

    the format of the PKCS signed data.



    Думаю, вполне понятно, куда копать далее.
     
  6. Broken Sword

    Broken Sword Robert

    Публикаций:
    0
    Регистрация:
    30 авг 2002
    Сообщения:
    433
    volodya, да, более чем. спасибо