1
0
mirror of https://github.com/calebstewart/pwncat.git synced 2024-11-30 20:34:15 +01:00
Commit Graph

488 Commits

Author SHA1 Message Date
Caleb Stewart
5cbe311229 Fixed sudo version enumeration
The root of this problem was a typo: missing square braces around
enumeration. However, it also shouldn't have been raising a module
failed error in that case.

After fixing that problem, I found a few more bugs while testing
with Metasploitable2, so I fixed those:

- Added small sleeps in escalation to let the shell keep up
- stat behaves oddly, so added a loop to retry on parsing failure
- Fixed the **syntax** of the mtr gtfobins payload
- Fixed the nmap gtfobins payload

The mtr gtfobins payload is still not right, as it is unable to
read files as it should, but I'll work on that moving forward.
For now, there are no exceptions and escalation is working properly
through `nmap`.
2021-06-03 13:21:42 -04:00
Caleb Stewart
7263f81c0f
Added asciinema to readme... correctly... 2021-06-03 01:29:09 -04:00
Caleb Stewart
2f4bfc18a3
Added screenshot and asciinema recording to README 2021-06-02 21:14:24 -04:00
Caleb Stewart
25b9d0a6ba Updated readme with notes on versions 2021-06-02 20:05:15 -04:00
Caleb Stewart
4b8116cce9 Merge branch 'master' of github.com:calebstewart/pwncat
Had some missining remote commits 🤦
2021-06-02 19:53:55 -04:00
Caleb Stewart
3f799dd3bd Merge branch 'platforms'
This marks a huge step in pwncat. We're finally merging
the platforms branch. The API has completely changed at
this point. I've bumped the version number in setup.py
and tagged the old version appropriately. The
readthedocs stable page will still point to the old
API while latest should provide documentation on the
updated API.
2021-06-02 19:49:31 -04:00
Caleb Stewart
dc79ec407c Updated documentation; added default platform 2021-06-02 19:19:25 -04:00
Caleb Stewart
d1bb4b0b72 Fixed rich progress so we can remove version lock 2021-06-02 18:56:39 -04:00
Caleb Stewart
6179d72795 Once again, fixing docs requirements 2021-06-02 18:43:20 -04:00
Caleb Stewart
91828f0042 Fixed documentation requirements 2021-06-02 18:42:05 -04:00
Caleb Stewart
cd163045be Added a lot of API documentation
Very close to API documentation complete for #95
2021-06-02 18:23:49 -04:00
Caleb Stewart
0a3a787870 Started updating documentation
Another step toward #95
2021-06-01 22:24:18 -04:00
Caleb Stewart
5d80d1b8e8 Cleaned up requirements in requirements.txt and setup.py 2021-05-31 17:27:44 -04:00
Caleb Stewart
87c4f6ee77 Added CVE-2019-14287 and CVE-2017-5618 modules 2021-05-31 17:10:34 -04:00
Caleb Stewart
2212be9751 Fixed linux su; added more tests 2021-05-31 15:11:26 -04:00
Caleb Stewart
86a0515342 mirrored package requirements to docs requirements 2021-05-30 21:32:12 -04:00
Caleb Stewart
4ae446ed32 cleaned up requirements.txt 2021-05-30 21:14:46 -04:00
Caleb Stewart
8dccfdff77 Added/improved unit tests 2021-05-30 21:01:57 -04:00
Caleb Stewart
a0e6e2c073 Fixed typo in socket channel recv 2021-05-30 15:07:53 -04:00
Caleb Stewart
db9e7ed9cf Fixed host address in tests 2021-05-30 00:57:59 -04:00
Caleb Stewart
c04b494322 Added manual port bindings 2021-05-30 00:55:27 -04:00
Caleb Stewart
8853e8f4e5 Added service containers
This will probably fail
2021-05-30 00:52:51 -04:00
Caleb Stewart
5090c6e6c9 Workfow install as user 2021-05-30 00:47:23 -04:00
Caleb Stewart
698de90fae Workflow changes happen here apparently? 2021-05-30 00:43:20 -04:00
Caleb Stewart
0f341b4707 Trying to force this thing to work 2021-05-30 00:42:02 -04:00
Caleb Stewart
f4e9d4120a Added setup.py call to workflow 2021-05-30 00:33:02 -04:00
Caleb Stewart
8bcdd9ee93 Removed xprocess dependency 2021-05-30 00:31:10 -04:00
Caleb Stewart
ab16de2adf Removed digitalocean import 2021-05-30 00:29:30 -04:00
Caleb Stewart
c08b62c281 Added workflow testing in master so we cant test 2021-05-30 00:26:50 -04:00
Caleb Stewart
b998470297 Working on automated testing
Added a test workflow. Only for triggering manually for now.
2021-05-30 00:24:12 -04:00
Caleb Stewart
0046bd4c60 Added basic windows enums and bumped c2 version 2021-05-26 01:10:05 -04:00
Caleb Stewart
a15577892d Added windows local user and group enumeration
Also added markdown table generator/jinja filter for report generation.
This is currentl the best I can do since commonmark (and therefore rich)
doesn't support tables at the moment. 😭
2021-05-25 02:05:23 -04:00
Caleb Stewart
830fe7b211 Initial working windows setup
I have opened the Windows C2 repository, and added the ability for
pwncat to automatically download the C2 DLLs. If you don't have internet
or would rather grab them yourself, you can place them in
~/.local/share/pwncat (or point the `windows_c2_dir` config at the
directory where you do place them). If `stageone.dll` and `stagetwo.dll`
exist in that directory, pwncat will not attempt to download them from github.
2021-05-24 00:18:30 -04:00
Caleb Stewart
97c4d256ab Added report module for templated markdown reports
Reports are generated based on platform and use Jinja2.
Report templates are in pwncat/data/reports. I still need
to implement the full report for the individual platforms, but
have some boilerplate in the generic template. The module will
also render markdown to the terminal via rich markdown, however
tables are currently not rendered properly.
2021-05-23 17:28:48 -04:00
Caleb Stewart
67cd1033c5 Implemented Implant for PrivateKey facts
A PrivateKey fact is now also an implant unless the key is not
authorized. When we locate a private key by enumeration, the
key is assumed to be authorized until it fails. If a private
key fails to connect, it's implant types are removed, but the fact
is kept in the database. The authorized keys implant also reuses
this fact type, but defines a different remove routine to actaully
remove the authorized key from the target.
2021-05-23 15:36:17 -04:00
Caleb Stewart
812776ac28 Fixed group membership for linux enumeration
Added user to member list if primary group matches
2021-05-23 13:14:17 -04:00
Caleb Stewart
31ba4990c8 Tested commands to ensure API compliance
I went through each command to make sure they work.
Some commands aren't needed anymore and aren't implemented.
They will likely be removed eventually, but I've left an
error message there in case I want it later. This is another
check for #95.
2021-05-23 12:56:37 -04:00
Caleb Stewart
ac67745ad3 Put the cat back 2021-05-22 18:19:35 -04:00
Caleb Stewart
b663403218 Improved DB performance; ensure session exit
Ensured the session is only started/closed once per module run.
Also, added calls to `session.close` after interactive exit from
main entrypoint. Closing a session also logs any tampers or implants
left behind before closing the session.
2021-05-22 17:49:44 -04:00
Caleb Stewart
691503a270 Fixed enumeration modules
Some modules weren't cleaning up their Popen objects.
All modules at least execute now. Their results need
to be fact-checked, though.
2021-05-22 14:46:07 -04:00
Caleb Stewart
8c524bfa03 Fixed connect command
This command now functions identically to the entrypoint.
One more item down for #95
2021-05-21 23:32:25 -04:00
Caleb Stewart
e93102636e Implemented remote implant trigger from entrypoint
Command-line connection is working now, but the `connect` command needs
to be completely revamped for the new API. Still another check for #95.
2021-05-20 23:04:52 -04:00
Caleb Stewart
4c97ffef6a Added authorized_keys implant
Still need to test remote functionality, but that requires an
implementation of a reconnect command (or capability in `connect`). In
the meantime, escalate, install, and remove all work. On more step for #95.
2021-05-20 00:42:38 -04:00
Caleb Stewart
f8f7b61f0d Fixed some typos and missing imports 2021-05-19 19:12:02 -04:00
Caleb Stewart
0cab19835e Converted pam backdoor implant
Another step toward #95
2021-05-19 18:58:45 -04:00
Caleb Stewart
d9f4fefe69 Added generic implant escalation module
This module will yield escalations for local implants and does not
depend on any platform.
2021-05-18 21:02:43 -04:00
Caleb Stewart
f5413dfe08 Added db directory for testing database 2021-05-18 20:33:18 -04:00
Caleb Stewart
3e9a56a409 Working implants and multi-session escalation 2021-05-18 20:31:57 -04:00
Caleb Stewart
814c3458a7 Merge branch 'platforms' of github.com:calebstewart/pwncat into platforms 2021-05-16 22:56:57 -04:00
Caleb Stewart
637e7ef18d Working recursive escalation.
Still need to test session-based escalation, but "replace" escalations work.
2021-05-16 22:56:16 -04:00