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
Run on load not working #1563
Comments
It looks like the rendering logic is broken. The conditional https://github.com/BishopFox/sliver/blob/master/implant/sliver/sliver.c#L23-L26 must be failing for some reasons because even with |
How are you running the DLL? |
I'm unable to reproduce the issue on #include <iostream>
#include <Windows.h>
int main(int argc, char* argv[])
{
if (argc != 2) {
std::cerr << "Missing lib path" << std::endl;
return 1;
}
std::cout << "Loading " << argv[1] << std::endl;
HMODULE mod = LoadLibraryA(argv[1]);
std::cout << "Loaded " << argv[1] << ", now sleeping 30s ..." << std::endl;
Sleep(30000);
std::cout << "Done!" << std::endl;
return 0;
} Implant was generated with this command: generate --mtls myhost.local --run-at-load --format shared |
The code is working as intended. |
When I looked at the generated code it was missing all the parts that were in the conditional block. I didn't test against master but I should have some time this weekend to give it a shot and see if it's fixed there. Also, I think I generated it from a profile. Not sure if that makes any difference. |
Coming from a profile shouldn't make a difference. If it does it's a bug. |
Describe the bug
Generating an implant and specify
-R
or--run-on-load
does not seem to actually produce a dll with aDllMain
that callsStartW
. Dumping symbols I didn't see it there and it's definitely not connecting back. If I manually callStartW
it seems to work.Expected behavior
Loading the DLL should cause the implant to trigger
The text was updated successfully, but these errors were encountered: