Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload command not working #83

Open
gator-dev opened this issue Jan 18, 2021 · 4 comments
Open

Upload command not working #83

gator-dev opened this issue Jan 18, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@gator-dev
Copy link

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.

@glides
Copy link
Contributor

glides commented Jan 18, 2021

It seems b64_out (here) is empty for some reason - haven't figure out why, yet.

@leebaird
Copy link
Contributor

@gator-dev thank for reporting the bug. @glides would appreciate your help with this.

@bats3c bats3c added the bug Something isn't working label Jan 18, 2021
@gator-dev
Copy link
Author

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.

@leebaird
Copy link
Contributor

I sent you an email earlier. Is it possible you can hop on Discord? The link is on the README.
I'll clone your fork and test now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants