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 #6

Closed
sec13b opened this issue Mar 15, 2024 · 2 comments
Closed

compile error #6

sec13b opened this issue Mar 15, 2024 · 2 comments

Comments

@sec13b
Copy link

sec13b commented Mar 15, 2024

I have problem when i compile:

`┌──(kali㉿kali)-[~/Desktop/Client/HiddenDesktop]
└─$ make

HiddenWindow Shellcode (x64)

In file included from /usr/share/mingw-w64/include/winnt.h:27,
from /usr/share/mingw-w64/include/minwindef.h:163,
from /usr/share/mingw-w64/include/windef.h:9,
from /usr/share/mingw-w64/include/windows.h:69,
from /usr/share/mingw-w64/include/winsock2.h:23,
from client/common.h:3,
from client/bfmain.c:1:
In function ‘__readgsqword’,
inlined from ‘NtCurrentTeb’ at /usr/share/mingw-w64/include/winnt.h:10013:73,
inlined from ‘BofMain’ at client/bfmain.c:48:39:
/usr/share/mingw-w64/include/psdk_inc/intrin-impl.h:838:1: error: array subscript 0 is outside array bounds of ‘long long unsigned int[0]’ [-Werror=array-bounds]
838 | __buildreadseg(__readgsqword, unsigned __int64, "gs", "q")
| ^~~~~~~~~~~~~~
In function ‘__readgsqword’,
inlined from ‘NtCurrentTeb’ at /usr/share/mingw-w64/include/winnt.h:10013:73,
inlined from ‘BofMain’ at client/bfmain.c:65:39:
/usr/share/mingw-w64/include/psdk_inc/intrin-impl.h:838:1: error: array subscript 0 is outside array bounds of ‘long long unsigned int[0]’ [-Werror=array-bounds]
838 | __buildreadseg(__readgsqword, unsigned __int64, "gs", "q")
| ^~~~~~~~~~~~~~
In function ‘__readgsqword’,
inlined from ‘NtCurrentTeb’ at /usr/share/mingw-w64/include/winnt.h:10013:73,
inlined from ‘BofMain’ at client/bfmain.c:73:43:
/usr/share/mingw-w64/include/psdk_inc/intrin-impl.h:838:1: error: array subscript 0 is outside array bounds of ‘long long unsigned int[0]’ [-Werror=array-bounds]
838 | __buildreadseg(__readgsqword, unsigned __int64, "gs", "q")
| ^~~~~~~~~~~~~~
In function ‘__readgsqword’,
inlined from ‘NtCurrentTeb’ at /usr/share/mingw-w64/include/winnt.h:10013:73,
inlined from ‘BofMain’ at client/bfmain.c:81:45:
/usr/share/mingw-w64/include/psdk_inc/intrin-impl.h:838:1: error: array subscript 0 is outside array bounds of ‘long long unsigned int[0]’ [-Werror=array-bounds]
838 | __buildreadseg(__readgsqword, unsigned __int64, "gs", "q")
| ^~~~~~~~~~~~~~
In function ‘__readgsqword’,
inlined from ‘NtCurrentTeb’ at /usr/share/mingw-w64/include/winnt.h:10013:73,
inlined from ‘BofMain’ at client/bfmain.c:89:41:
/usr/share/mingw-w64/include/psdk_inc/intrin-impl.h:838:1: error: array subscript 0 is outside array bounds of ‘long long unsigned int[0]’ [-Werror=array-bounds]
838 | __buildreadseg(__readgsqword, unsigned __int64, "gs", "q")
| ^~~~~~~~~~~~~~
In function ‘__readgsqword’,
inlined from ‘NtCurrentTeb’ at /usr/share/mingw-w64/include/winnt.h:10013:73,
inlined from ‘BofMain’ at client/bfmain.c:97:39:
/usr/share/mingw-w64/include/psdk_inc/intrin-impl.h:838:1: error: array subscript 0 is outside array bounds of ‘long long unsigned int[0]’ [-Werror=array-bounds]
838 | __buildreadseg(__readgsqword, unsigned __int64, "gs", "q")
| ^~~~~~~~~~~~~~
In function ‘__readgsqword’,
inlined from ‘NtCurrentTeb’ at /usr/share/mingw-w64/include/winnt.h:10013:73,
inlined from ‘BofMain’ at client/bfmain.c:105:41:
/usr/share/mingw-w64/include/psdk_inc/intrin-impl.h:838:1: error: array subscript 0 is outside array bounds of ‘long long unsigned int[0]’ [-Werror=array-bounds]
838 | __buildreadseg(__readgsqword, unsigned __int64, "gs", "q")
| ^~~~~~~~~~~~~~
In function ‘__readgsqword’,
inlined from ‘NtCurrentTeb’ at /usr/share/mingw-w64/include/winnt.h:10013:73,
inlined from ‘BofMain’ at client/bfmain.c:113:41:
/usr/share/mingw-w64/include/psdk_inc/intrin-impl.h:838:1: error: array subscript 0 is outside array bounds of ‘long long unsigned int[0]’ [-Werror=array-bounds]
838 | __buildreadseg(__readgsqword, unsigned __int64, "gs", "q")
| ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
In file included from /usr/share/mingw-w64/include/winnt.h:27,
from /usr/share/mingw-w64/include/minwindef.h:163,
from /usr/share/mingw-w64/include/windef.h:9,
from /usr/share/mingw-w64/include/windows.h:69,
from /usr/share/mingw-w64/include/winsock2.h:23,
from client/common.h:3,
from client/pipe.c:3:
In function ‘__readgsqword’,
inlined from ‘NtCurrentTeb’ at /usr/share/mingw-w64/include/winnt.h:10013:73,
inlined from ‘PipeWait’ at client/pipe.c:21:14:
/usr/share/mingw-w64/include/psdk_inc/intrin-impl.h:838:1: error: array subscript 0 is outside array bounds of ‘long long unsigned int[0]’ [-Werror=array-bounds]
838 | __buildreadseg(__readgsqword, unsigned __int64, "gs", "q")
| ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:36: x64] Error 1

┌──(kali㉿kali)-[~/Desktop/Client/HiddenDesktop]
`

@tothi
Copy link

tothi commented Mar 17, 2024

some warnings should not be treated as errors. easy fix: add -Wno-error=array-bounds as a compile option. add it to SCFLAGS and BFFLAGS also in the Makefile. BFFLAGS might need -Wno-error=format also.

@sec13b
Copy link
Author

sec13b commented Mar 18, 2024

OK.
Thank you

@sec13b sec13b closed this as completed Mar 18, 2024
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