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

Shellserver shutdown capability and making Success public #340

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

lobsterjerusalem
Copy link
Contributor

This merge does the following:

  • Fixes issues with the shell servers not exiting gracefully.
  • Exposes Success from shell servers.

This is most useful for having a way to not only remotely trigger the shutdown of the ShellServers' respective clients/listener sockets and then knowing whether or not cleanup can happened on the basis of whether or not a client actually connected.

In order to make use of these changes the exploit must currently capture the Interrupt signal, example below.


// run exploit
	c := make(chan os.Signal, 1)
	signal.Notify(c, os.Interrupt)
	go func(){
		for range c {
				output.PrintStatus("recvd ctrl c")
			if simpleshell.GetServerInstance().Success {
				output.PrintStatus("killing shell server")
				simpleshell.GetServerInstance().KillServer()
                                doCleanup()
			}
		}
	}()

@lobsterjerusalem
Copy link
Contributor Author

Also open to edits to internalize the Interrupt capturing, or that can be a different PR to keep things as a relevant as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant