🔏
roguebook
  • group
    • Web
      • Concepts
      • OAuth 2.0
      • File upload
      • API testing
      • Web Cache Decpetion
      • CORS
      • CSRF
      • Cross site web socket hijacking
      • XS-Leaks
    • Bug Bounty
      • Recon
        • Dorking
          • SSL Checker
        • Wordlists
          • Twitter wordlist suggestions
      • Tips & Tricks
        • Combined
        • CSP Bypasses & open redirect
        • 403 Bypass
        • Arrays in JSON
        • Open Redirect
        • Next.js Application
        • Locla File Read
        • External Link
        • xss bypass
        • CSRF cors bypass
        • ssrf
      • Talks/Interviews/Podcasts
        • Bug Bounty Talks
        • Podcasts
          • Critical Thinking - Bug Bounty Podcast
            • Learning
      • Tools
    • Android
      • Getting Started
      • Intent Attack Surface
      • Broadcast Receivers
      • Android Permissions
      • Android Services
      • Content and FileProvider
      • WebView & CustomTabs
      • Insecure Storage
      • Tips & Tricks
    • Thick Client
      • Lab Setup
      • Information Gathering
      • Traffic analysis
      • Insecure Data storage
      • Input validation
      • DLL hijacking
      • Forensics
      • Extra resources
    • OSINT
      • OpSec
    • Malware Analysis
      • Lab Setup
      • Networking
      • Tools
      • Malware source
      • Basic Static Analysis
      • Basic Dynamic Analysis
      • Advanced Analysis
      • Advanced Static Analysis
      • Advanced Dynamic Analysis
      • Malicious Document Analysis
      • Shellcode Analysis
    • Malware Development
    • Blue Team
      • Tools
      • Malware Analysis
        • Basic Static Analysis
    • Assembly
      • Instructions
    • Binary Exploitation
    • Infographics
    • Malware Analysis
    • Threat Modeling
Powered by GitBook
On this page
  • 1. Hashing
  • 2. Malware hash search
  • 3. Extract Strings
  • 4. PEView
  • 5. Packed or Unpacked
  • 6. PEStudio
  • 7. CAPA tool by mandiant
  1. group
  2. Malware Analysis

Basic Static Analysis

1. Hashing

. Collect sha256sum

. Collect md5sum of sample

2. Malware hash search

Submit hash on virustotal search to see if this sample is seen before in past

3. Extract Strings

extract strings that can be useful for getting better understanding. two utilities

  1. strings

  2. floss (better version of string, which can programatically try to decode deobfuscate strings and present that )

floss.exe -n 6 [malware_name.exe]

4. PEView

  1. After opening file in peview check IMAGE_NT_HEADERS > IMAGE_FILE_HEADER for compilation time of executable. this time sometime can be fake too like some compiler set date to 1992. (delphi compiler)

  2. IMAGE_SECTION_HEADER.txt can be used to check virtual size or raw size which can give away if ts packed malware

  3. from section.rdata we can checkout import address table. Which can be used to identify which win32 api this binary calls. which tells what this malware capability is

5. Packed or Unpacked

Packing of malware is done to obfuscate malware code so it looks different from original code. This can lead to difference in raw size and virtual size.

a packed malware won't have Import address table(IAT) like unpacked malware. In packed mwalware IAT will be very small. All win API calls won't be listed. Instead something like Getprocaddress and Loadlibrary api calls will be there only which loads other win api calls dynamically in memory at runtime.

Packing is done for size reduction, or AV evasion. UPX is one famous packer. In packed malware there is stub which unloads all packed code at run time.

6. PEStudio

PeStudio is great tool which can do most of basic static analysis for us. It highlights features and behvaiour that can be used maliciously as balcklist.

7. CAPA tool by mandiant

THis tool can also be used for basic static analysis.

capa detects capabilities in executable files.

Malware Behavioral Catalog (MBC)

The next output is the Malware Behavioral Catalog (MBC) Objectives and Behaviors. This is a similar classification system to MITRE ATT&CK but focuses on malware specifically.

MITRE ATT& CK is also mapped alsong with capa's own rule based matching to detect malware capabilities.

PreviousMalware sourceNextBasic Dynamic Analysis

Last updated 27 days ago

Other good resource for windows api wused by malware: sorted by TTPs

"In a “stub-payload” architecture, new executable is created that contains two primary components: the compressed/encrypted contents of the original executable, and a short piece of code responsible for decompressing/decrypting that original executable to executing it. This short piece of code is often referred to as a stub. In essence, the original executable is compressed/encrypted, then wrapped in a new executable which contains code to bring it back to its original state." more here:

The full MBC Matrix can be found here:

https://malapi.io/
https://www.linkedin.com/pulse/packed-malware-basics-halashankara-k/
https://github.com/MBCProject/mbc-markdown#malware-objective-descriptions