KingOfTheNOPs / cookie-monster

BOF to steal browser cookies & credentials
GNU General Public License v3.0
220 stars 26 forks source link

linux make compile fails #10

Closed spoNge369 closed 2 months ago

spoNge369 commented 2 months ago

hi, I using ubuntu-22.04.4-desktop-amd64.iso

install make and mingw like this: sudo apt install gcc-mingw-w64-x86-64-win32 make -y

thanks for the tool :)

x86_64-w64-mingw32-gcc -c cookie-monster-bof.c -o cookie-monster-bof.o
cookie-monster-bof.c: In function ‘GetFileContent’:
cookie-monster-bof.c:95:34: warning: passing argument 1 of ‘KERNEL32$CreateFileA’ from incompatible pointer type [-Wincompatible-pointer-types]
   95 |     hFile = KERNEL32$CreateFileA(appdata, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
      |                                  ^~~~~~~
      |                                  |
      |                                  CHAR * {aka char *}
cookie-monster-bof.c:24:57: note: expected ‘LPCWSTR’ {aka ‘const short unsigned int *’} but argument is of type ‘CHAR *’ {aka ‘char *’}
   24 | WINBASEAPI HANDLE  WINAPI KERNEL32$CreateFileA (LPCWSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile);
      |                                                 ~~~~~~~~^~~~~~~~~~
cookie-monster-bof.c: In function ‘GetFirefoxInfo’:
cookie-monster-bof.c:256:34: warning: passing argument 1 of ‘KERNEL32$CreateFileA’ from incompatible pointer type [-Wincompatible-pointer-types]
  256 |     hFile = KERNEL32$CreateFileA(appdata, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
      |                                  ^~~~~~~
      |                                  |
      |                                  CHAR * {aka char *}
cookie-monster-bof.c:24:57: note: expected ‘LPCWSTR’ {aka ‘const short unsigned int *’} but argument is of type ‘CHAR *’ {aka ‘char *’}
   24 | WINBASEAPI HANDLE  WINAPI KERNEL32$CreateFileA (LPCWSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile);
      |                                                 ~~~~~~~~^~~~~~~~~~
cookie-monster-bof.c:308:34: warning: passing argument 1 of ‘KERNEL32$CreateFileA’ from incompatible pointer type [-Wincompatible-pointer-types]
  308 |     hFile = KERNEL32$CreateFileA(logins, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
      |                                  ^~~~~~
      |                                  |
      |                                  CHAR * {aka char *}
cookie-monster-bof.c:24:57: note: expected ‘LPCWSTR’ {aka ‘const short unsigned int *’} but argument is of type ‘CHAR *’ {aka ‘char *’}
   24 | WINBASEAPI HANDLE  WINAPI KERNEL32$CreateFileA (LPCWSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile);
      |                                                 ~~~~~~~~^~~~~~~~~~
cookie-monster-bof.c:319:9: warning: implicit declaration of function ‘download_file’ [-Wimplicit-function-declaration]
  319 |         download_file(logins, buffer, dwFileSize);
      |         ^~~~~~~~~~~~~
cookie-monster-bof.c:329:34: warning: passing argument 1 of ‘KERNEL32$CreateFileA’ from incompatible pointer type [-Wincompatible-pointer-types]
  329 |     hFile = KERNEL32$CreateFileA(database, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
      |                                  ^~~~~~~~
      |                                  |
      |                                  CHAR * {aka char *}
cookie-monster-bof.c:24:57: note: expected ‘LPCWSTR’ {aka ‘const short unsigned int *’} but argument is of type ‘CHAR *’ {aka ‘char *’}
   24 | WINBASEAPI HANDLE  WINAPI KERNEL32$CreateFileA (LPCWSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile);
      |                                                 ~~~~~~~~^~~~~~~~~~
cookie-monster-bof.c: In function ‘GetBrowserFile’:
cookie-monster-bof.c:417:20: warning: comparison between pointer and integer
  417 |         if (dwSize == NULL)
      |                    ^~
cookie-monster-bof.c:486:52: warning: passing argument 1 of ‘MSVCRT$strcmp’ from incompatible pointer type [-Wincompatible-pointer-types]
  486 |                     if (ret == 0 && (MSVCRT$strcmp(objectTypeInfo,"File"))){
      |                                                    ^~~~~~~~~~~~~~
      |                                                    |
      |                                                    PPUBLIC_OBJECT_TYPE_INFORMATION {aka struct __PUBLIC_OBJECT_TYPE_INFORMATION *}
cookie-monster-bof.c:34:42: note: expected ‘const char *’ but argument is of type ‘PPUBLIC_OBJECT_TYPE_INFORMATION’ {aka ‘struct __PUBLIC_OBJECT_TYPE_INFORMATION *’}
   34 | DECLSPEC_IMPORT int WINAPI MSVCRT$strcmp(const char*, const char*);
      |                                          ^~~~~~~~~~~
x86_64-w64-mingw32-strip --strip-unneeded cookie-monster-bof.o
spoNge369 commented 2 months ago

I was able to compile it with: x86_64-w64-mingw32-gcc cookie-monster.c -o cookie-monster.exe -lshlwapi -lcrypt32 -lntdll

but make dont compile :(

spoNge369 commented 2 months ago

I'm going to close this, because it's getting weird.

spoNge369 commented 2 months ago

@KingOfTheNOPs, set it to closed, to prevent this spam from being in the main Issues tab.

spoNge369 commented 2 months ago

there were spam comments, I see they deleted everything