如何识别/发现被 ADS 隐藏的文件?

信息安全 视窗 文件系统 替代数据流
2021-09-09 02:31:52

ADS 或备用数据流于 1993 年(第一个 Windows NT 版本)作为新的 NTFS 文件系统的一项功能添加到 Windows 中,以帮助支持当时 Mac OS 的某些功能。我喜欢阅读有关安全性的内容,最近阅读了有关病毒、木马、键盘记录程序等如何使用 ADS 隐藏的信息,因为该文件是不可见的 - 不像隐藏文件,但对 Windows 资源管理器甚至dir命令完全不可见在命令提示符中。基本上它就像计算机病毒的安妮弗兰克一样,它隐藏在那里并且没有人知道它,这就是它可能对计算机用户构成威胁的原因。

有没有办法在不使用专门程序的情况下检测这些 ADS 文件,如果没有,检测这些文件的程序/方法是什么?

2个回答

在命令行环境中,在目录列表中dir /R 包含ADS。它的其他选项照常工作,因此dir可以列出单个文件、通配符或(默认)整个目录;和可选的所有子目录。

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Windows\system32>dir /?
Displays a list of files and subdirectories in a directory.

DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N]
  [/O[[:]sortorder]] [/P] [/Q] [/R] [/S] [/T[[:]timefield]] [/W] [/X] [/4]

  [drive:][path][filename]
              Specifies drive, directory, and/or files to list.

  /A          Displays files with specified attributes.
  attributes   D  Directories                R  Read-only files
               H  Hidden files               A  Files ready for archiving
               S  System files               I  Not content indexed files
               L  Reparse Points             -  Prefix meaning not
  /B          Uses bare format (no heading information or summary).
  /C          Display the thousand separator in file sizes.  This is the
              default.  Use /-C to disable display of separator.
  /D          Same as wide but files are list sorted by column.
  /L          Uses lowercase.
  /N          New long list format where filenames are on the far right.
  /O          List by files in sorted order.
  sortorder    N  By name (alphabetic)       S  By size (smallest first)
               E  By extension (alphabetic)  D  By date/time (oldest first)
               G  Group directories first    -  Prefix to reverse order
  /P          Pauses after each screenful of information.
  /Q          Display the owner of the file.

  /R          Display alternate data streams of the file.

  /S          Displays files in specified directory and all subdirectories.
  /T          Controls which time field displayed or used for sorting
  timefield   C  Creation
              A  Last Access
              W  Last Written
  /W          Uses wide list format.
  /X          This displays the short names generated for non-8dot3 file
              names.  The format is that of /N with the short name inserted
              before the long name. If no short name is present, blanks are
              displayed in its place.
  /4          Displays four-digit years

Switches may be preset in the DIRCMD environment variable.  Override
preset switches by prefixing any switch with - (hyphen)--for example, /-W.

dir没有选项列出具有 ADS 的文件。另请参阅https://stackoverflow.com/questions/16333782/how-to-display-only-files-that-have-alternate-data-streams-in-command-prompt

除了在 CMD 中使用“dir /R”开关之外,这里还有一个相当全面的替代数据流 (ADS) 管理和扫描工具列表。虽然 DIR 命令仅列出当前目录中的 ADS 文件,但以下工具使您能够扫描整个驱动器并轻松查看它们。

广告管理器

FlexHex 流

另请查看此链接 以获取更多 ADS 信息和资源

LADS - Frank Heyne 列出备用数据流

来自SysInternals的 Streams.exe:

ScanADS命令行工具:

ADS 间谍GUI 扫描仪:

Crucial ADS GUI 扫描仪:

Explorer 的ADS 探测器

CAT 等 Unix 工具的 Windows 端口:http: //unxutils.sourceforge.net/