zoukankan      html  css  js  c++  java
  • 文件隐写

    1、JPEG(jpg),文件头:FF D8 FF E0 00 10 4A 46 49 46 文件尾:FF D9
    2、PNG (png),文件头: 89 50 4E 47 0D 0A 1A 0A 文件尾:49 45 4E 44 AE 42 60 82
    3、GIF (gif),文件头:47 49 46 38 39
    4、bmp,文件头:42 4D E3 BF 22 00 00 00
    5、rar文件头:52 61 72 21
    6、zip文件头:50 4B 03 04 14 00 00 00 08 00
    7、PDF文件头:25 50 44 46

    tips:
    1. 可以使用WinHex查看文件的十六进制编码,然后找到文件头尾,也可以用binwalk命令查看文件中是否有隐藏文件,bb分割文件。
    使用binwalk分离所有jpg文件:

    1 binwalk -D=jpeg a.jpg

    2. Stegsolve可以查看png图片的各个颜色的通道,可左右滑动或者在analyse中查看隐藏字符。

    3.使用braintools将图片中隐藏的bf代码解码出来:

    1 bftools.exe decode braincopter doge.png --output dogeout.png
    2   
    3 bftools.exe run dogeout.png

    4.steghide可以在图片或音频中隐藏信息

    1 steghide embed -cf a.jpg -ef key.txt    //加密  
    2 steghide extract -sf a.jpg -xf out.file -p password   //提取  

    但是steghide不支持读取字典文件,所以参考pcat写的py代码,用字典爆破

     1 from subprocess import *  
     2   
     3 def foo():  
     4     stegoFile='rose.jpg'  
     5     extractFile='hide.txt'  
     6     passFile='english.dic'  
     7   
     8     errors=['could not extract','steghide --help','Syntax error']  
     9     cmdFormat='steghide extract -sf "%s" -xf "%s" -p "%s"'  
    10     f=open(passFile,'r')  
    11   
    12     for line in f.readlines():  
    13         cmd=cmdFormat %(stegoFile,extractFile,line.strip())  
    14         p=Popen(cmd,shell=True,stdout=PIPE,stderr=STDOUT)  
    15         content=unicode(p.stdout.read(),'gbk')  
    16         for err in errors:  
    17             if err in content:  
    18                 break  
    19         else:  
    20             print content,  
    21             print 'the passphrase is %s' %(line.strip())  
    22             f.close()  
    23             return  
    24   
    25 if __name__ == '__main__':  
    26     foo()  
    27     print 'ok'  
    28     pass 

    5.TweakPNG可以检查png文件

    6. 当图片是bitmap(BMP),用于处理由像素数据定义的图像的对象(LSB,与MSB相对,是最低有效位,即二进制数的最右端)wbStego可支持bmp隐写

    7.gif分解,Gifsplitter

    8.音频隐写 mp3Stego,可以在把wav压缩转换成mp3的过程中,对隐藏的txt文件加密压缩写入mp3;

    9.zip伪加密,将压缩源文件目录区的全局方式位标记00 00改为09 00就会提示有密码,使用ZipCenOp解密即可(参考http://blog.csdn.NET/ETF6996/article/details/51946250);

    解密命令

    1 Decode.exe -x -P password xx.mp3
  • 相关阅读:
    任务45:Identity MVC:注册逻辑实现
    任务44:Identity MVC: EF + Identity实现
    Identity MVC:UI
    任务42:EF Core Migration
    任务41:Individual authentication 模板
    任务40:介绍
    任务39:Role以及Claims授权
    postman中 form-data、x-www-form-urlencoded、raw、binary的区别
    任务38:JWT 设计解析及定制
    任务37:生成 JWT Token
  • 原文地址:https://www.cnblogs.com/jiaxinguoguo/p/7410483.html
Copyright © 2011-2022 走看看