Установка payload kali linux

Metasploit Payloads или заметки о MSFvenom

Представляем Вашему вниманию полезные заметки о создании полезной нагрузки для осуществления коннекта к “жертве”

Часто одна из наиболее полезных (и недооцененных для начинающих) способностей Metasploit – это модуль msfpayload.

С помощью этого модуля можно создать несколько полезных нагрузок, что поможет Вам создать бэкконнект практически в любой ситуации. Для каждой из приведенных ниже примеров полезных нагрузок Вы можете зайти в msfconsole и выбрать exploit/multi/handler.

Запустите «set payload» для соответствующей используемой полезной нагрузки и настройте все необходимые параметры set (LHOST, LPORT и т. д.). Посмотреть параметры можно с помощью команды

Для приведенных ниже примеров это довольно очевидно, но LHOST должен быть заполнен вашим IP-адресом (IP-адрес локальной сети при атаке в сети, IP-адрес глобальной сети при атаке через Интернет (внешний IP-адрес можно увидеть перейдя по ссылке)), а LPORT должен быть Вашим открытым локальным портом, к которому будет осуществляться подключение.

Посмотреть список всех полезных нагрузок

BINARIES

Linux

Windows

Mac

WEB PAYLOADS

PHP

ASP

JSP

WAR

SCRIPTING PAYLOADS

Python

Bash

Perl

SHELLCODE

Linux Based Shellcode

Windows Based Shellcode

Mac Based Shellcode

Пример

Все данные пэйлоады должны выполняться в следующем порядке

Надеюсь было полезно, так же смотрите нашу статью о поднятии Reverce-шела.

Дисклеймер: Данная статья написана только в образовательных целях и автор не несёт ответственности за ваши действия. Ни в коем случае не призываем читателей на совершение противозаконных действий.

Источник

Create Metasploit Payload in Kali Linux MSFvenom Payload Creator

MSFvenom Payload Creator (MSFPC v1.4.5)

MSFvenom Payload Creator (MSFPC) is a wrapper to generate multiple types of payloads, based on the user’s choice. The idea is to be as simple as possible (only requiring one input) to produce their payload. In this tutorial, you will learn how to create MSFvenom payloads using MSF Payload Creator in Kali Linux. If you don’t already have Kali Linux you can download it from the link below.

