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.
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)- A5% (1)
- B89% (17)
- D5% (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.
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.
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.
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.
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
Community Discussion
No community discussion yet for this question.