CyberKit

D3FEND / Network Traffic Analysis

D3-BSE: Byte Sequence Emulation

Tactic: Detect. The detect tactic is used to identify adversary access to or unauthorized activity on computer networks.

Definition

Analyzing sequences of bytes and determining if they likely represent malicious shellcode.

How it works

Bytes are analyzed as if they are machine code instructions, and such instructions that are a common component of known shellcode are noted, such as stack pivots, reads from a Memory Address Table, and system calls for functions that disable protections or execute code. For example, the x86 instruction `b0 0b: mov $11, %ax`, with no further alterations to the `%ax` register, followed by `cd 80: syscall` executes the system call `execve()` in the Linux kernel, which replaces the current process with another one specified -- this is a common action in shellcode, so this sequence would be flagged. This technique detects shellcode despite whether or not it would cause a buffer overflow in the target binary. If the sequence of bytes contains a sequence similar to that used in malicious shellcode, the entire byte sequence is flagged and a follow-on technique may be invoked.

D3-BSE on d3fend.mitre.org

MITRE D3FEND 1.4.0, published under the MIT License, copyright 2022 The MITRE Corporation.