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

Environment.Exit() is bad #35

Closed
rasta-mouse opened this issue Jun 24, 2020 · 3 comments
Closed

Environment.Exit() is bad #35

rasta-mouse opened this issue Jun 24, 2020 · 3 comments

Comments

@rasta-mouse
Copy link

Describe the bug

Maybe not fair to call this a bug, but Seatbelt calls Environment.Exit() here:
https://github.com/GhostPack/Seatbelt/blob/master/Seatbelt/Runtime.cs#L77

When Seatbelt is being run via (or integrated into) a tool/implant like Covenant's Grunt that runs the assembly within the implant's process (i.e. no fork & run) - it will cause the whole implant to exit when this exception is caught.

It would be nicer to orchestrate a way of gracefully returning so we can drop out of the assembly without explicitly calling this exit method.

To Reproduce

  1. Start a Grunt.
  2. Run Seatbelt with some remote enumeration options that will fail, e.g: Seatbelt -group=remote -computername=something.local -username=DOMAIN\fake -password=DoesNotMatter.
  3. Watch the Grunt exit.
@leechristensen
Copy link
Member

Thanks! Fixing in #36

@HarmJ0y
Copy link
Member

HarmJ0y commented Jun 25, 2020

Reviewed and landed into master. Thanks @rasta-mouse !

@HarmJ0y HarmJ0y closed this as completed Jun 25, 2020
@rasta-mouse
Copy link
Author

rasta-mouse commented Jun 25, 2020

Thanks for the awesome turn around time guys ♥

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

No branches or pull requests

3 participants