Skip to content

Shell module#47

Merged
asdek merged 3 commits into
vxcontrol:masterfrom
cyberok-org:shell_module
May 24, 2023
Merged

Shell module#47
asdek merged 3 commits into
vxcontrol:masterfrom
cyberok-org:shell_module

Conversation

@jnovikov

@jnovikov jnovikov commented Feb 12, 2023

Copy link
Copy Markdown
Contributor

Introduce shell module.

This PR introduces new module that allow to spawn interactive shell.
Module supports actions for starting and stopping shells. Module supports multiple shells spawned on single agent.

Implementation details:

  • Module uses minified version of xterm.js library to emulate client-side terminal. This library is distributed under MIT license.
  • Client side part of the module implemented using pseudo terminals:
  • Windows: WinPTY library is used. Library is distributed under MIT license. Module uses DLL + Agent binary downloaded from WinPTY releases page.
  • MacOS: BSD functions to spawn PTTY are used.
  • Linux: raw system calls are used because BSD functions are not available without installing special headers.

How to test the Change

You can import module and try to interact with the spawned shell.

Changelog Entry

Added - New "shell" module. Module that allows to spawn interactive shell on agents.

Checklist:

  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

This change introduces new module that allow to spawn interactive
web-shell on agent.
Module supports Windows, Linux and MacOS.
@jnovikov
jnovikov requested a review from asdek February 12, 2023 20:45
@jnovikov jnovikov added the shell Module shell label Feb 12, 2023
@jnovikov jnovikov added this to the Technical release milestone Feb 12, 2023
This was linked to issues Feb 12, 2023
@asdek
asdek merged commit 4baa30e into vxcontrol:master May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shell Module shell

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New module - shell (linux/darwin) New module - shell (windows)

2 participants