xxxswf.pySWF文件分析工具
xxxswf是一款python寫的小工具,它可以用于Flash SWF文件的分析、掃描,壓縮和解壓縮。xxxswf可以掃描單個(gè)swf文件、文檔中嵌入的多個(gè)swf文件和目錄下的所有文件。
使用方法:
Usage: xxxswf.py [options] <file.bad>
Options:
-h, --help show this help message and exit
-x, --extract Extracts the embedded SWF(s), names it MD5HASH.swf &
saves it in the working dir. No addition args needed
-y, --yara Scans the SWF(s) with yara. If the SWF(s) is
compressed it will be deflated. No addition args
needed
-s, --md5scan Scans the SWF(s) for MD5 signatures. Please see func
checkMD5 to define hashes. No addition args needed
-H, --header Displays the SWFs file header. No addition args needed
-d, --decompress Deflates compressed SWFS(s)
-r PATH, --recdir=PATH
Will recursively scan a directory for files that
contain SWFs. Must provide path in quotes
-c, --compress Compresses the SWF using Zlib
xssswf有幾個(gè)功能:-x是從文件中提取嵌入的SWF文件,看了一下源碼是掃描字節(jié)流中的CWS|FWS關(guān)鍵字,再解析swf文件頭判斷是否是swf文件,確認(rèn)后再提取。
-y是使用yara掃描swf文件,yara是一個(gè)非常不錯(cuò)的python模塊,它讓python的掃描匹配變得如此簡單容易。jsunpack就是使用了它來確認(rèn)惡意HTML,pdf等。
-s掃描swf的md5簽名
-H顯示SWF文件頭
-d和-c是使用python的zlib模塊對swf進(jìn)行解壓縮和壓縮。
介紹內(nèi)容來自:http://www.pulog.org/tools/2339/xxxswf.py/
