Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported File ".exe" #212

Open
isagargit opened this issue Mar 22, 2024 · 9 comments
Open

Unsupported File ".exe" #212

isagargit opened this issue Mar 22, 2024 · 9 comments

Comments

@isagargit
Copy link

We are using GaraSign CLI to sign .NET packages that internally uses jsign. I have installed jsign 6.0 but when i try to sign a .exe file i get the error:

[2024-03-22T05:57:54Z] - INFO | == Begin jsign output ==
[2024-03-22T05:57:54Z] - INFO | jsign: Unsupported file: testapp.exe
[2024-03-22T05:57:54Z] - INFO | Try `jsign --help' for more information.

DLL signing works perfectly

@ebourg
Copy link
Owner

ebourg commented Mar 22, 2024

It looks like Jsign fails to parse the .exe file, are you sure the file is valid? If you can send the file to ebourg@apache.org I'll give it a look.

@isagargit
Copy link
Author

The file is valid, but actually cant share it. can you still suggest what could be wrong. jsign should work right ?

@ebourg
Copy link
Owner

ebourg commented Mar 22, 2024

Could you share at least the header of the file? The first 1K will be enough to analyze the issue.

@isagargit
Copy link
Author

I parsed the file using pefile module. Here's the file
pefile_output.txt

@ebourg
Copy link
Owner

ebourg commented Mar 22, 2024

How was the file generated?

@isagargit
Copy link
Author

isagargit commented Mar 22, 2024

using this script:
import pefile

with open("C:\Users\<>\Downloads\pefile_output.txt", "w") as f:
pe = pefile.PE("C:\Users\<>\Downloads\testapp.exe")
f.write(pe.dump_info())

@ebourg
Copy link
Owner

ebourg commented Mar 22, 2024

Sorry, I meant how was the .exe generated.

@ebourg
Copy link
Owner

ebourg commented Mar 22, 2024

What are the bytes at the offsets 0xF2 and 0xF3? That's just after "PE" and should be 0.

@ebourg
Copy link
Owner

ebourg commented May 10, 2024

@isagargit If you are still around I'd like to figure out why Jsign fails with your file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants