Our Platform Independent Programs research challenges the notion that generating a single program string that runs on multiple architectures is inherently difficult. We do so by developing techniques and an infrastructure for automatically generating a platform-independent program (PI program) from an existing program or programs. By platform, we mean hardware or emulated architecture. By program, we mean a bit string that is decoded to a valid set of instructions for a platform. A PI program is a program that runs on two or more platforms without modification.
In particular, we introduce PI program generation challenge and our solution.
- PIP Generation Problem
Given a list of n programs-machine pairs (bi, mj), we automatically generate a single program b' such that ∀(bi,mj): mj (bi) = mj(b')
The PI Generation challenge takes in a list of programs, and outputs a single PI program that will execute on all architectures.
The results of executing the single PI program will depend upon the architecture.
Note that the PIP generation challenge allows for both cases where the final program bpip has the same functionality on all architectures, as well as different functionalities based on the architectures bpip runs on. - PIP Generation Solution
We introduce a concept of the gadget, which is the program string which is valid for multiple platforms but the behavior is depend upon which platform executes the string. By merging multiple gadgets, we can generate a program that is platform-independent with desired behaviors. We also show that it is possible to reduce each gadget to be an instruction-level program string, which implies that we can build a compiler for the new language for platform-independent programs. Please refer to the paper for details on gadget structure.
There are several security-critical implications of our techniques and implementation:
- Execution-based Steganography
- Malware bypassing Signature-based IDS
- Platform-independent Shellcode
Basic concept of the gadget. |
Overall design of PIP generation. |
Single Gadget PIP Structure. |
Multi-Gadget PIP Structure. |
- Sang Kil Cha
- Brian Pak
- David Brumley
- Richard J. Lipton