You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: windows-1/windows-redteam/data-exfiltration.md
+58-14Lines changed: 58 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -91,17 +91,44 @@ See [this section](privilege-escalation.md#smb) under Privilege Escalation for m
91
91
92
92
If you set up a web server to accept post requests, you can either AES encrypt or base64 encode your target data and simply send an HTTP request to the server with the data. 
93
93
94
+
{% hint style="warning" %}
95
+
Warning: SecureString has a maximum length of **65536** characters. This limits the size of the file that can be sent to about 65kb.
Simply substitute the `$encrypted_payload` variable with the actual content that was sent in the body of the HTTP request, and you will have your exfiltrated file!
157
+
Simply input the `$encrypted_payload` argument with the actual content that was sent in the body of the HTTP request, and you will have your exfiltrated file!
158
+
159
+
{% hint style="warning" %}
160
+
You may need to be cognizant of the character encoding of text files you are trying to send. If the file decrypts with no errors, but looks like garbage or random chinese characters, then you may need to use the `-UTF8` argument for the `Decrypt_file` function above. \
161
+
\
162
+
Output filesize for UTF-8 encoded files may be doubled, due to output being UTF-16le by default.
163
+
{% endhint %}
120
164
121
-
This works in either Windows Powershell, or `pwsh` on Unix systems as well.  
165
+
References:
122
166
123
-
One potential limitation I have noted is that it seems to strip out newline characters in text files.  
0 commit comments