🟨Catching Files over HTTP/S
A good alternative for transferring files to Apache
is Nginx
Apache executes anything ending in PHP
so uploading web shells and executing them is less complicated. Configuring Nginx
to use PHP is nowhere near as simple.
Create a Directory to Handle Uploaded Files
Change the Owner to www-data
Create Nginx Configuration File
We need to create the file /etc/nginx/sites-available/upload.conf
with the content:
Symlink our Site to the sites-enabled Directory
Start Nginx
We can encounter errors such as port already running, so we need to verify errors ->
We see there is already a module listening on port 80. To get around this, we can remove the default Nginx configuration, which binds on port 80.
Now we can test uploading by using cURL
to send a PUT
request. In the below example, we will upload the /etc/passwd
file to the server and call it users.txt
Last updated