使用github開源工具EvilClippy進行宏病毒混淆免殺:https://github.com/outflanknl/EvilClippy/releases
關於evilClippy,有:
EvilClippy是一款專用於創建惡意MS Office測試文檔的跨平台安全工具,它可以隱藏VBA宏和VBA代碼,並且可以對宏代碼進行混淆處理以增加宏分析工具的分析難度。當前版本的EvilClippy支持在Linux、macOS和Windows平台上運行,實現了跨平台特性。
但是筆者在測試的時候,混淆后的惡意Word文件,目標電腦下載並啟用宏后,除非電腦上沒有殺毒軟件,不然執行的時候都會被隔離並掛起刪除,不管是火絨還是Windows自帶的殺毒軟件。
簡單使用evilClippy生成一個混淆后的含有宏病毒的Word
先將CS生成的宏病毒代碼粘貼到WORD中,具體步驟為:https://www.cnblogs.com/Cl0ud/p/13824021.html
但是在另存為的時候,存儲需要選擇:
即Word 97-2003文檔(*.doc),因為evilClippy貌似只能對該版本范圍內的Word宏病毒進行混淆。
使用 -s參數通過假的vba代碼插入到模塊中,用以混淆殺毒程序,這里我們需要寫一個正常無毒的vba腳本,以下。
使用 -s 進行混淆:
EvilClippy.exe -s test.vba test2.doc
執行完成,接着看看其他的參數:
./EvilClippy.exe -h
參數有:
Options:
-n, --name=VALUE The target module name to stomp. This argument can be repeated.
-s, --sourcefile=VALUE File containing substitution VBA code (fake code).
-g, --guihide Hide code from VBA editor GUI.
--gg, --guiunhide Unhide code from VBA editor GUI.
-t, --targetversion=VALUE Target MS Office version the pcode will run on.
-w, --webserver=VALUE Start web server on specified port to serve malicious template.
-d, --delmetadata Remove metadata stream (may include your name etc.).
-r, --randomnames Set random module names, confuses some analyst tools.
--rr, --resetmodulenames Undo the set random module names by making the ASCII module names in the DIR stream match their Unicode counter parts
-u, --unviewableVBA Make VBA Project unviewable/locked.
--uu, --viewableVBA Make VBA Project viewable/unlocked.
-v Increase debug message verbosity.
-h, --help Show this message and exit.
當然再使用一下 -r 參數來設置隨機模塊名(混淆安全分析工具)
./EvilClippy.exe -r .\test2_EvilClippy.doc
將最后的test2.doc丟到在線查殺網站上檢查一下:
https://www.virscan.org/language/zh-cn/
未加任何參數的文件,掃描結果為:
經過 -s 參數之后的文件,掃描結果為:
經過 -s 和 -r 參數之后的文件,掃描結果為(少了一個引擎報毒):
這測試結果有毒吧hhh,不過該工具2019年發布,現在這么多殺毒軟件能夠查殺也是很正常的事情,畢竟別人是靠這個吃飯的,所以還是得深入到vbs代碼底層去進行免殺。