Fix migration issues with Windows service builds #1543
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses #1532. It looks like when you tried to migrate a Windows service build, the server had to make new shellcode that mimicked the service build. Unfortunately, the new build and implant configurations did not have the necessary information for the server to complete the build. Also, the new build and implant configurations were not saved to the database so when the new implant tried to connect to server, the server did not recognize the implant.
I tested migrating non-service builds and they work fine, and I also tried generating implants from profiles, and this code does not seem to affect those. However, I would appreciate it if someone more familiar with the implant generation process took a look at this and made sure I am not doing something wrong.