Skip to content

Latest commit

 

History

History
63 lines (39 loc) · 3.34 KB

security-analysis.md

File metadata and controls

63 lines (39 loc) · 3.34 KB

Security and Threat Analysis

Security Summary

Security Summary of notepad.exe

PE > Security Summary checks the mitigations and protections of the file in one table:

Feature Checked
ASLR, high-entropy ASLR DYNAMIC_BASE with relocations, HIGH_ENTROPY_VA
DEP NX_COMPAT
Control Flow Guard, XFG GUARD_CF and the load configuration's tables
CET shadow stack /CETCOMPAT
EH continuation targets /guard:ehcont
SafeSEH x86 exception handler tables
Stack cookies (/GS) The security cookie in the load configuration
No writable code No section that is both writable and executable
Signature Embedded Authenticode, or the system catalog that signs the file

Signatures

The Security directory view decodes Authenticode signatures and their certificate chains, and verifies them. Most files of Windows have no embedded signature and are signed by a catalog instead. For those, the Catalog Signature view finds, decodes and verifies the catalog file in CatRoot that signs the file.

Capabilities

Capabilities of notepad.exe

PE > Capabilities lists what the program can do, using capa-style rules over these features:

  • Imports, with A/W/Ex variants, ordinals and API set hosts resolved
  • Strings and regular expressions
  • Sections, exports and file characteristics

Each capability has a namespace (host-interaction/registry/write), a MITRE ATT&CK technique ID where one applies, and the evidence that matched. About 40 rules are built in. The tpe tool can add rules of your own with --capabilities.

YARA

Tools > YARA Rules File or Tools > YARA Rules Folder selects YARA rules (.yar, .yara, or compiled .yarc; a folder includes its subfolders). The rules are remembered and matched in the background against every file you open. Rule files with errors are left out and reported. Tools > Clear YARA Rules turns matching off.

YARA matches

PE > YARA Matches lists each matching rule with its namespace, tags, the strings that matched, and where they are (offset, section, RVA) with their data.

The rules can use the external variables filename, filepath, extension, filetype and owner, and the pe and dotnet modules.

Fuzzy hashes

The summary shows two similarity hashes alongside MD5, SHA-1, SHA-256 and the import hash:

  • ssdeep (compatible with ssdeep 2.14): files that are alike score high (0–100) against each other
  • TLSH (T1 form): files that are alike have a small distance (under 30 is very close)

tpe cluster groups files by these hashes to find variants and builds of the same program, and tpe diff reports the similarity of two files.

VirusTotal

PE > Upload to VirusTotal asks for confirmation, then looks up the file on VirusTotal by its SHA-256 hash. If VirusTotal already knows the file, nothing is sent. If it does not, the file itself is uploaded.

Warning

VirusTotal shares uploaded files with its customers and the security community. Do not upload confidential files.

This needs a free API key. PE > VirusTotal API Key stores it encrypted for your Windows account. Alternatively, set the key in the VT_API_KEY or VIRUSTOTAL_API_KEY environment variable.