NOTE: This is for linux! This change will add ID management for the sessions, so that each session gets a unique ID (for a single `pwncat` process) and killing a session will not affect other session IDs. This is useful when we are pivoting using `pwncat`, and removes the confusion with ID management since the current implementation uses a List and works with list indices instead of session IDs
Older versions of `ip` do not support the `-c=never` argument (or colors
at all for that matter). Also, verified isort results, which made some
other modifications.
The `ChannelFile` implementation raised a BlockingIOError in certain
circumstances which is against the documented implementation for a
subclass of `RawIOBase`. This was causing odd behaviour like occasional
missing command output (e.g. empty environment variables)
- Added return statement to `sessions` in case of out-of-bounds session ID
- Replaced the `$fg[color]` syntax with the basic color interface as defined in `man 1 zshmisc`
The older variable value isn't working, I have modified it accordingly matching the original color scheme. However, I have used a different value to show current working directory so that the home directory appears as '~', you may want to use '$PWD' instead
The zsh shell uses a different syntax for colored prompts. As such, I've
divided the prompt setup into three different options based on the
basename of the active shell: `sh` (uncolored), `zsh` and `default`.
Other shells can be added to `Linux.PROMPTS` as needed in the future.
- Added rust requirements for cryptography.
- Removed installing requirements.txt as it's no longer needed.
- Added a call to `--download-plugins` to ensure plugins are bundled automatically.
For linux, we used to send one or two EOFs via C-d to the process to
signal exit, however this was inconsistent. Depending on the previous
input from the attacker, sometimes one was needed, sometimes two.
Sometimes, we even observed more than two being needed. Instead, we now
simply loop sending one at a time and checking for the end delimeter.
This will be slightly slower, but avoids hangups or accidentally closing
the shell.
The old logic for exiting the process when writing to a file was flawed.
I also increased the block size for `dd` to ensure it reads data as
quickly as possible while we upload.
- Updated documentation for Plugin API
- Updated README with notes on Windows support
- Added plugin API to Windows C2
- Added GitHub Action to package Windows plugins and attach to releases automatically.
- Added early support for BadPotato supported by [pwncat-badpotato](https://github.com/calebstewart/pwncat-badpotato) plugin (step toward #106)