nerdexam
GIAC

GCIH · Question #798

Which of the following describes code wrapping?

The correct answer is B. Executing a Ruby script as a variable within a C program. Code wrapping is the technique of embedding or calling code written in one language as a variable or object within a program written in a different language.

Malware Analysis & Advanced Persistent Threats

Question

Which of the following describes code wrapping?

Options

  • AUsing API hooks to inject code into a running Windows process
  • BExecuting a Ruby script as a variable within a C program
  • CTunneling encoded commands inside DNS query packets
  • DPacking an executable into a new compressed file

How the community answered

(19 responses)
  • A
    5% (1)
  • B
    89% (17)
  • D
    5% (1)

Why each option

Code wrapping is the technique of embedding or calling code written in one language as a variable or object within a program written in a different language.

AUsing API hooks to inject code into a running Windows process

Using API hooks to inject code into a running process describes process injection or DLL injection, a separate technique for hijacking a live process's execution context.

BExecuting a Ruby script as a variable within a C programCorrect

Code wrapping refers to the practice of embedding one language's script inside another program by treating it as a variable or callable object, allowing the host program (C) to execute the wrapped script (Ruby). This enables cross-language execution and is distinct from injection or tunneling techniques because the wrapped code is part of the program's own variable scope.

CTunneling encoded commands inside DNS query packets

Tunneling encoded commands inside DNS query packets describes DNS tunneling, a covert channel technique used for data exfiltration or command-and-control, not code wrapping.

DPacking an executable into a new compressed file

Packing an executable into a compressed file describes executable packing or crypting, a malware obfuscation technique used to evade antivirus detection.

Concept tested: Code wrapping cross-language embedding technique

Source: https://www.eccouncil.org/train-certify/certified-ethical-hacker-ceh/

Topics

#code wrapping#malware obfuscation#script embedding#evasion technique

Community Discussion

No community discussion yet for this question.

Full GCIH Practice