𧬠PowerShell Base64 Web Upload
Here's a slick way to exfiltrate files using PowerShell, Base64, and a simple Netcat listener on your attack box β no need for a fancy web server! π§ͺπ‘
π§± Step 1: Encode the File in PowerShell
Weβll convert the file into Base64 so it can be transferred as plain text.
π Step 2: Send It as a POST Request
Now we send that Base64 string to our attacker box using Invoke-WebRequest
.
π‘οΈ Step 3: Catch the Data with Netcat
Set up Netcat on your attack box to listen for incoming POST data:
π§² Youβll see something like this when the request comes through:
π Step 4: Decode and Rebuild the File
Copy the Base64 string and decode it back into the original file:
βοΈ Now your hosts
file is restored!
Want to verify it? Just run md5sum
to compare hashes. π
π‘ Tip:
This trick is super handy for environments where you donβt have an upload endpoint but can exfil data in a stealthy way via HTTP POST.
Last updated