-
Notifications
You must be signed in to change notification settings - Fork 5
Reverse shell implant #22
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
Open
w1th4d
wants to merge
21
commits into
main
Choose a base branch
from
feature/implant-revshell
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This never quite worked. The pipe streams seem to behave differently regarding how they're closed compared to the actual streams of a Socket? This commit will be reverted, but I want it in the history in case it's needed in the future.
This reverts commit 15a5252.
This should make sure there are no implicitly expected behaviours around how Sockets close their streams. Consider the case where the shell dies, the fromShell stream gets closed, toRemote is closed, but the Socket is not (leaving the fromSocket thread hanging). So far this has not been the case, but it's not very clear why. This change should make sure steams and threads are properly interrupted.
This reverts commit 09f389f.
This fixes a bug with Windows targets where the threads would not get end-of-stream when the remote just stops responding.
This makes it a mandatory conf property.
This code is supposed to be invoked as an implant. Maybe consider supplying main methods in implants in the future?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Classic reverse shell that connects to a specified hostname, IPv4 or IPv6 address and TCP port.
Unfortunately, this is an unstable shell. Meaning it does not support PTY terminal emulation. Doing so turns out to be suprizingly complicated in Java (effectively requiring libraries that uses JNI/JNA which is a huge footprint for an implant).
Tested on Linux v6.8.0, Windows 11 22H2 and macOS v15.4.