ADS & Python Tools, (Sat, Jun 21st)
文章讨论了Windows NTFS文件系统中的替代数据流(ADS),并介绍了如何使用Python和C语言工具访问和扫描这些数据流以检测潜在威胁。作者展示了如何提取Mark-of-the-Web信息,并开发了FileScanner工具用于全面扫描ADS内容。 2025-6-21 10:13:41 Author: isc.sans.edu(查看原文) 阅读量:13 收藏

Ehsaan Mavani talks about Alternate Data Streams (ADS) in diary entry "Alternate Data Streams ? Adversary Defense Evasion and Detection [Guest Diary]".

I'm taking this as an opportunity to remind you that Python tools on Windows and an NTFS disk, can access alternate data streams.

Like my tool cut-bytes.py, here I use it to show the content of the Mark-of-the-Web stored inside the Zone.Identifier ADS:

You just need to type a colon (:) followed by the ADS name after the filename.

I didn't have to code this in Python for Windows, it's default behavior.

I did code ADS features in my FileScanner tool. It's not written in Python, but in C for Windows, and I coded features to enumerate and scan alternate data streams.

If you give it a file to scan, it will scan the file content, and also the content of all of its alternate data streams. Like with this download with a MotW:

And if you give it a folder or a drive to scan, it will also enumerate and scan all alternate data streams.

Didier Stevens
Senior handler
blog.DidierStevens.com


文章来源: https://isc.sans.edu/diary/rss/32058
如有侵权请联系:admin#unsafe.sh