Windows操作系统环境下调查USB设备使用痕迹方法研究

admin 2023年1月1日15:16:29Windows操作系统环境下调查USB设备使用痕迹方法研究已关闭评论70 views字数 7521阅读25分4秒阅读模式

引用本文

段严兵, 罗文华. Windows操作系统环境下调查USB设备使用痕迹方法研究[J]. 刑事技术,2015,40(2): 138-141

DUAN Yan-bing, LUO Wen-hua. USB Device Usage Traces in Windows Environment[J]. Forensic Science and Technology,2015,40(2): 138-141  

Permissions

Copyright©2015, 《刑事技术》编辑部

《刑事技术》编辑部

Windows操作系统环境下调查USB设备使用痕迹方法研究

中国刑事警察学院网络犯罪侦查系,沈阳 110854

作者简介:段严兵(1973—),女,辽宁沈阳人,副教授,博士,研究方向为网络安全、电子物证。 E-mail:[email protected]

摘要

获取送检介质曾经挂载的USB设备使用痕迹,是电子数据取证实践中典型鉴定需求之一。虽然现有取证工具有的声称支持此类信息的分析,但实际工作中发现其提取到的痕迹(特别是USB设备序列号)并不准确,同时也不够全面(如缺少USB设备被分配的盘符信息),难于满足取证实践的需要。传统的此类痕迹调查完全依靠注册表中的USBSTOR表键,为弥补其不足,本文基于电子数据取证视角,在详细说明USBSTOR表键取证关键的基础上,增加了USB和UMB表键的分析;并阐述了在相关注册表键被清除的情况下,如何依靠系统文件补充调查USB设备使用过程中可能留有的痕迹。实践证明,所述方法准确高效。

关键词:
电子物证; USB设备; 使用痕迹; 注册表; 设备序列号; 系统文件

中图分类号:DF793.2
文献标志码:A
文章编号:1008-3650(2015)02-0138-04
doi: 10.16467/j.1008-3650.2015.02.013

USB Device Usage Traces in Windows Environment

DUAN Yan-bing, LUO Wen-hua

Department of Network Criminal Investigation, National Police University of China, Shenyang 110854, China

Abstract

In the practice of digital forensics, the key evidence to prove the criminal facts mostly exists in the mounted USB devices. To obtain the usage traces of inspecting USB devices ever being mounted is a typical identification requirement of digital forensics. There are some existing forensic tools that support the analysis of such information. However, extracting traces in actual work is not accurate (especially USB device serial number) and not complete (such as lacking the information of USB drive letter). It is difficult to meet the need of forensic practice. In order to make up for deficiencies, this paper investigates USB devices usage traces from two aspects based on the perspective of the electronic data forensics. One is using the registry to inspect USB devices usage traces. The registry is the main and important source of USB devices usage traces. This paper describes the forensics of USB key and USBSTOR key in detail, and gives the extracting method of temporal information and correlation method with MountedDevices key. It also provides the analysis of UMB key that is the new increase of Windows 7 system. UMB key covers the important information for USB key and USBSTOR key, which indicates the information of USB drive letter and makes up for the defect of MountedDevices key. The other aspect is using the system files to inspect USB devices usage traces. This also has direct significance for meeting forensic requirements. Setupapi.dev.log file in Windows 7 system partition contains the data about the equipment replacement, the driver change and the important system modification. The investigation and analysis of Setupapi.dev.log file usually obtains the same effect as that of registry. The system log in Windows 7 event log increases the audit to USB devices. It records the unloading information of USB devices. The shortcut files in Recent folder contain the target file attributes and users’ operation information, which can change with user behaviors. Using WFA tool and Windows 7 files with extension automaticDestinations-ms can resolve the target file information of the shortcut files in the Recent folder. IconCache.db is the icon cache file for windows system. Users’ behaviors using Windows system can gradually add to the IconCache.db file, including the information of file icon, storage path and so on. Using IconCache.db file also can analyze the usage traces of USB devices. When users connect USB storage devices to computer system, the information will be added to the IconCache.db database if the root directory contains executable program. In addition, this paper expounds how to rely on the system files to make a supplementary investigation of USB usage traces in the case of the relevant registry keys being cleared. Proved by practice, the method is accurate and efficient.

Keyword:
digital forensics; USB devices; usage traces; registry; device serial number; system files

