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
I tried to upload a small plain text file to a beacon and while the beacon received the task and created a file in the appropriate location, the file was empty. I've tried troubleshooting but am having trouble debugging the beacon end of the connection. I tested this on a Windows 10 64bit version 20H2 system with secure/static, secure/staged, non-secure/static, non-secure staged beacon types as well as with and without beacon debug enabled but all resulted in a empty file. Any pointers on debugging the code on the distant end or help in resolving/confirming this issue would be appreciated.
The text was updated successfully, but these errors were encountered:
I think I found a few issues. 1) The ResBuffer needs to be initialized with zeroes in order to prevent the initial asprintf() from appending garbage data. 2) Added a nul byte to terminate the decoded data 3) Close the file descriptor after writing the decoded data to file.
My initial fixes can be viewed here.
I still want to test some more edge cases and maybe add some additional error checking before doing a pull request but would appreciate it if someone could take a look and validate this fixes the issue for them.
I tried to upload a small plain text file to a beacon and while the beacon received the task and created a file in the appropriate location, the file was empty. I've tried troubleshooting but am having trouble debugging the beacon end of the connection. I tested this on a Windows 10 64bit version 20H2 system with secure/static, secure/staged, non-secure/static, non-secure staged beacon types as well as with and without beacon debug enabled but all resulted in a empty file. Any pointers on debugging the code on the distant end or help in resolving/confirming this issue would be appreciated.
The text was updated successfully, but these errors were encountered: