• XSS.stack #1 – первый литературный журнал от юзеров форума

P.A.S. Fork

tabac

CPU register
Пользователь
Регистрация
30.09.2018
Сообщения
1 610
Решения
1
Реакции
3 332
В процессе реализации кое какого концепта и наличия свободного времени, появилась мысль немного поговнокодить доработать один из гуёвых олдскульных веб-шеллов.

Цель, решение проблем с детектами различными WAF/IDS, как реквестов, так и респонсов. В большинстве случаев, такое обнаружение влечёт за собой ответные меры от атакуемой стороны, что при пентестах и редтиминге не всегда позволительно и допустимо.

WSO2 морально устарел и требует значительных доработок. b374k какой-то ненашенский и, как мне показалось, с большим оверхедом по функционалу. А вот нашумевший в своё время P.A.S., по своей задумке и устройству, очень даже подошёл. Хотя автор и прекратил поддержку своего продукта, но выпускать модификацию с дальнейшим порядковым номером, я не решился (не по Сеньке шапка). Поэтому, выражаю глубочайшее уважение и надеюсь, что он когда-нибудь продолжит свою замечательную работу.

Форкалась версия 4.1.1b, исходники были взяты из репозитория , за что ему спасибо :)

General
  • Works on PHP >= 4.1.0
  • Doesn't use PHP sessions or store any data on a server
  • Uses asynchronous requests like a AJAX
  • Can use POST or GET request method
  • Can obfuscate requests
  • Can work in custom environment (aka SUID mode)
  • Supports 22 different charsets
  • Encrypts the source code with your key (password) at download
  • Resulting file doesn't contain encryption key (password) in any form
  • Has stealth mode
  • Working with different tasks without reload page and losing data
  • Can be switched from fixed to flexible view
  • Keyboard-only compatibility
  • Has message log
  • Shows server time
File Manager
  • Can upload several files at once
  • Can create file, directory, symbolic and hard link
  • Can change files properties (path, modified date, permission, owner, group)
  • Can download files
  • Can delete files
  • Has files buffer:
    • mark, unmark, show marked files;
    • copy, move files from buffer to the current dir;
    • download files from buffer;
    • clear buffer;
  • Can search files:
    • in several paths;
    • with limited depth;
    • by name with wildcard and case-sensitive options;
    • by type (file, directory);
    • by mode (readable, writable, full access);
    • with SUID attribute;
    • by owner IDs with definition of intervals;
    • by group IDs with definition of intervals;
    • by created date with definition of intervals;
    • by modified date with definition of intervals;
    • by size with definition of intervals;
    • by specified text with regex and case-sensitive options;
  • Can save file with specified end of line
  • Fast change properties, download and delete specified file
  • Has breadcrumbs
  • Click on extension cell to copy file name
  • Press ESC to close current dialog
  • Press Alt+T to switch between opened dialogs
SQL Client
  • DB support:
    • MySQL (mysql, mysqli, PDO)
    • MSSQL (mssql, sqlsrv, PDO, PDO SQLSRV, PDO DBLIB, PDO ODBC)
    • PgSQL (pg, PDO)
  • Tree view of database schema
  • Shows column data types
  • Can show only selected columns data
  • Can show tables row count
  • Can reload single base/scheme/table schema
  • Can dump multiple tables/schemes/bases
  • Can dump only selected schemes/tables/columns
  • Can dump to SQL or CSV format
  • Has pagination for some database types
PHP Console
  • Isolates the results HTML code from the main page
  • Can be switched from vertical to horizontal composition
  • Press Ctrl+Enter to evaluate code
Terminal
  • Can execute commands via specified command processor
  • Can execute commands via specified function
  • Type ? to show help
  • Has command history:
    • type history [N] to show command history, where optional parameter N is number of last commands;
    • press Up & Down keys to navigate from command history;
    • type ![N]to execute command, where N is:
      • ! to execute the last command;
      • N>0 to execute command #N from the command histroy;
      • N<0 to execute command #N from the end of the previous command;
  • Can create system report (type report ? to more info)
  • Can run Socks5 server:
    • throught Perl (type socks5.perl to more info);
    • throught Python (type socks5.python to more info);
  • Can bind port:
    • throught Perl (type bindport.perl to more info);
    • throught Python (type bindport.python to more info);
  • Can back connect:
    • throught Perl (type backconnect.perl to more info);
    • throught Python (type backconnect.python to more info);
  • Type cls or clear or press CTRL+L to clear output
Information
  • Shows main server information
  • Shows PHP configuration without call phpinfo

В P.A.S. Fork v. 1.0 добавлено/изменено:
  • Работа GET запросами (параметры в куках)
  • Переход в POST с возможностью отказаться
  • Обфускация ключей и значений запроса
  • Обфускация загружаемых файлов
  • Обфускация ответа от сервера
  • Авторизация по паролю
  • Авторизация по заголовку
  • Фикс дампа MySQL в режиме PDO
  • Переименованы "конструкторы в стиле PHP 4"
  • Работа в PHP 5 >= 5.1.2, PHP 7, PHP 8 (*)
  • Выпилен pcntl_exec
  • opcache_invalidate после сохранения файла
  • Тёмный цветовой режим
  • Опция для отображения ctime
24yso3q.png

dfg880h.png
jP0alEx.png
  • Репозиторий на GitHub
  • Перед использованием, будет не лишним вычистить все HttpOnly куки для домена, если таковые имеются.
  • Этот инструмент предназначен только для образовательных и тестовых целей и не предназначен для применения на практике, если у вас нет разрешённого доступа к системе.
  • This tool is for educational and testing purposes only and is not intended to be put into practise unless you have authorised access to the system.

автор сорца и текста crlf
 

Вложения

  • pas_fork.zip
    55 КБ · Просмотры: 26
В процессе реализации кое какого концепта и наличия свободного времени, появилась мысль немного поговнокодить доработать один из гуёвых олдскульных веб-шеллов.

Цель, решение проблем с детектами различными WAF/IDS, как реквестов, так и респонсов. В большинстве случаев, такое обнаружение влечёт за собой ответные меры от атакуемой стороны, что при пентестах и редтиминге не всегда позволительно и допустимо.

WSO2 морально устарел и требует значительных доработок. b374k какой-то ненашенский и, как мне показалось, с большим оверхедом по функционалу. А вот нашумевший в своё время P.A.S., по своей задумке и устройству, очень даже подошёл. Форкалась версия 4.1.1b, исходники были взяты из репозитория @winstrool.

Что умеет оригинал?
General
  • Works on PHP >= 4.1.0
  • Doesn't use PHP sessions or store any data on a server
  • Uses asynchronous requests like a AJAX
  • Can use POST or GET request method
  • Can obfuscate requests
  • Can work in custom environment (aka SUID mode)
  • Supports 22 different charsets
  • Encrypts the source code with your key (password) at download
  • Resulting file doesn't contain encryption key (password) in any form
  • Has stealth mode
  • Working with different tasks without reload page and losing data
  • Can be switched from fixed to flexible view
  • Keyboard-only compatibility
  • Has message log
  • Shows server time
File Manager
  • Can upload several files at once
  • Can create file, directory, symbolic and hard link
  • Can change files properties (path, modified date, permission, owner, group)
  • Can download files
  • Can delete files
  • Has files buffer:
    • mark, unmark, show marked files;
    • copy, move files from buffer to the current dir;
    • download files from buffer;
    • clear buffer;
  • Can search files:
    • in several paths;
    • with limited depth;
    • by name with wildcard and case-sensitive options;
    • by type (file, directory);
    • by mode (readable, writable, full access);
    • with SUID attribute;
    • by owner IDs with definition of intervals;
    • by group IDs with definition of intervals;
    • by created date with definition of intervals;
    • by modified date with definition of intervals;
    • by size with definition of intervals;
    • by specified text with regex and case-sensitive options;
  • Can save file with specified end of line
  • Fast change properties, download and delete specified file
  • Has breadcrumbs
  • Click on extension cell to copy file name
  • Press ESC to close current dialog
  • Press Alt+T to switch between opened dialogs
SQL Client
  • DB support:
    • MySQL (mysql, mysqli, PDO)
    • MSSQL (mssql, sqlsrv, PDO, PDO SQLSRV, PDO DBLIB, PDO ODBC)
    • PgSQL (pg, PDO)
  • Tree view of database schema
  • Shows column data types
  • Can show only selected columns data
  • Can show tables row count
  • Can reload single base/scheme/table schema
  • Can dump multiple tables/schemes/bases
  • Can dump only selected schemes/tables/columns
  • Can dump to SQL or CSV format
  • Has pagination for some database types
