在MS Office文档属性中隐藏Payload的技术解析

在MS Office文档属性中隐藏Payload

Carrie Roberts* //
你是否想过为何要在MS Office文档属性中插入超长注释?本文介绍的PowerShell脚本可突破应用程序限制实现该功能。动画演示展示了脚本运行效果:

  1. 突破长度限制:原生Word/Excel/PowerPoint对注释字段有长度限制,该脚本可完全绕过
  2. 属性清洗功能:包含"Sanitize"选项可清除"作者"和"最后修改者"等元数据
  3. 命令行参数:支持通过参数自定义属性值

宏读取实现

MS Word版本

Dim prop As DocumentProperty
For Each prop In ActiveDocument.BuiltInDocumentProperties
    If prop.Name = "Comments" Then
        MsgBox prop.Value
    End If
Next

MS Excel版本(仅需替换对象):

Dim prop As DocumentProperty
For Each prop In ActiveWorkbook.BuiltinDocumentProperties
    If prop.Name = "Comments" Then
        MsgBox prop.Value
    End If
Next

PowerPoint版本

Dim prop As DocumentProperty
For Each prop In ActivePresentation.BuiltInDocumentProperties
    If prop.Name = "Comments" Then
        MsgBox prop.Value
    End If
Next

进阶技巧

  • 支持Base64编码注释,配合VBScript解码代码使用
  • 适用于红队测试中的Payload隐藏场景

更多精彩内容 请关注我的个人公众号 公众号(办公AI智能小助手)
公众号二维码

posted @ 2025-08-10 18:01  qife  阅读(9)  评论(0)    收藏  举报