USB是一种外部总线标准, Universal Serial BUS(通用串行总线)的英文缩写, 用于电脑与外部设备的连接和通讯。典型的USB设备主要包括U盘、移动硬盘、数码相机、扫描仪、图像设备、打印机、键盘和鼠标等。电子数据取证实践发现, 能够证明嫌疑人犯罪事实的关键证据很多情况下存在于计算机主机挂载过的USB设备中[1]。因此基于计算机主机调查USB设备使用痕迹对于电子证据相关性分析, 证据链建立, 以及扩大证据介质来源具有极其重要的实战意义。

实际工作中通常会利用自动获取工具进行USB设备使用痕迹分析。利用UsbViewer工具抽取出的USB设备信息, 主要包含有设备名称、设备类型、设备序列号、首次挂载时间及最近一次挂载时间等。此类工具完全依赖注册表进行信息收集, 在相关注册表项被删除(如UsbViewer即自带“ 清除痕迹” 功能)的情况下便不具实战意义。另外, 实践发现基于智能工具分析出的痕迹信息存在不全面与不准确之处。鉴于此种情况, 立足于操作系统整体环境分析USB设备使用痕迹的重要作用逐渐凸显。

1 Windows环境下调查USB使用痕迹

1.1 基于注册表调查USB设备使用痕迹

注册表是USB设备使用痕迹最主要且最重要的来源。HKLM\SYSTEM\CurrentControlSet\Enum\下的USB表键使用VID_v(4)& PID_d(4)格式描述USB设备。其中, v(4)代表4个数字的销售商代码(由 USB协会分配给各销售商); d(4)代表4个数字的产品代码(由销售商分配给其生产的产品)。从图1可以看出, 某USB设备的VID为“ 090c” , PID 为“ 1000” , 其设备序列号为“ AA20091118000001” 。USBSTOR表键则使用Disk& Ven_iManufacturer& Prod_iProduct& Rev_r(4)格式进行描述。iManufacturer表示制造厂商, iProduct表示设备类型, r(4)则为修正码。图2所示即为该设备的制造厂商为Newsmy, 设备类型为FLSAH_DISK, 修正码为1100, 但设备序列号比USB表键多了“ & 0” 两个字符。其实, “ & 0” 一类的字符串为系统自动添加, 不属于设备序列号范畴。UsbViewer工具即基于USBSTOR表键进行信息抽取, 因此获取到的序列号通常情况下并不完全准确。值得一提的是, 如USB设备中未包含有序列号信息, Windows则会通过系统自动生成的字符串标识该
设备。

图1图2可以看出, USB表键和USBSTOR表键均未包含挂载的时间信息, 实际上此处时间信息是以属性形式进行存储的。选择以序列号为名称的子键, 单击右键选择“ 导出” , 并将“ 保存类型” 选为“ 文本文件” , 打开保存后的文本文件即可获得时间信息。还需要指出的是, USBSTOR表键下有一名为ParentIdPrefix键值, 该键值数据通过关联MountedDevices表键可以指示出USB设备的盘符信息。比如, 图2所示的ParentIdPrefix键值数据内容为“ 7& 3a221764& 0” , MountedDevices表键下的“ \DosDevices\I:” 键值数据内容中亦出现有“ \Storage#RemoveableMedia#7& 3a221764& 0” 字样(图3), 说明该设备被分配的盘符为I。遗憾的是, MountedDevices表键下的信息只会存储最近一次挂载的ParentIdPrefix键值信息, 无法追溯盘符分配的历史记录。Windows 7注册表中则不再含有ParentIdPrefix键值, 而是通过设备序列号与MountedDevices表键关联, 以确定盘符。

Windows 7中最新设置的UMB表键为追踪USB设备提供了更大的便利[2]。该表项涵盖了USB和USBSTOR表键的重要信息, 同时指示出USB设备被分配的盘符, 弥补了MountedDevices表键的不足。从图4可以看出, 序列号为AA20091118000001的USB设备对应盘符为I。需要指出的是, Windows 7与Windows XP均是在重启计算机之后才会对USB设备挂载时间进行更新(第一次挂载除外)。

1.2 基于系统文件调查USB设备使用痕迹

Windows 7系统分区下的\Windows\inf\Setupapi.dev.log文件(Windows XP环境下则为\Windows \set upapi.log)包含有关设备更换、驱动程序更改和重要系统修改等数据。从图5可以看出, 该文件记载有制造厂商、设备类型、设备序列号、首次挂载时间等详细的USB设备信息。基于该文件进行调查分析一般可以获得与注册表同样的效果。

