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

[ Linux Machine ] Session status gets in "undefined" state after closing the terminal in victim machine where the payload was executed #61

Open
yaseerkhan opened this issue Dec 28, 2022 · 6 comments

Comments

@yaseerkhan
Copy link

I am not sure if it's only me or if others encountered this issue as well.

  1. When I use "shell {session ID}" and run commands I observed behavior in the victim machine terminal where I pasted the payload.
  2. After closing the terminal where I pasted the payload, the status of the session becomes undefined and it doesn't work anymore.
@yaseerkhan yaseerkhan changed the title Session status gets in "undefined" state after closing the terminal in victim machine where the payload was executed [ Linux Machine ] Session status gets in "undefined" state after closing the terminal in victim machine where the payload was executed Dec 28, 2022
@stevenhay
Copy link

Also happening on Windows, payload runs correctly, session gets generated but then the powershell instance quits and the session sits on "Undefined" and no commands work

@yaseerkhan
Copy link
Author

Also happening on Windows, payload runs correctly, session gets generated but then the powershell instance quits and the session sits on "Undefined" and no commands work

have you tried turning off real time protection in firewall settings?

@SolsticeSpectrum
Copy link

I am not sure if it's only me or if others encountered this issue as well.

1. When I use "shell {session ID}" and run commands I observed behavior in the victim machine terminal where I pasted the payload.

2. After closing the terminal where I pasted the payload, the status of the session becomes undefined and it doesn't work anymore.

I can confirm this behaviour

@t3l3machus
Copy link
Owner

The shells you can grab with Villain at the moment are not fully functional ptys. If you run commands that start interactive sessions (e.g., nano, cat > file.txt, sh/zsh/bash, vim) your shell will hang. The commands you issue must always return. Maybe its because of that?

@SolsticeSpectrum
Copy link

Probably yes, how about creating a service? And running it as a service? That would also mean that it will stay hidden from htop.

@yaseerkhan
Copy link
Author

The shells you can grab with Villain at the moment are not fully functional ptys. If you run commands that start interactive sessions (e.g., nano, cat > file.txt, sh/zsh/bash, vim) your shell will hang. The commands you issue must always return. Maybe its because of that?

No that is understandable, but here sessions were the main concern as they get into undefined state after closing the terminal where the payload is executed! let me try to explain it with an example.

I generated a payload for Windows and executed that payload in the Powershell but now when I close that instance of PowerShell the session status changes to undefined state and that specific session is not usable any further

I hope this example helps you get an idea of what i was talking about initially!!

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

4 participants