Using MSFPC (MSFvenom Payload Creator) we can easily create payloads for multiple operating systems. MSFVenom Payload Creator can create the following types of payloads. APK, ASP, ASPX, Bash [.sh], Java [.jsp], Linux [.elf], OSX [.macho], Perl [.pl], PHP, Powershell [.ps1], Python [.py], Tomcat [.war], Windows [.exe // .exe // .dll].

MSFvenom Payload Creator comes pre-installed in Kali Linux you can find MSFPC under Show Applications > 13-SETools > msf payload creator

Image shows Applications Menu in Kali Linux.

See the usage below.

Example:

  • Can’t remember your IP for an interface? Don’t sweat it, just use the interface name: eth0
  • Don’t know what your external IP is? MSFPC will discover it: wan .
  • Want to generate one of each payload? No issue! Try: loop .
  • Want to mass create payloads? Everything? Or to filter your select? ..Either way, it’s not a problem. Try: batch (for everything), batch msf (for every Meterpreter option), batch staged (for every staged payload), or batch cmd stageless (for every stageless command prompt)!

Now you should be familiar with some options used by MSFVenom Payload Creator. We will now go through some of the various options.

First, we will use MSFVenom Payload Creator to create a reverse TCP Metasploit payload for Windows Operating System.

Note: This will NOT try to bypass any anti-virus solutions at any stage.

Open up terminal in Kali Linux. In terminal enter command below. (Replace IP address with your local IP address)

The default port is 443 if you require another port add port after IP address in command.

Читайте также:  Вы выбрали ручную установку windows

Replace IP address with your local IP address you can find the local IP address your network interface is running on by opening up a new terminal and entering the command below.

You can find your local IP address under inet. My local IP address was 192.168.0.11 so the command I used looked like this.

Can’t remember your IP for a interface? Don’t sweat it, just use the interface name: eth0

Terminal Output:

Image shows Metasploit Payload Creator running in the Kali Linux terminal.

Payloads created by msf payload creator are stored in /root/.

The image shows the output location of Metasploit payload generated by Metasploit Payload Creator.

When Msfvenom Payload Creator is ran a resource file is also saved to the same output location as our Metasploit payload. A resource file is basically just a batch script for Metasploit using resource files we can automate various tasks in Metasploit.

To start a Metasploit listener for the payload we just created we can use the Metasploit resource file that was output along with our Metasploit payload.

Command Example:

Image shows Metasploit resource file that was output along with our Metasploit payload running in Kali Linux terminal. Metasploit resource file starts a Metasploit listener.

Once the victim machine tries to open .exe payload a reverse Metasploit connection will be established between the attacker and victim.

Now that you know how to create Windows payload let’s move on with this tutorial.

In the next part of this tutorial, you will learn how to create all possible Meterpreter payloads, using WAN IP.

For the outside world to be able to establish a connection back to our payload we must use our WAN IP address. If we use our Local IP Address only devices on the same network will be able to establish a reverse connection with our payload.

To create All possible Meterpreter payloads, using WAN IP open up a terminal and use command.

(Batch Mode will create a payload with as many different combinations as possible. Make sure that you have opened port that you are using for WAN payload in your network/router configuration or you won’t be able to establish a reverse connection with the victim device only over a Local connection.)

WAN stands for Wide-area network in computer networking a wide area network (WAN) is a network that exists over a large geographical area TCP/IP is often the protocol that is used for a wide-area network.

If you want to use MSFPC with an alternative Linux Operating System you can install MSFPC from source using commands below.

Developer Credits: g0tmi1k – https://github.com/g0tmi1k/

You can check out g0tmi1k’s blog at https://blog.g0tmi1k.com/

If you have found a spelling error, please, notify us by selecting that text and pressing Ctrl+Enter.

Источник

Установка payload kali linux

MSFvenom Payload Creator (MSFPC)

A quick way to generate various «basic» Meterpreter payloads via msfvenom (part of the Metasploit framework).

MSFvenom Payload Creator (MSFPC) is a wrapper to generate multiple types of payloads, based on users choice. The idea is to be as simple as possible (only requiring one input) to produce their payload.

Fully automating msfvenom & Metasploit is the end goal (well as to be be able to automate MSFPC itself). The rest is to make the user’s life as easy as possible (e.g. IP selection menu, msfconsole resource file/commands, batch payload production and able to enter any argument in any order (in various formats/patterns)).

The only necessary input from the user should be defining the payload they want by either the platform (e.g. windows ), or the file extension they wish the payload to have (e.g. exe ).

  • Can’t remember your IP for a interface? Don’t sweat it, just use the interface name: eth0 .
  • Don’t know what your external IP is? MSFPC will discover it: wan .
  • Want to generate one of each payload? No issue! Try: loop .
  • Want to mass create payloads? Everything? Or to filter your select? ..Either way, its not a problem. Try: batch (for everything), batch msf (for every Meterpreter option), batch staged (for every staged payload), or batch cmd stageless (for every stageless command prompt)!
Читайте также:  После смены материнской платы слетела активация windows

Note: This will NOT try to bypass any anti-virus solutions at any stage.

  • Designed for Kali Linux v2.x/Rolling & Metasploit v4.11+.
  • Kali v1.x should work.
  • OSX 10.11+ should work.
  • Weakerth4n 6+ should work.
  • . nothing else has been tested.

MSFPC is already packaged in Kali Rolling, so all you have to-do is:

) ( ) ( ) ( ) ( ) ( ) ( ) Example: msfpc.sh windows 192.168.1.10 # Windows & manual IP. msfpc.sh elf bind eth0 4444 # Linux, eth0’s IP & manual port. msfpc.sh stageless cmd py https # Python, stageless command prompt. msfpc.sh verbose loop eth1 # A payload for every type, using eth1’s IP. msfpc.sh msf batch wan # All possible Meterpreter payloads, using WAN IP. msfpc.sh help verbose # Help screen, with even more information. : + APK + ASP + ASPX + Bash [.sh] + Java [.jsp] + Linux [.elf] + OSX [.macho] + Perl [.pl] + PHP + Powershell [.ps1] + Python [.py] + Tomcat [.war] + Windows [.exe // .dll] Rather than putting , you can do a interface and MSFPC will detect that IP address. Missing will default to the IP menu. Missing

