Online Book Reader

Home Category

Linux Firewalls - Michael Rash [125]

By Root 474 0
psad.

Figure 11-1. Metasploit update through fwsnort and psad

As you can see in the figure, the client uses the Metasploit update feature, but before the updates are returned by the Metasploit SSL server, a valid SSL session must be instantiated. Therefore, during the SSL handshake, the Metasploit server returns its SSL certificate to the client.

The Metasploit update process differs depending on the version of the Metasploit framework. Beginning with the 3.0 release, Metasploit is written in Ruby and uses the Subversion source control system[67] to update not only the exploit database but the source code files as well. Because Subversion can communicate over SSL to a remote repository, Metasploit does not have to build this capability into its code. In contrast, the Metasploit 2.x series performs the update with the Perl script msfupdate executed from the command line.

Metasploit 3.0 Updates

To download and update the Metasploit 3.0 framework, a user could execute the commands below. (Some output has been removed for the sake of brevity, and we assume that the Subversion client command svn is installed.) Because we want to see how the Metasploit update process communicates with the update server, we take a packet trace on the iptablesfw system with tcpdump and then switch over to the int_scanner system to perform the update. (The -s 0 command-line argument to tcpdump ensures that the full length of each packet is recorded.)

[iptablesfw]# tcpdump -i eth1 -s 0 -l -nn port 443 -w metasploit_update.pcap

[int_scanner]$ http://framework-mirrors.metasploit.com/msf/downloader/framework-

3.0.tar.gz

[int_scanner]$ tar xfz framework-3.0.tar.gz

[int_scanner]$ cd framework-3.0

[int_scanner]$ svn update

❶ Error validating server certificate for 'https://metasploit.com:443':

- The certificate is not issued by a trusted authority. Use the fingerprint

to validate the certificate manually!

Certificate information:

- Hostname: metasploit.com

- Valid: from Tue, 31 Jul 2007 15:39:57 GMT until Wed, 30 Jul 2008 15:39:57 GMT

❷ - Issuer: Development, The Metasploit Project, San Antonio, Texas, US

- Fingerprint: 05:aa:fd:bb:ea:cb:5d:bb:00:69:6b:d9:5e:35:cf:75:83:3e:fc:ff

(R)eject, accept (t)emporarily or accept (p)ermanently? t

U external/ruby-lorcon/extconf.rb

Updated to revision 4592

At ❶ above, you see that Metasploit uses a self-signed SSL certificate, and at ❷ you see the issuer and fingerprint information for that certificate, which we accept temporarily by pressing t. At this point, our local exploit database and all associated source code files are synchronized with the latest versions available via the Metasploit Subversion repository, and we have the metasploit_update.pcap file that contains a packet capture of the entire update process. (You can download this file from http://www.cipherdyne.org/linuxfirewalls.)

Metasploit 2.6 Updates

Here are the commands you would use to update the Metasploit 2.6 framework with the msfupdate script. Because this update process also takes place over SSL, we don't need to collect another packet trace—we simply need to see how the SSL certificate is transferred over the wire. The packet trace taken in Metasploit 3.0 Updates on page 205 will suffice.

[int_scanner]$ wget http://www.metasploit.com/tools/framework-2.6.tar.gz

[int_scanner]$ tar xfz framework-2.6.tar.gz

[int_scanner]$ cd framework-2.6

[int_scanner]$ ./msfupdate -u

+ -- --=[ msfupdate v2.6 [revision 1.45]

[*] Calculating local file checksums. Please wait...

Update: ./data/meterpreter/ext_server_sam.dll

Update: ./data/msfpayload/template.exe

Update: ./exploits/badblue_ext_overflow.pm

Update: ./exploits/bomberclone_overflow_win32.pm

Continue? (yes or no) > yes

[*] Starting online update of 34 file(s)...

[0001/0034 - 0x012000 bytes] ./data/meterpreter/ext_server_sam.dll

[0002/0034 - 0x002e00 bytes] ./data/msfpayload/template.exe

[0003/0034 - 0x000c74 bytes] ./exploits/badblue_ext_overflow.pm

[0004/0034 - 0x000c72 bytes] ./exploits/bomberclone_overflow_win32.pm

[*] Regenerating local file database

Return Main Page Previous Page Next Page

®Online Book Reader