隐藏文件
- 属性隐藏 (attrib)
:: 隐藏文件或文件夹(+h 隐藏,+s 系统属性)
attrib +h +s "test.txt"
:: 查看被隐藏的文件(/a 显示所有属性)
dir /a
:: 取消隐藏(恢复原状)
attrib -h -s "test.txt"
- 二进制拼接隐写 (copy /B)
前提:当前目录下要有一张图片 test.jpg 和一个文本 secret.txt
:: 把 secret.txt 藏在 test.jpg 后面,生成 output.jpg(注意顺序:载体在前,秘密在后)
copy /B test.jpg + secret.txt output.jpg
:: 提取方法(不是命令,是用记事本打开):
notepad output.jpg
:: 拖动到最末尾,就能看到 secret.txt 的文字
- NTFS 备用数据流 (ADS)
前提:必须在 NTFS 格式的硬盘(如 C 盘或 D 盘)上
:: 创建主文件
echo 我是正常的主文件 > main.txt
:: 创建暗格并写入秘密(注意中间的冒号)
echo 我是藏在暗格里的秘密 > main.txt:secret.txt
:: 查看暗格是否存在(能看到 main.txt:secret.txt:$DATA 就是成功了)
dir /r
:: 读取暗格里的内容
notepad main.txt:secret.txt
:: 清理战场(删除主文件,暗格会一起消失)
del main.txt

浙公网安备 33010602011771号