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

Add optional support for winpty (pty for windows pre ConPTY) #5

Open
a-urth opened this issue Sep 29, 2023 · 2 comments
Open

Add optional support for winpty (pty for windows pre ConPTY) #5

a-urth opened this issue Sep 29, 2023 · 2 comments

Comments

@a-urth
Copy link

a-urth commented Sep 29, 2023

Since ConPTY appeared in windows only in late 2018, there is no native way to use pty before that. Although with help of winpty (https://github.com/rprichard/winpty) its possible.

It might be helpful to add it and make it possible to run full login shell in older windows versions. Surely its somewhat ugly approach which requires to bring additional dll and exe, although I couldn't find better approach.

Here is example https://github.com/NHAS/reverse_ssh/tree/main/pkg/winpty

@NHAS
Copy link

NHAS commented Oct 3, 2023

You can make this slightly less awful by loading (and executing) binaries into memory with a manual mapper for winpty.

You could use something like this: https://github.com/NHAS/stab in order to load the PE's which would mean you dont have to write anything to disk.

The only downside is this is a common technique for AV evasion and will probably get you binned

@photostorm
Copy link
Owner

I will look into it.

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