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

Compile error #11

Closed
anasorova opened this issue Oct 12, 2020 · 8 comments
Closed

Compile error #11

anasorova opened this issue Oct 12, 2020 · 8 comments

Comments

@anasorova
Copy link

I have a problem to compile in Linux (Fodora)

pe_to_shellcode/libpeconv/libpeconv/include/peconv/pe_hdrs_helper.h:8:10: fatal error: Windows.h: No such file or directory 8 | #include <Windows.h> | ^~~~~~~~~~~

I tried to set a an C=i686-w64-mingw32-gcc

But I keep getting this error. What is correct way to set my env?

@hasherezade
Copy link
Owner

can you check if it works if you change Windows.h to windows.h? sometimes just the different case is the problem...

@anasorova
Copy link
Author

Now it's saying the same about windows.h if I use make

@hasherezade
Copy link
Owner

ok, I will check it in details soon. it was tested only with Visual Studio.

@anasorova
Copy link
Author

It compiles perfectly in VS. Thank you!

@anasorova
Copy link
Author

I have a probem, tho with the app itself. I convert to shellcode with [+] Saved to file: bla.sch.exe, but when I run it with runshc.exe it does not work and I don't see any crash errors.

When I use my loader to run this shellcode (also compiled with x86 compiler) I'm getting this error:

Problem signature
Problem Event Name:     APPCRASH
Application Name:       peshellcoderun.exe
Application Version:    0.0.0.0
Application Timestamp:  5f85d4fe
Fault Module Name:      msvcrt.dll
Fault Module Version:   7.0.19041.1
Fault Module Timestamp: 4c1230ad
Exception Code: c0000005
Exception Offset:       00088d4a
OS Version:     10.0.19041.2.0.0.256.48
Locale ID:      1033
Additional Information 1:       2beb
Additional Information 2:       2beba6fb4680d73a8c78ca7c24ccdb46
Additional Information 3:       ab31
Additional Information 4:       ab31236752fcb0c711def892810629b8

Any ideas?

@hasherezade
Copy link
Owner

not all the executables are convertable. can you share the binary that you was trying to convert? I will check it... if you don't want to share it publicly, you can send to my email: hasherezade@pm.me

@anasorova
Copy link
Author

anasorova commented Oct 13, 2020

I just tried on Win7 and the peshellcoderun.exe worked fine... Should be something related to Win10 I will send you more details, asap. Both OS were 64bit.

@hasherezade
Copy link
Owner

Thank you! if if worked on older system, I suspect it may be about missing compatibility shims for some of the imports. when a PE is converted to shellcode, import table is loaded as is, and no compatibility shims are applied. if they are needed but missing, the application may crash. I am not sure if this was what happened in your case, but this is my theory by looking at the symptoms. unfortunately this problem cannot be easily solved...

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