unpacker produces unsupported binary file when unpacking PE file packed by MPRESS
- Dominant language
- C++
- Stars
- 8.6k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
Our `unpacker` produces unsupported binary file when unpacking PE file packed by MPRESS.
## Input
Run
```
$ retdec-unpacker FILE
```
where `FILE` is:
* [`06B5A7D851879865C32B61DD666511E8BC49B7C612F9721215B800FC49CE8492`](https://www.virustotal.com/#/file/06b5a7d851879865c32b61dd666511e8bc49b7c612f9721215b800fc49ce8492/details)
* `143456D7625C99DD3E74298239F39989BD1B83820E439C4B28951D5309A111F2`
* `14809B82B7F259725E76836B69829828FBE1EAD11CC51734676E60A582AF5A7F`
* `1A9A9C0F300E641A0ED5603CA824C871A3E27ADD30706A985D4A1ED9276A84AA`
* `1C20E1AEF10CB3689495B558B9D2C4BACDA824F4AFD6A5EE8ADEFC6EBC919007`
* `25506060AAE908C23B29C8612B01F87AF5979131D462E8163F8CE7A3B01D7934`
* `27AA4828D922898A79BA22A297C275132A562CFCD4A2CA37D9E3A567E9C4D4E5`
* `29AC87537F4B6DF3C42A63FDCBBE4FDE7ACCB8CF8FDEA0C449D21E25E16C1E4E`
* `577D198AD6DD2D2335027EFFBB3AF261BB10AD9719904D8C0574FB4A976DEAAC`
* `5A2EA92B6532412D71C200CAD10425ACAB9E1990ACB9E17746566561A3FD4D05`
* `5C92072672A75E2F6A0BCC5C0E6C57EEC8952CC610FA0C9EC2B4E8C412DA799D`
* `67B0CF40645248888F273096FCF3F62E21B4B935D4E27ED011B4A03D96666478`
* `8B0F712DDFC939C6264CE533A04856CEEB04A4B00C1EB266327553C7BEE0E6B8`
* `B06CB559EDF16E09A846FC12A5CB197916792A6DA6D5E4239D0B25406D8EB39A`
* `C7FA8081CB209942F301966C00170CB27EA65D92F22294ACD47BB3CA005864DC`
* `D663FB9E8F1265A2A9980C65A4EDCA417A12A7374BEFA91AC1F5355AB0E9A1E3`
* `DE656147B8FECD51A3188A5FA769C2DBA9592DE0373C3DFF8B6781FDEBB105CB`
* `E3A61FCF7E5C4609D98D6458DD4B1013AEED187693FBA36B27CED5A093174521`
* `F16D275DB0FA585F1ABA50EC7E96F5E7BD93EE2D92B50791A0AE66164688AD40`
* `FB4A5FC5BF17E517A874A3BE7AF3F21CE1CC6951CF5BFCB805E1AF26C097F554`
* `FC6074F0815AD43637DC77421D44EA19359DF008704928FEA2535E21E3DF523E`
## Output
```
No matching plugins found for 'Microsoft Linker 7.1'
[MPRESS] Successfully unpacked 'FILE'!
```
However, when I then try to analyze the unpacked file via `fileinfo`, it fails with the following error:
```
$ retdec-fileinfo FILE-unpacked
...
Error: File format of the input file is not supported. Supported formats: PE, ELF, COFF, Mach-O, Intel HEX, Raw Data.
```
## Expected output
I expected the unpacked file to be valid. I suggest verifying whether there is a bug in the unpacker, or whether the packed files were already corrupted.
## Configuration
* Commit: 76c24b8a054ec9bd98867087ea00e395f8e3a872 (current `master`)
* 64b Arch Linux, GCC 7.3.1, Debug build of RetDec
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure with one of the listed MPRESS-packed PE samples using retdec-unpacker, then pass the generated FILE-unpacked output to retdec-fileinfo. Inspect the unpacker behavior around the [MPRESS] success result and verify that the output is recognized as a valid PE file rather than reporting an unsupported format.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- arch-linux, cpp
- Domain
- devtools, reverse-engineering
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100