跳到正文

样本内容:静态分析信息-PE文件格式

PE文件的全称是Portable Executable,意为可移植的可执行的文件,常见的EXE、DLL、OCX、SYS、COM都是PE文件,PE文件是微软Windows操作系统上的程序文件(可能是间接被执行,如DLL)。

一、基本信息

名称内容
中文名称pe文件
外文名称Portable Executable
操作系统Windows
全称Portable Executable
翻译可移植的执行体

二、文件结构

PE文件的内容概要,具体详情可参考微软的标准化文档: 《PE格式》

1、编译器名称

文件编译器相关信息,包括编译器名称和具体版本内容。

2、文件头

文件头部标记了PE文件的众多可执行内容的规范。

(1)编译时间

文件编译完成的时间。

(2)节长度

节列表的长度。

(3)节

文件节的详情列表。

(4)导入函数

引用外部方法的列表。

(5)导出函数

外部可调用的方法列表。

(6)资源文件

文件所用到的资源文件列表。

3、附加数据

文件被附件上的内容。

4、调试信息

文件的调试内容。

三、完整样例结构

{
  "pe_info": {
    "debug": [
      {
        "codeview": {
          "age": 1,
          "guid": "e48addf6-fd27-4a9c-815c-bf60afa7566a",
          "name": "E:\\987.pdb",
          "offset": 1531904,
          "signature": "RSDS",
          "timestamp": "Thu May 28 05:53:24 2020"
        },
        "fpo": {
          "functions": 6
        },
        "misc": {
          "datatype": 4,
          "length": 123,
          "unicode": 455,
          "data": "e48addf6",
          "reserved": "bf60afa7566a"
        },
        "offset": 1409712,
        "reserved10": {
          "value": "4a9c"
        },
        "size": 23,
        "timedatestamp": "Thu May 28 05:53:24 2020",
        "type": 11,
        "type_str": "11"
      },
      {
        "codeview": {
          "age": 1,
          "guid": "ff8addf6-fd27-4a9c-815c-bf60afa7566a",
          "name": "E:\\223.pdb",
          "offset": 1531452,
          "signature": "RSBC",
          "timestamp": "Thu May 28 06:53:24 2020"
        },
        "fpo": {
          "functions": 3
        },
        "misc": {
          "datatype": 7,
          "length": 342,
          "unicode": 458,
          "data": "ff543e48addf6",
          "reserved": "123bf60afa7566a"
        },
        "offset": 1809712,
        "reserved10": {
          "value": "4a9ccc"
        },
        "size": 22,
        "timedatestamp": "Thu May 28 08:53:24 2020",
        "type": 12,
        "type_str": "12"
      }
    ],
    "resource_details": [
      {
        "lang": "NEUTRAL",
        "entropy": 3.280435800552368,
        "chi2": 73067.6875,
        "filetype": "Data",
        "sha256": "0f324c98411b92240e50d33e6461c41768c91b5a6c0e31b851aa748e5cb4d2de",
        "type": "RT_VERSION"
      },
      {
        "lang": "NEUTRAL",
        "entropy": 5.00111722946167,
        "chi2": 4719.86083984375,
        "filetype": "Data",
        "sha256": "539dc26a14b6277e87348594ab7d6e932d16aabb18612d77f29fe421a9f1d46a",
        "type": "RT_MANIFEST"
      }
    ],
    "resource_types": {
      "RT_MANIFEST": 1,
      "RT_VERSION": 1
    },
    "imphash": "f34d5f2d4577ed6d9ceec516c1f5a744",
    "machine_type": 332,
    "entry_point": 1521402,
    "exports": [
      "ssl",
      "new_buffer_ssl_connect",
      "new_ssl",
      "new_ssl_connect",
      "ssl_copy_session_id",
      "ssl_shutdown",
      "client_method",
      "method"
    ],
    "sections": [
      {
        "name": ".text",
        "chi2": 8871587,
        "virtual_address": 8192,
        "flags": "rx",
        "raw_size": 1513472,
        "entropy": 7.12,
        "virtual_size": 1513216,
        "md5": "d297bf8053549f4e5b9d5383e82cbf4f"
      }
    ]
  }
}