1

在 OneDrive 中存储文件时,:ms-properties会添加一个备用数据流。我使用 FlexHex 打开了一个示例流(如图所示),但我不知道这些字节可能代表什么类型的结构。有人知道吗?

在此处输入图像描述

其实按照1SPS顺序,我觉得可能是道具店或者贝壳包什么的。供参考。而这个。但我不确定这是否正确。

4

2 回答 2

0

1SPS 是序列化属性存储的签名,它本质上是一个键值对类型系统。它是一种标准结构,因此易于解析,尽管数据类型可能会带来一些挑战。

看起来这 4 个左右中有一些 GUID。解析出这些结构很容易,因为在贝壳袋中使用了类似的东西。它当然看起来就像一系列 1sps 块,这很容易。

你已经知道我的电子邮件,所以如果你能提取其中一些 ADS 示例,将它们压缩并发送,我可以仔细查看。如果有必要,我什至会写一个新的取证工具来解析它们

于 2020-03-17T15:13:03.200 回答
0

它们只是序列化的Windows 属性您可以使用IPropertyStore的内置 Windows 实现来写入和读取这些文件(作为流),例如使用PSCreateMemoryPropertyStore 函数

这是一个小的示例控制台应用程序,它创建一个test.props具有一个字符串类型属性的文件:

#include <windows.h>
#include <atlbase.h>
#include <atlcom.h>
#include <propsys.h>
#include <propkey.h>
#include <propvarutil.h>

// some COM error handling useful macros
#define WIDEN2(x) L ## x
#define WIDEN(x) WIDEN2(x)
#define __WFILE__ WIDEN(__FILE__)
#define SBTRACE wprintf
#define CHECKHR(expr) {hr=(expr);if(FAILED(hr)){ SBTRACE(L"HR FAILED line:%u file:%s\n", __LINE__, __WFILE__); goto cleanup; } }  
#define HR HRESULT hr=S_OK;

int main()
{
  HR;
  PROPVARIANT pv;
  PropVariantInit(&pv);
  CoInitialize(NULL);
  {
    CComPtr<IPropertyStore> ps;
    CComPtr<IPersistStream> pstream;
    CComPtr<IStream> stream;

    // create the in-memory store
    CHECKHR(PSCreateMemoryPropertyStore(IID_PPV_ARGS(&ps)));

    // define some PROPVARIANT value (here it's a string)
    CHECKHR(InitPropVariantFromString(L"hello world", &pv));

    // any property key would work
    CHECKHR(ps->SetValue(PKEY_ItemNameDisplay, pv));

    // get IPersistStream to be able to load or write
    CHECKHR(ps->QueryInterface(&pstream));

    // create a file stream
    CHECKHR(SHCreateStreamOnFileEx(L"test.props", STGM_WRITE | STGM_CREATE, 0, TRUE, nullptr, &stream));

    // this sample only saves, but you can load from an existing stream
    CHECKHR(pstream->Save(stream, TRUE));
  }

cleanup:
  PropVariantClear(&pv);
  CoUninitialize();
  return 0;
}

结果如下:

在此处输入图像描述

于 2020-03-17T17:41:01.347 回答