-1

This is a dumb question.

Let's say there is a file called ethical.exe on "www.redhatpride.tk/secretfiles/" I'm running a regular Windows 10 PC. Using win+R (run) (or if we can't, cmd) , is there a command to remotely run that? (I guess in this case the file saves to temp) So , simillarly, what would be the command to download that (to a defined location)

Thanks in advance. I know it's basic script kiddie knowledge but hey, it's worth asking.

Disclaimer: I'm not a scammer/evil person. But some are. If you feel the answer is too dangerous for the community to have, pm me. (lol though)

1 Answers1

2

On the local computer

Kind of.

Running a program directly from an HTTP URL is not possible in Windows... however, it is possible to run programs from a WebDAV server (which is still HTTP with some extensions) because Windows has a WebDAV "redirector" alongside the more commonly used SMB.

For example, SysInternals offers this service at live.sysinternals.com which runs WebDAV. Although you cannot simply run https://live.sysinternals.com/disk2vhd.exe on Windows, you can rewrite the URL into an UNC path \\live.sysinternals.com\disk2vhd.exe – Windows will automatically detect that it doesn't support SMB but does support WebDAV, and will fetch & run the executable.

Otherwise, just download it to a temporary folder and run manually. (PowerShell has commands for downloading files.)

On the web server

No.

If you are interacting with a web server, purely through HTTP, then you are limited to what the web server allows you to do. You only make a GET or POST request for an URL – the webserver decides what to do.

In a sense, many websites are programs (for example the Super User site is a giant program written in something.NET); but they run only because the web server is configured to allow them to run.

For example, in the past it used to be very common to allow running any type of program if it was placed in the cgi-bin directory (regardless of its type or extension). Nowadays many webservers are instead configured to run any *.php file as a program (regardless of location).

But this usually does not extend to miscellaneous .exe files in random directories. If your requests for the URL simply download the file, then that's the only thing you can do: you, an outsider, cannot override the webserver's configuration.

(And of course, in order to run Windows .exe programs, the server has to be running Windows...)

u1686_grawity
  • 452,512
  • Could you provide me with a batch script (text to put in a .bat, as I know they work like in cmd) to download the ethical.exe to a certain directory and run it? I'm not good with syntax but I know it's easier. I'll mark this as answered. Good day! I'll also have a look on webdav. – Mihai Florea Sep 27 '18 at 10:27