# US 2016/0253253 A1 · Automated unpacking of portable executable files

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2016/0253253 A1
- Document ID: US20160253253A1
- Status: Published application
- Kind: A1
- Application number: 15/150,046
- Filed: 2016-05-09
- Published: 2016-09-01
- Earliest claimed: 2009-07-29
- Assignees: Reversing Labs Holding GmbH
- Applicants: Reversing Labs Holding GmbH
- Inventors: Tomislav Pericin
- Web page: https://patentgrep.com/patent/US20160253253A1

## CPC

- G06F 8/74: Reverse engineering; Extracting design information from source code
- G06F 8/65: Updates (security arrangements therefor G06F21/57)
- G06F 11/0715: {in a system implementing multitasking (multitasking per se G06F9/46)}
- G06F 11/0721: {within a central processing unit [CPU]}
- G06F 11/0751: {Error or fault detection not based on redundancy (power supply failures G06F1/30; network fault management H04L41/06)}
- G06F 11/0793: {Remedial or corrective actions (recovery from an exception in an instruction pipeline G06F9/3861; by retry G06F11/1402; for recovering from a failure of a protocol instance or entity H04L69/40)}
- G06F 11/362: Debugging of software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Automated unpacking of a portable executable file includes setting a debugging breakpoint at an original entry point address of a packed portable executable file. A debugging process is executed for the packed portable executable file to obtain a debugged portable executable file in memory. One or more of import address table data and relocation table data are collected during execution of the debugging process for the packed portable executable file. The debugged portable executable file in memory is copied to a storage medium, and the debugging process is terminated.

## Claims

### Claim 1

A computer implemented method comprising:
setting, by a computing device, a debugging breakpoint at an original entry point address of a packed portable executable file;
executing, by the computing device, a debugging process for the packed portable executable file to obtain a debugged portable executable file;
adding a new section to the debugged portable executable file; and
pasting into the debugged portable executable file in the new section one or more of an import address table of the import table data and a relocation table of the relocation table data collected during execution of the debugging process for the packed portable executable file.

### Claim 2 (depends on 1)

The computer implemented method of claim 1, further comprising determining, by the computing device, the original entry point address of the packed portable executable file based upon, at least in part, ImageBase field data of the packed portable executable file and AddressOfEntryPoint data of the packed portable executable file.

### Claim 3 (depends on 1)

The computer implemented method of claim 1, further comprising initializing, by the computing device, the debugging process including creating a debugging process based upon, at least in part, the packed portable executable file.

### Claim 4 (depends on 1)

The computer implemented method of claim 1, wherein the original entry point includes a first instruction of executable code before the packed portable executable file was protected.

### Claim 5 (depends on 1)

The computer implemented method of claim 1, further comprising collecting, by the computing device, one or more of import address table data and relocation table data during execution of the debugging process for the packed portable executable file by setting one or more debugging breakpoints associated with a LoadLibrary call, a GetModuleHandle call, and each of a plurality of GetProcAddress calls.

### Claim 6 (depends on 1)

The computer implemented method of claim 1, further comprising:
copying, by the computing device, the debugged portable executable file in memory to a storage medium; and
terminating, by the computing device, the debugging process at the original entry point.

### Claim 7 (depends on 1)

The computer implemented method of claim 1, further comprising realigning, by the computing device, the debugged portable executable file.

### Claim 8

A computer program product comprising a non-transitory computer readable medium having a plurality of instructions stored thereon, which, when executed by a processor, cause the processor to perform operations comprising:
setting a debugging breakpoint at an original entry point address of a packed portable executable file;
executing a debugging process for the packed portable executable file to obtain a debugged portable executable file;
adding a new section to the debugged portable executable file; and
pasting into the debugged portable executable file in the new section one or more of an import address table of the import table data and a relocation table of the relocation table data collected during execution of the debugging process for the packed portable executable file.

### Claim 9 (depends on 8)

The computer program product of claim 8, further comprising instructions for determining the original entry point address of the packed portable executable file based upon, at least in part, ImageBase field data of the packed portable executable file and AddressOfEntryPoint data of the packed portable executable file.

### Claim 10 (depends on 8)

The computer program product of claim 8, further comprising instructions for initializing the debugging process including creating a debugging process based upon, at least in part, the packed portable executable file.

### Claim 11 (depends on 8)

The computer program product of claim 8, wherein the original entry point includes a first instruction of executable code before the packed portable executable file was protected.

### Claim 12 (depends on 8)

The computer program product of claim 8, further comprising instructions for collecting one or more of import address table data and relocation table data during execution of the debugging process for the packed portable executable file by setting one or more debugging breakpoints associated with a LoadLibrary call, a GetModuleHandle call, and each of a plurality of GetProcAddress calls.

### Claim 13 (depends on 8)

The computer program product of claim 8, further comprising instructions for:
copying the debugged portable executable file in memory to a storage medium; and
terminating the debugging process at the original entry point.

### Claim 14 (depends on 8)

The computer program product of claim 8, further comprising instructions for realigning the debugged portable executable file.

### Claim 15

A system comprising:
a processor;
a memory coupled with the processor;
one or more software modules executable by the processor and the memory, the one or more software modules, when executed, configured to perform operations including:
setting a debugging breakpoint at an original entry point address of a packed portable executable file;
executing a debugging process for the packed portable executable file to obtain a debugged portable executable file;
adding a new section to the debugged portable executable file; and pasting into the debugged portable executable file in the new section one or more of an import address table of the import table data and a relocation table of the relocation table data collected during execution of the debugging process for the packed portable executable file.

### Claim 16 (depends on 15)

The system of claim 15, wherein the one or more software modules are further configured to determine the original entry point address of the packed portable executable file based upon, at least in part, ImageBase field data of the packed portable executable file and AddressOfEntryPoint data of the packed portable executable file.

### Claim 17 (depends on 15)

The system of claim 15, wherein the one or more software modules are further configured to initialize the debugging process including creating a debugging process based upon, at least in part, the packed portable executable file.

### Claim 18 (depends on 15)

The system of claim 15, wherein the original entry point includes a first instruction of executable code before the packed portable executable file was protected.

### Claim 19 (depends on 15)

The system of claim 15, wherein the one or more software modules are further configured to collect one or more of import address table data and relocation table data during execution of the debugging process for the packed portable executable file by setting one or more debugging breakpoints associated with a LoadLibrary call, a GetModuleHandle call, and each of a plurality of GetProcAddress calls.

### Claim 20 (depends on 15)

The system of claim 15, wherein the one or more software modules are further configured to:
copy the debugged portable executable file in memory to a storage medium; and
terminate the debugging process at the original entry point.

### Claim 21 (depends on 15)

The system of claim 15, wherein the one or more software modules are further configured to realign the debugged portable executable file.