will default to 443. is a standard/native command prompt/terminal to interactive with. is a custom cross platform shell, gaining the full power of Metasploit. Missing will default to where possible. Note: Metasploit doesn’t (yet!) support for every format. payloads are generally smaller than and easier to bypass EMET. Limit Metasploit post modules/scripts support. payloads are generally much larger than , as it comes with more features. opens a port on the target side, and the attacker connects to them. Commonly blocked with ingress firewalls rules on the target. makes the target connect back to the attacker. The attacker needs an open port. Blocked with engress firewalls rules on the target. Missing will default to . allows for the attacker to connect whenever they wish. needs to the target to be repeatedly connecting back to permanent maintain access. splits the payload into parts, making it smaller but dependent on Metasploit. is the complete standalone payload. More ‘stable’ than . Missing will default to where possible. Note: Metasploit doesn’t (yet!) support for every format. are ‘better’ in low-bandwidth/high-latency environments. are seen as ‘stealthier’ when bypassing Anti-Virus protections. may work ‘better’ with IDS/IPS. More information: https://community.rapid7.com/community/metasploit/blog/2015/03/25/stageless-meterpreter-payloads https://www.offensive-security.com/metasploit-unleashed/payload-types/ https://www.offensive-security.com/metasploit-unleashed/payloads/ is the standard method to connecting back. This is the most compatible with TYPES as its RAW. Can be easily detected on IDSs. makes the communication appear to be HTTP traffic (unencrypted). Helpful for packet inspection, which limit port access on protocol — e.g. TCP 80. makes the communication appear to be (encrypted) HTTP traffic using as SSL. Helpful for packet inspection, which limit port access on protocol — e.g. TCP 443. will attempt every port on the target machine, to find a way out. Useful with stick ingress/engress firewall rules. Will switch to ‘allports’ based on . Missing will default to . By altering the traffic, such as and even more , it will slow down the communication & increase the payload size. More information: https://community.rapid7.com/community/metasploit/blog/2011/06/29/meterpreter-httphttps-communication will generate as many combinations as possible: , , , & will just create one of each . will display more information. $ «>

Example #1 (Windows, Fully Automated Using Manual IP)

Example #2 (Linux Format, Fully Automated Using Manual Interface and Port)

Example #3 (Python Format, Interactive IP Menu)

Note: Removed WAN IP.

Example #4 (Loop — Generates one of everything)

Источник

Инструменты Kali Linux

Список инструментов для тестирования на проникновение и их описание

MSFvenom Payload Creator (MSFPC)

Описание MSFvenom Payload Creator (MSFPC)

Быстрый способ сгенерировать различные «базовые» полезные нагрузки Meterpreter через msfvenom (часть платформы Metasploit).

Читайте также:  Не выключается подсветка наушников после выключения компьютера windows 10

MSFvenom Payload Creator (MSFPC), создатель полезной нагрузки MSFvenom, — это обёртка для создания нескольких типов полезной нагрузки на основе выбора пользователя. Идея в том, чтобы упростить насколько возможно (требуется только один ввод) создание полезной нагрузки.

