-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Fix bug in the way we are executing fetch payload when FETCH_DELETE is true #19719
base: master
Are you sure you want to change the base?
Conversation
The issue itself seems to be fixed. The payload from bash syntax perspective is okay and it's running. However, from functional perspective, the payload seems to be causing some sort of race condition. Example:
When the payload spawns a new process, the deletion of the payload is sometimes faster than new process. Which results in failure. I suspect race condition as the payload sometimes runs successfully. |
I have not seen this, but I can believe it. I was concerned about that when we executed as background. I wonder if there's a very short sleep or time-consuming command we could run. |
Already tested that, we can do following:
It should fix the problem, I tried it with meterpreter and it worked. |
In my mind I was thinking about something sneakier and shorter, but I'm not coming up with anything. Probably |
This also an option, I'm not sure if it's sneaky, but at least it's not a
Basically, just get |
This change fixes a bug in the way we execute the payload elf inside fetch command payloads when the FETCH_DELETE value is set to true. @h00die-gr3y did a great job explaining everything in the issue, and then solving it.
Fixes #19391
Old and Busted
New and Improved
Verification:
(...)
Thanks, @h00die-gr3y!