poweradminllc / PAExec

Remote execution, like PsExec
523 stars 177 forks source link

64bit executable or compile instructions #48

Open Zitt opened 1 year ago

Zitt commented 1 year ago

It appears the PAExec as downloaded is a 32bit application which is leading to problems running on remote 64bit Windows server images.

Specifically; I'm trying to run "bcdedit" remotely on a 64bit machine using the following command line on a host computer: paexec.exe \\<ipaddress> -u <user> -p <password> -n 5 cmd both the host and the target are running 64bit windows.

bcdedit is not found in the system32 directory. Further debug indicates that the cmd environment is running as 32bit because the environment variable PROCESSOR_ARCHITECTURE returns x86 not AMD64. PROCESSOR_ARCHITECTURE=x86

I have verified on the running target that bcdedit is present on the system. I think the WOW32 environment is blocking access to BCDEDIT because it is a 64bit tool on this system.

I tried compiling PAExec myself under visual studio 2019; but I'm having the typical growing pains of not having the correct compiler options and complaining about missing header files.

JonnyTech commented 1 year ago

bcdedit is not found in the system32 directory

Use sysnative instead of system32

Zitt commented 1 year ago

I'll try that; but that said, the PsExec tool does have a 64bit version and it does seem to have bcdedit available. So my request to either have detailed compile instructions and/or a 64bit binary is still valid.