Static Analysis is a method of malware analysis that analyze without executing a suspicious file. It can detect basic information (e.g. packer, linker, architecture) of files but may be not enough.
fileexample.exefile-magic.pyexample.exebinwalk-eexample.exestringsexample.exeobjdumpexample.exe# Identify the file type using signature.tridexample.exe# Determine types of files and examine file properties.# -i: Show file infodiec-iexample.exe# -r: Recursive scan# -d: Deep scandiec-rdexample.exe# -e: Show entropydiec-eexample.exe# -a: Scan all typesdiec-aexample.exe# Read EXIF metadataexiftoolexample.exe# Extract interesting stringsbulk_extractorexample.exe-o./extracted# Hex editorwxHexEditorexample.exe# View, edit, carve contents of various binary file types.# View metadatahachoir-metadataexample.exe# Parse a binary filehachoir-urwidexample.exe# A graphical binary explorerhachoir-wxexample.exe# Search a substring in a binary filehacoir-grep--allexample.exe# GUI for reverse engineeringghidracutterexample.exe
PE Files
manalyzeexample.exe# -p: Use pluginsmanalyze-pallexample.exepeframeexample.exepedumpexample.exepecheckexample.exe# Examine contents and structure of PE files.pe-treeexample.exe
Android Apps
# -i: Input files to process# -o: Output directory of resultsdroidlysis-iexample.apk-o/tmp
Zip Files
# -f L: Find PK MAGIC sequence and list (L)zipdump.py-fLexample.zip
Reverse Engieering
ghidra# Cutter is a reverse engineering software powered by Rizincutterexample.exe
If you found the executable is packed with a packer tool such as UPX, unpack with the same packer tool and re-analyze the file using CAPA.
For example, if the executable is packed with UPX, unpack with UPX and re-run capa.
upx-d./executable# Delete the cache of capadel./executable.vivcapa<suspicious-executable>
Micrsoft OLE Files
# Check 'M' in the result of the oledump. It indicates the stream contains macro.oledumpexample.doc# -i: Print extra infooledump-iexample.doc# -s a: Select item (stream) in nr for dumping (a for all)# -v: Decompress VBA expressionsoledump-sa-vexample.docolefileexample.docoleidexample.docolemetaexample.docoleobjexample.docoletimesexample.docolevbaexample.doc# --deobf: Deobfuscate VBA expressions.# --decode: Display all the obfuscated strings with their decoded content.olevba--deobf--decodeexample.doc
Shellcode Analysis
scdbg is available for finding shellcode in Windows executables.