Olej писал(а): ↑12 мар 2024, 12:28
GIT репозиторий кода здесь
pwncat-cs
Naming Changes
Due to the naming conflict with Cytopia's pwncat, I have decided to rename the package to pwncat-cs. This includes renaming the entrypoint so that there are no direct conflicts with Cytopia's project. If you are updating from v0.4.*, the command name will now have changed, and the pcat and pc varianst have been removed. See the most recent release notes for more details.
Написан он на Python (учитывая, что от утилиты для сетевой передачи не нужно особой шустрости ... и гибкость Python - это, пожалуй, разумный выбор)...
Устанавливается (из нескольких способов, на "попробовать" ... это не из лучших) простецки:
Код: Выделить всё
olej@R420:~$ pip install pwncat-cs
Defaulting to user installation because normal site-packages is not writeable
Collecting pwncat-cs
Downloading pwncat_cs-0.5.4-py3-none-any.whl (2.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.4/2.4 MB 2.4 MB/s eta 0:00:00
Collecting paramiko-ng<3.0.0,>=2.8.8
Downloading paramiko_ng-2.8.10-py2.py3-none-any.whl (197 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 197.6/197.6 KB 4.1 MB/s eta 0:00:00
Requirement already satisfied: Jinja2<4.0.0,>=3.0.1 in ./.local/lib/python3.10/site-packages (from pwncat-cs) (3.1.2)
Collecting ZODB3<4.0.0,>=3.11.0
Downloading ZODB3-3.11.0.tar.gz (55 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 55.1/55.1 KB 3.6 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Requirement already satisfied: PyNaCl<2.0.0,>=1.4.0 in /usr/lib/python3/dist-packages (from pwncat-cs) (1.5.0)
Requirement already satisfied: pycryptodome<4.0.0,>=3.10.1 in /usr/local/lib/python3.10/dist-packages (from pwncat-cs) (3.16.0)
Collecting rich<11.0.0,>=10.4.0
Downloading rich-10.16.2-py3-none-any.whl (214 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 214.4/214.4 KB 4.0 MB/s eta 0:00:00
Requirement already satisfied: netifaces<0.12.0,>=0.11.0 in /usr/lib/python3/dist-packages (from pwncat-cs) (0.11.0)
Requirement already satisfied: requests<3.0.0,>=2.25.1 in ./.local/lib/python3.10/site-packages (from pwncat-cs) (2.28.2)
Collecting packaging<21.0,>=20.9
Downloading packaging-20.9-py2.py3-none-any.whl (40 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.9/40.9 KB 1.9 MB/s eta 0:00:00
Collecting python-rapidjson<2.0,>=1.0
Downloading python_rapidjson-1.16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 4.3 MB/s eta 0:00:00
Requirement already satisfied: prompt-toolkit<4.0.0,>=3.0.19 in /usr/lib/python3/dist-packages (from pwncat-cs) (3.0.28)
Collecting zodburi<3.0.0,>=2.5.0
Downloading zodburi-2.6.0-py3-none-any.whl (13 kB)
Requirement already satisfied: MarkupSafe>=2.0 in /usr/lib/python3/dist-packages (from Jinja2<4.0.0,>=3.0.1->pwncat-cs) (2.0.1)
Requirement already satisfied: pyparsing>=2.0.2 in /usr/lib/python3/dist-packages (from packaging<21.0,>=20.9->pwncat-cs) (2.4.7)
Collecting bcrypt>=3
Downloading bcrypt-4.1.2-cp39-abi3-manylinux_2_28_x86_64.whl (698 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 698.9/698.9 KB 4.3 MB/s eta 0:00:00
Requirement already satisfied: cryptography>=1.6 in /usr/lib/python3/dist-packages (from paramiko-ng<3.0.0,>=2.8.8->pwncat-cs) (3.4.8)
Requirement already satisfied: cffi>=1.4.1 in /usr/local/lib/python3.10/dist-packages (from PyNaCl<2.0.0,>=1.4.0->pwncat-cs) (1.15.1)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests<3.0.0,>=2.25.1->pwncat-cs) (2020.6.20)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/lib/python3/dist-packages (from requests<3.0.0,>=2.25.1->pwncat-cs) (1.26.5)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests<3.0.0,>=2.25.1->pwncat-cs) (3.3)
Requirement already satisfied: charset-normalizer<4,>=2 in ./.local/lib/python3.10/site-packages (from requests<3.0.0,>=2.25.1->pwncat-cs) (3.0.1)
Collecting commonmark<0.10.0,>=0.9.0
Downloading commonmark-0.9.1-py2.py3-none-any.whl (51 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 51.1/51.1 KB 4.1 MB/s eta 0:00:00
Requirement already satisfied: pygments<3.0.0,>=2.6.0 in /usr/lib/python3/dist-packages (from rich<11.0.0,>=10.4.0->pwncat-cs) (2.11.2)
Requirement already satisfied: colorama<0.5.0,>=0.4.0 in /usr/lib/python3/dist-packages (from rich<11.0.0,>=10.4.0->pwncat-cs) (0.4.4)
Collecting BTrees>=4.0.0dev
Downloading BTrees-5.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.7/3.7 MB 4.4 MB/s eta 0:00:00
Collecting ZEO>=4.0.0dev
Downloading ZEO-6.0.0-py3-none-any.whl (247 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.2/247.2 KB 3.4 MB/s eta 0:00:00
Collecting ZODB>=4.0.0dev
Downloading ZODB-5.8.1-py2.py3-none-any.whl (422 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 422.3/422.3 KB 3.9 MB/s eta 0:00:00
Collecting persistent>=4.0.0dev
Downloading persistent-5.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (231 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 231.4/231.4 KB 3.8 MB/s eta 0:00:00
Collecting transaction
Downloading transaction-4.0-py3-none-any.whl (46 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.6/46.6 KB 2.7 MB/s eta 0:00:00
Collecting ZConfig
Downloading ZConfig-4.0-py3-none-any.whl (131 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 131.5/131.5 KB 3.3 MB/s eta 0:00:00
Requirement already satisfied: zope.interface>=5.0.0 in ./.local/lib/python3.10/site-packages (from BTrees>=4.0.0dev->ZODB3<4.0.0,>=3.11.0->pwncat-cs) (6.1)
Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi>=1.4.1->PyNaCl<2.0.0,>=1.4.0->pwncat-cs) (2.21)
Collecting zdaemon
Downloading zdaemon-5.0-py3-none-any.whl (56 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.0/56.0 KB 4.3 MB/s eta 0:00:00
Collecting zc.lockfile
Downloading zc.lockfile-3.0.post1-py3-none-any.whl (9.8 kB)
Collecting zodbpickle>=1.0.1
Downloading zodbpickle-3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (283 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 283.7/283.7 KB 3.7 MB/s eta 0:00:00
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from ZODB>=4.0.0dev->ZODB3<4.0.0,>=3.11.0->pwncat-cs) (1.16.0)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from zodbpickle>=1.0.1->ZODB>=4.0.0dev->ZODB3<4.0.0,>=3.11.0->pwncat-cs) (59.6.0)
Building wheels for collected packages: ZODB3
Building wheel for ZODB3 (setup.py) ... done
Created wheel for ZODB3: filename=ZODB3-3.11.0-py3-none-any.whl size=1829 sha256=6955f5d364661f4a563e51d5e260d49063eb4d08f7143e930dea98c3e20d216c
Stored in directory: /home/olej/.cache/pip/wheels/2f/e2/54/02b429a8f1c070530f7465ac75c0b39dc89319d311f5db3493
Successfully built ZODB3
Installing collected packages: commonmark, zodbpickle, ZConfig, zc.lockfile, rich, python-rapidjson, packaging, bcrypt, zdaemon, transaction, persistent, paramiko-ng, BTrees, ZODB, ZEO, zodburi, ZODB3, pwncat-cs
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
poetry 1.1.12 requires keyring<22.0.0,>=21.2.0; python_version >= "3.6" and python_version < "4.0", but you have keyring 23.5.0 which is incompatible.
Successfully installed BTrees-5.2 ZConfig-4.0 ZEO-6.0.0 ZODB-5.8.1 ZODB3-3.11.0 bcrypt-4.1.2 commonmark-0.9.1 packaging-20.9 paramiko-ng-2.8.10 persistent-5.2 pwncat-cs-0.5.4 python-rapidjson-1.16 rich-10.16.2 transaction-4.0 zc.lockfile-3.0.post1 zdaemon-5.0 zodbpickle-3.2 zodburi-2.6.0
Устанавливается он локально, в пользовательский каталог:
Код: Выделить всё
olej@R420:~$ which pwncat-cs
/home/olej/.local/bin/pwncat-cs
Код: Выделить всё
olej@R420:~$ ls -o `which pwncat-cs`
-rwxrwxr-x 1 olej 214 мар 12 11:35 /home/olej/.local/bin/pwncat-cs
Код: Выделить всё
olej@R420:~$ pwncat-cs --help
usage: pwncat-cs [-h] [--version] [--download-plugins] [--config CONFIG] [--ssl] [--ssl-cert SSL_CERT] [--ssl-key SSL_KEY]
[--identity IDENTITY] [--listen] [--platform PLATFORM] [--port PORT] [--list] [--verbose]
[[protocol://][user[:password]@][host][:port]] [port]
Start interactive pwncat session and optionally connect to existing victim via a known platform and channel type. This entrypoint can
also be used to list known implants on previous targets.
positional arguments:
[protocol://][user[:password]@][host][:port]
Connection string describing victim
port Alternative port number to support netcat-style syntax
options:
-h, --help show this help message and exit
--version, -v Show version number and exit
--download-plugins Pre-download all Windows builtin plugins and exit immediately
--config CONFIG, -c CONFIG
Custom configuration file (default: ./pwncatrc)
--ssl Connect or listen with SSL
--ssl-cert SSL_CERT Certificate for SSL-encrypted listeners (PEM)
--ssl-key SSL_KEY Key for SSL-encrypted listeners (PEM)
--identity IDENTITY, -i IDENTITY
Private key for SSH authentication
--listen, -l Enable the `bind` protocol (supports netcat-style syntax)
--platform PLATFORM, -m PLATFORM
Name of the platform to use (default: linux)
--port PORT, -p PORT Alternative way to specify port to support netcat-style syntax
--list List installed implants with remote connection capability
--verbose, -V Enable verbose output for the remote commands executed by `pwncat`