Windows 7事件日志增加了对USB设备的审核。图6所示为事件日志中的系统日志记录有设备序列号为AA20091118000001的USB设备卸载要求被拒绝记录, 其事件ID为20011。与USB设备相关的事件ID还有20001、20003、24576、24577等。

为了方便计算机用户快速查找最近使用过的文件, Windows操作系统设置了Recent文件夹, 该文件夹默认存放路径为\Users\UserName\AppData\Roaming\Microsoft\Windows\Recent(Windows XP下则为\Docu ments and Settings\UserName\Recent)。Recent文件夹有隐藏属性, 只有在文件夹选项中取消“ 隐藏受保护的操作系统文件” 后, 才能正常查看Recent文件夹。Recent文件夹下存放的实际是文件(或文件夹及应用程序)的快捷方式文件, 其扩展名为lnk(见图7)。此类快捷方式文件包含的有目标文件属性及用户操作信息, 这些信息会跟随用户行为改变而发生改变[3]

图8所示为利用WFA(Windows File Analyzer)工具解析出的内嵌于快捷方式文件中的目标文件信息, 主要包括目标文件路径、创建时间、修改时间、访问时间等。值得一提的是, 该工具解析出的时间信息并未考虑时区因素, 因此文件“ 2012级体改生毕业设计选题情况统计表.xls” 的修改时间才会显示为“ 2014/10//30 0:16:34” 。实际工作中需加上8h(东八时区)才能获知文件真实操作时间。另外, Windows 7为实现跳转列表功能而设置了扩展名为automaticDestinations-ms的文件(\Users\%username%\AppData\Roaming\Microsoft\Windows\Recent\Automatic Destinations文件夹下), 利用此类文件同样可以分析出与Recent文件夹下快捷方式文件类似的痕迹信息[4]

IconCache.db是Windows操作系统用于缓存图标的文件, 在Windows 7系统中该文件位于C:\Users\Username\AppData\Local\文件夹下(在Windows XP系统中该文件则存放在C:\Document and Settings\Username\ Local Settings\Application Data下)。IconCache.db是隐藏文件, 需要在文件夹选项中显示所有文件和文件夹才能正常查看(见图9)。Windows操作系统利用Icon Cache.db文件缓存图标信息, 实现在特定文件夹下快速展现文件图标, 以减轻系统重新解析所造成的负担。

用户使用Windows系统的过程中, 系统会逐渐向IconCache.db文件添加文件图标、文件存储路径等信息。当用户把USB存储设备连接至计算机系统后, 如果USB存储设备的根目录下包含可执行程序, 无论它是否运行, 其文件名称、图标、存储位置、USB设备盘符等信息就会自动添加至IconCache.db数据库中(见图10)。此外, 如果用户浏览的文件夹含有可执行程序, 也会自动追加相应信息。基于IconCache.db文件分析USB设备使用痕迹的局限是需要对应文件夹下有可执行程序, 并且只能分析出盘符信息[5]

2 结 论

调查已知USB设备是否在特定主机上挂载过或特定主机挂载过哪些USB设备是电子数据取证工作中常见的鉴定需求。注册表、Setupapi.dev.log文件及事件日志包含的信息对上述鉴定需求具有直接的重要意义, Recent文件夹、automaticDestinations-ms文件和IconCache.db文件则一般通过USB设备存放的文件信息辅助间接进行证明。另外, 当部分注册表表项或系统文件内容被删除时, 需针对操作系统整体环境进行深入挖掘才可能关联出USB设备使用痕迹。

The authors have declared that no competing interests exist.

参考文献

[1] Carvey H. Windows forensic analysis[M] . USA: Syngress, 2012: 134-156.
[本文引用:1]
[2] 罗文华. Windows环境下可执行文件操作痕迹分析方法研究[J] . 刑事技术, 2013(8): 61-63.
[本文引用:1]
[3] Russinovich M R, Solomon D A. Microsoft windows internals: windows server 2008 and windows vista (5th ed)[M] . USA: Microsoft Press, 2009: 246-266.
[本文引用:1]
[4] Barnett A. The forensic value of the Windows 7 jump list[OL] . [2012] . http://www.alexbarnett.com/jumplist-forensics.pdf.
[本文引用:1]
[5] Dolan-Gavitt B. The windows IconCache. db: a resource for forensic artifacts from USB connectable devices[J] . Digital Investigation, 2013(9): 200-210.
[本文引用:1]

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2023年1月1日15:16:29
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   Windows操作系统环境下调查USB设备使用痕迹方法研究http://cn-sec.com/archives/1493272.html