Stack Trace Analysis for Real-Time Encoded Shellcode Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing systems struggle to detect and prevent malicious shellcode, particularly encoded and encrypted variants, which are difficult to identify due to their dynamic nature and use of API hashing techniques.

Innovation Solution

A method and apparatus that hooks specific functions to analyze stack traces, generating a stack frame to identify return addresses referencing shellcode regions, and compares this code to a list of malicious signatures for real-time detection and prevention.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional anti-virus software and intrusion detection systems are used to detect malicious code, then basic security threats can be identified, but encoded and encrypted shellcode variants cannot be detected due to their dynamic nature

Engineering Contradiction:
Improvedetection accuracyVSAvoidability to detect encoded variants
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The system performs preliminary actions by hooking specified functions before shellcode execution and proactively generating stack traces to capture return addresses. This preliminary capture of execution context enables later analysis of encoded shellcode that hasn't yet transformed into detectable forms, resolving the contradiction by detecting threats before they can encode themselves.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces stack traces as an intermediary mechanism between traditional detection methods and encoded shellcode. By capturing return addresses and calling conventions in stack traces, the system creates a detectable intermediate representation that bridges the gap between benign function calls and malicious encoded shellcode execution.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If stack trace analysis is performed on every function call to detect shellcode, then encoded shellcode can be detected, but system performance degrades due to increased processing overhead

Engineering Contradiction:
Improveshellcode detection capabilityVSAvoidsystem performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system applies local quality by selectively analyzing only specific stack frames that are likely to contain shellcode indicators, rather than uniformly analyzing all function calls. By focusing analysis on frames with suspicious return addresses or calling conventions, the system maintains high detection reliability while minimizing unnecessary processing overhead.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent implements partial action by performing stack trace analysis only when certain conditions are met (e.g., specific function calls, suspicious return address patterns). This selective approach applies detection effort only where needed, maintaining security effectiveness while reducing overall system performance impact.

Inventive Principle:
Principle #16Partial or excessive action

3Measurement precision

If the system compares executable code to a comprehensive list of malicious signatures, then detection accuracy improves, but the comparison process becomes slower due to the large number of signatures

Engineering Contradiction:
Improvedetection precisionVSAvoidcomparison speed
Core Design Contradiction:
Measurement precisionVSSpeed

Solution Approach 1:

The system segments the large malicious signature database into smaller, organized groups or categories. By dividing the comprehensive signature list into manageable segments, the comparison process can be optimized to search only relevant portions first, maintaining high detection precision while improving comparison speed through reduced search space.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary filtering of stack trace data before signature comparison by identifying obvious indicators of shellcode (such as suspicious return addresses or calling conventions). This preliminary action reduces the volume of data requiring comprehensive signature comparison, thereby maintaining detection precision while improving comparison speed.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12361130B2Real-time shellcode detection and prevention
Publication Date: 2025.07.15 PALO ALTO NETWORKS INC
  • US12361130B2 patent drawing
  • US12361130B2 patent drawing
  • US12361130B2 patent drawing

AI summary

Methods, storage systems and computer program products implement embodiments of the present invention for protecting a computing device, which includes a processor and a memory and is coupled to a storage device storing a set of one or more files. In embodiments of the present invention, a call to a specified function for execution by the processor is detected, and a stack trace for the call to the specified function is generated in the memory. Upon detecting, in the stack trace, a stack frame including a return address referencing a shellcode region in the memory, wherein the shellcode region includes executable code that was not loaded from any given file on the storage device, then the referenced executable code is compared to a list of malicious shellcode. Finally, a preventive action is initiated upon detecting a match between the referenced executable code and one of malicious shellcodes in the list.