PHP Console
  • Isolates the results HTML code from the main page
  • Can be switched from vertical to horizontal composition
  • Press Ctrl+Enter to evaluate code
Terminal
  • Can execute commands via specified command processor
  • Can execute commands via specified function
  • Type ? to show help
  • Has command history:
    • type history [N] to show command history, where optional parameter N is number of last commands;
    • press Up & Down keys to navigate from command history;
    • type ![N]to execute command, where N is:
      • ! to execute the last command;
      • N>0 to execute command #N from the command histroy;
      • N<0 to execute command #N from the end of the previous command;
  • Can create system report (type report ? to more info)
  • Can run Socks5 server:
    • throught Perl (type socks5.perl to more info);
    • throught Python (type socks5.python to more info);
  • Can bind port:
    • throught Perl (type bindport.perl to more info);
    • throught Python (type bindport.python to more info);
  • Can back connect:
    • throught Perl (type backconnect.perl to more info);
    • throught Python (type backconnect.python to more info);
  • Type cls or clear or press CTRL+L to clear output
Information
  • Shows main server information
  • Shows PHP configuration without call phpinfo

В P.A.S. Fork v. 1.0 добавлено/изменено:
  • Работа GET запросами (параметры в куках)
  • Переход в POST с возможностью отказаться
  • Обфускация ключей и значений запроса
  • Обфускация загружаемых файлов
  • Обфускация ответа от сервера
  • Авторизация по паролю
  • Авторизация по заголовку
  • Фикс дампа MySQL в режиме PDO
  • Переименованы "конструкторы в стиле PHP 4"
  • Выпилен pcntl_exec
  • opcache_invalidate после сохранения файла
  • Тёмный цветовой режим
  • Опция для отображения ctime
  • Опция для инвертирования вывода в терминале
  • Выпилены системные вызовы при старте скрипта
  • Фикс краша JS в файловом менеджере (на редких окружениях)
  • Поддерживаемые версии PHP: 5 >= 5.1.2, PHP 7, PHP 8

24yso3q.png

dfg880h.png

Скрипт не работает и продолжает возвращать один и тот же ответ.
  • Возможно, на сервере включено кеширование GET запросов. Решение - отключить передачу параметров через куки и использовать POST запросы ($GLOBALS['COOKIE'] = false;).

Повторяющиеся случайно запросы пароля.
  • Скорее всего, ваш IP адрес меняется с той же периодичностью. Если это так, нужно изменить $GLOBALS['REMOTE_ADDR'] на false.

Большие файлы не скачиваются.
  • Операция заворачивания файлов происходит на лету, поэтому требуется много оперативной памяти. Решение - отключить обфускацию, установив флажок "Skip response encoding" в графическом интерфейсе.

Как установить авторизацию по заголовку?
  • $GLOBALS['SECHEAD'] = 'SECRET_9CA2100C44E50D81BB7E3EED84AF43F4'; и добавляйте его для каждого запроса в браузере (Secret-9ca2100c44e50d81bb7e3eed84af43f4: foobar). Без запроса пароля - $GLOBALS['PASSHASH'] = '';

Переключение цветовой темы раздражает.
  • $GLOBALS['DARK'] = true;

Не работает при принудительной установке заголовка "X-Frame-Options: DENY".
  • Решение находится в процессе реализации.
  • Репозиторий на GitHub
  • Перед использованием, будет не лишним вычистить все HttpOnly куки для домена, если таковые имеются.

Автор форка и инициативы crlf
 

Вложения

  • pas_fork (1).zip
    71.2 КБ · Просмотры: 32
Отличный удобный веб-шелл! Пользуюсь на протяжении лет 10, наверное. Еще когда им занимался другой автор. Форк отличный и дает то, что от него требуется.

У кого-нибудь есть код для работы с этим шеллом через python или еще что-то? Совсем заржавел, не могу понять как данные кодировать для отправки на него.
 
Небольшие изменения в версии 1.3:
  • Восстановление положения окна при уменьшении
  • Интервал для перезагрузки файла (правый клик)
  • Загружать дефолтный favicon.ico, если он существует
  • Мелкие исправления ошибок и улучшения
 


Напишите ответ...
  • Вставить:
Прикрепить файлы
Верх