Конечной целью является полная автоматизация msfvenom и Metasploit для упрощения жизни пользователя (меню выбора IP, ресурсного файла/команд msfconsole, пакетное создание полезной нагрузки и возможность вводить любые аргументы в любом порядке (в различных форматах/шаблонах).

От пользователя требуется только ввести только желаемую платформу для полезной нагрузки, либо расширение файла (напр., exe).

  • Вместо IP интерфейса достаточно ввести его имя: eth0.
  • Вместо внешнего IP достаточно ввести wan (MSFPC самостоятельно определит внешний IP адрес).
  • Если нужно создать по одной каждой полезной нагрузке, то наберите loop.
  • Массовое создание полезных нагрузок — всё или по фильтрам: batch (для всего), batch msf (для каждой опции Meterpreter), batch staged (для каждой staged полезной нагрузки) или batch cmd stageless (для каждой stageless command prompt). Подробности о staged и stageless ниже.

Примечание: скрипт НЕ будет пытаться как-либо обойти антивирусные решения на какой-либо стадии.

Справка по MSFPC

В качестве возможен следующий ввод:

Вместо указания вы можете ввести интерфейс и MSFPC определит его IP адрес.

При пропуске по умолчанию будет сделан переход в меню IP.

Пропуск установит значение по умолчанию 443.

— это стандартная/родная команда оболочки/терминала для интерактивного взаимодействия.

пользовательский кросс-платформенный шелл для получения всей мощи Metasploit.

Пропуск , где это возможно, приведёт к дефолтному .

Помните: Metasploit (ещё) не поддерживает для формата любого .

Полезная нагрузка обычно меньше, чем и проще для обхода EMET. Ограничивается поддержкой модулей пост модулей/скриптов Metasploit.

Полезная нагрузка обычно больше чем , поскольку она поставляется с большим количеством функций.

открывает порт на стороне цели и атакующий к ней подключается. На целях часто заблокированы входящие соединения.

заставляет цель подключиться к атакующему. Атакующему нужно открыть соответствующий порт.

Пропуск установит по умолчанию .

позволяет атакующему подключиться когда он хочет. требует от цели постоянно подключаться к атакующему для поддержания постоянного доступа.

разделяет полезную нагрузку на части, делая её меньше, но зависящей от Metasploit.

— это полностью самостоятельная полезная нагрузка. Более «стабильна», чем .

Пропуск , когда это возможно, установит по умолчанию .

Помните: Metasploit (ещё) не поддерживает для формата каждого .

«лучше» в средах с низкой пропускной способностью и высокой задержкой.

считается «незаметнее» при обходе антивирусных защит. может работать «лучше» с IDS/IPS.

это стандартный метод для подключения. Он наиболее совместим с ТИПАМИ как RAW. IDS могут легко его обнаружить.

делает связь похожей на HTTP трафик (не зашифрованный). Полезно при ограничении доступа, например, протоколом TCP 80.

делает соединения похожими на (зашифрованный) с помощью SSL трафик HTTP. Полезно при контроле пакетов и ограничении доступа определёнными протоколами, например, TCP 443.

попробует каждый порт на целевой машине в поиска выхода наружу. Полезно при фильтровании входящего/исходящего трафика файерволами. Переключиться на «allports» на основе .

Пропуск установит по умолчанию .

Изменение трафика на , а тем более на , замедлит соединение и увеличит размер полезной нагрузки.

сгенерирует так много комбинаций, как это возможно: , , , &

просто создаст по одной каждого .

покажет больше информации.

Руководство по MSFPC

Страница man отсутствует.

Примеры запуска MSFPC

Полезная нагрузка для Windows и вручную указанный IP:

Полезная нагрузка для Linux, IP адрес сетевого интерфейса eth0 и вручную указанный порт:

Полезная нагрузка для Python, stageless command prompt:

Полезная нагрузка каждого типа, используя IP адрес интерфейса eth1:

Все возможные полезные нагрузки Meterpreter, используя WAN IP (внешний адрес)

Полуинтерактивное создание Windows Meterpreter bind shell на порту 5555:

Автоматическая генерация полезной нагрузки Meterpreter под Windows с обратным соединением, используя IP интерфейса eth0 в качестве параметра LHOST:

Полезная нагрузка в формате Linux, полностью автоматическое создание используя вручную указанный интерфейс и порт + подробный вывод:

Полезная нагрузка в формате Python, интерактивное меню IP:

Установка MSFPC

Установка в Kali Linux

Установка в BlackArch

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

Скриншоты MSFPC

Инструкции по MSFPC

Ссылки на инструкции будут добавлены позже.

Источник

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