1
0
mirror of https://github.com/calebstewart/pwncat.git synced 2024-11-24 01:25:37 +01:00
Commit Graph

647 Commits

Author SHA1 Message Date
Caleb Stewart
f4c01af113 Modified dockerfile to install in virtualenv 2021-06-16 16:10:48 -04:00
Mitul16
226724f8d4 Merge the changes made through the Web Editor, fixed some comments 2021-06-17 01:29:22 +05:30
Mitul16
97ecf1eab1 Updated CHANGELOG.md
I am not sure about the changes I have made, please have a look yourself. I did follow `Keep a changelog`.
2021-06-17 01:27:47 +05:30
Mitul16
eb18bf4e8d Applied changes from python-black, pre-merge checks
These changes do not affect the working of `pwncat`. You had an older version of `python-black`, and allowed me to apply the changes. As per the provided template, I have also ran `isort` and `flake8`, they reported no errors and/or modifications.
2021-06-17 01:24:25 +05:30
Mitul Varshney
4ac8ddee38
Replaced redundant comments with informative ones 2021-06-16 20:54:50 +05:30
Mitul16
1ffbc0e8e7 Merge branch 'master' of https://github.com/calebstewart/pwncat 2021-06-16 16:58:58 +05:30
Mitul16
3bccda6de4 Modified manager->sessions to work as a Dictionary
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
2021-06-16 16:57:57 +05:30
Mitul16
26247e2621 Updated zsh shell prompt to match with rest of the PROMPTS 2021-06-16 16:43:03 +05:30
Caleb Stewart
81e3f2071d Bump to v0.4.2 2021-06-15 21:24:13 -04:00
Caleb Stewart
7102430fcd Added version option; updated documention for install 2021-06-15 21:17:08 -04:00
Caleb Stewart
8363732334 Tweaked format of release changelog 2021-06-15 19:16:23 -04:00
Caleb Stewart
c1bdb62822 Better release changelog output 2021-06-15 17:07:06 -04:00
Caleb Stewart
ea62c3d45e Removed zip file that was accidentally pushed 2021-06-15 17:02:27 -04:00
Caleb Stewart
d06daf89c0 Added release version bodies from changelog 2021-06-15 16:59:33 -04:00
Caleb Stewart
b1e2603855 Added Pull Request template and contributing instructions 2021-06-15 16:37:44 -04:00
Caleb Stewart
3e92f0c964 Fixed linux.enumerate.system.network when using old ip
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.
2021-06-15 15:59:33 -04:00
Caleb Stewart
c3a6654219 Added CONTRIBUTING.md instructions 2021-06-15 13:37:49 -04:00
Mitul Varshney
ac859cb802 Merge branch 'calebstewart:master' into master 2021-06-15 22:37:48 +05:30
Caleb Stewart
2e6b7c75fb
Merge pull request #131 from calebstewart/issue-126-identify-shell
Identified critical error in RawIOBase implementation
2021-06-15 12:00:28 -04:00
Mitul Varshney
a941464ca6 Merge branch 'calebstewart:master' into master 2021-06-15 15:37:43 +05:30
Mitul16
21095ab964 Missing 'f' in some f-strings
There are some f-strings with '{values}' but missing 'f' in 'f"..."'
2021-06-15 09:02:32 +05:30
Caleb Stewart
31b68a2518 During debugging, accidentally removed an exception
Re-added commented exception handler that was removed for testing
2021-06-14 22:36:14 -04:00
Caleb Stewart
64dcae2f0b Identified critical error in RawIOBase implementation
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)
2021-06-14 22:22:42 -04:00
Caleb Stewart
95a6ac98cb
Merge pull request #130 from Mitul16/master
- 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`
2021-06-14 19:18:01 -04:00
Mitul16
9365d93856 Modified the 'zsh' shell prompt variable (PS1) value
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
2021-06-15 03:40:59 +05:30
Mitul16
03f7ad8466 Added missing 'return' statement
When we have a session, the missing 'return' statement was allowing to index invalid sessions values
2021-06-15 03:35:07 +05:30
Caleb Stewart
2bd4e625fd Add option for ip to never output colors 2021-06-14 11:09:15 -04:00
Caleb Stewart
0f28cc67e1 Added lookup table for prompts based on shell
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.
2021-06-14 10:42:51 -04:00
Caleb Stewart
cb203349d7 Fixed Dockerfile
- 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.
2021-06-14 09:01:19 -04:00
Caleb Stewart
b861ab1ed3
Merge pull request #121 from calebstewart/issue-116-failed-to-establish-linux
Checked for SHELL pointing to nologin
2021-06-14 08:18:15 -04:00
Caleb Stewart
12d2b234a6 Added pull request templates 2021-06-13 20:23:24 -04:00
Caleb Stewart
34bea8eccc
Merge pull request #124 from calebstewart/issue-123-fix-flake8-errors
Fixed all outstanding flake8 errors
2021-06-13 19:19:48 -04:00
Caleb Stewart
e7231d1068 Fixed all outstanding flake8 errors 2021-06-13 18:48:33 -04:00
Caleb Stewart
3861310d71 Even better file close handling
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.
2021-06-13 17:15:22 -04:00
Caleb Stewart
6cc30a6ab5 Formatting and isort fixes 2021-06-13 16:49:38 -04:00
Caleb Stewart
97c489beb0 Added length_sort to isort config 2021-06-13 16:38:05 -04:00
Caleb Stewart
6609591cef More information output on upload commands 2021-06-13 16:30:57 -04:00
Caleb Stewart
473bda6835
Merge pull request #120 from calebstewart/issue-117-linpeas-upload
Modified File Close Routine
2021-06-13 15:57:43 -04:00
Caleb Stewart
e7bf7383f4 Fixed channel send typo 2021-06-13 15:43:22 -04:00
Caleb Stewart
b9f20ecd74 Checked for SHELL pointing to nologin
I'm not sure why this would happen, but it should fix #116
2021-06-12 19:29:47 -04:00
Caleb Stewart
f7f5bb4325 Modified File Close Routine
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.
2021-06-12 19:09:41 -04:00
Caleb Stewart
f74510afb6
Merge pull request #119 from calebstewart/feature-reflective-dotnet
- 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)
2021-06-12 17:45:39 -04:00
Caleb Stewart
44aff46d93 Added documentation and workflow for plugin packaging 2021-06-12 17:38:30 -04:00
Caleb Stewart
7ec0d22194 Added ability to prestage plugin downloads
Added entrypoint option `--download-plugins` to pull down all windows
plugins automatically and stage on the attacking machine
2021-06-12 16:04:33 -04:00
Caleb Stewart
39cd6aca94 Protected Windows C2 from KeyboardInterrupts 2021-06-12 15:12:04 -04:00
Caleb Stewart
ac74c3d013 Cleaned up plugin system
- Added builtin plugin resolver
- Rolled base c2 dlls into plugin resolver
- Changed plugin location configuration from `windows_c2_dir` to `plugin_path`
2021-06-12 03:10:14 -04:00
Caleb Stewart
274c4b6cab
Merge pull request #115 from calebstewart/issue-114-windows-comms
Windows C2 Protocol Update
2021-06-09 23:04:23 -04:00
Caleb Stewart
58668d35d7 fixed processing output from run_method 2021-06-09 23:03:49 -04:00
Caleb Stewart
04587bffb1 Updated windows platform for new C2 comms 2021-06-09 20:57:25 -04:00
Caleb Stewart
00c6e13c39 Merge branch 'issue-100-arrow-keys' 2021-06-09 14:33:01 -04:00