X Cite
X Cite

Reputation: 21

Wrong UPX Header, Unable to Decompress with UPX

I wanted to decompress a UPX file I downloaded.

However, when I decompress it using UPX command:

upx -d citadel.exe

I got this error:

upx: citadel.exe: CantUnpackException: illegal exe header

So, I edit I check its hexadecimal from this:

img

to this:

img

Then I run this command again,

upx -d citadel.exe 

and I got the permission denied. This is the message:

upx: citade.exe: IOException: citadel.exe: Permission Denied
Upacked 1 file: 0 ok, 1 error.

The question is, how can I decompress this file using UPX tool?

Upvotes: 2

Views: 4214

Answers (4)

Eimantas G
Eimantas G

Reputation: 467

Just make sure your path leading to the file you want decompress does not include any whitespace in it. I renamed a folder that had whitespace and it solved the "Permission denied" issue for me.

Upvotes: 0

X Cite
X Cite

Reputation: 21

Finally, I got it working, by just simply restarting the Command prompt and re-running upx -d citadel.exe.

Thanks for your help!

Upvotes: 0

Metjuw
Metjuw

Reputation: 13

I know this is not a recent post but stumbled across it and wanted to give my share.

In order for UPX to work, you need to direct your CMD prompt to the folder where upx is and the command should be the following:

upx -d [full path] 

The full path as to where you have the packed exe file.

Screenshot of UPX Working

Upvotes: 1

yano
yano

Reputation: 5265

I got a permission denied error, including running UPX in an admin cmd window. The .exe to unpack was in a different directory. Once I moved the .exe into the same directory as UPX, the permission denied error went away, even running in a non-admin cmd window.

Upvotes: 0

Related Questions