Author Topic: Metasploit unleashed.... unleashed.  (Read 4369 times)

Offline trevelyn

  • Administrator
  • Elite Cactus Squad
  • Ninja Phone Loser
  • *****
  • Posts: 1687
  • 1337 13V3L: +183/-22
  • He likes cans and taking pictures in cans!
    • WeakNet Labs
Metasploit unleashed.... unleashed.
« on: May 12, 2010, 09:53:23 PM »
heh, as the cool title says, I will unleash it for you.  I have been waiting around for the PDF for far too long.

Want the Metasploit Unleashed to view locally?  On a network with no second inet route and
want to follow along with the tutorial? Use your cell phone! Naw, the screen is too small
and fiddling with the zoom in zoom out just gets annoying.

This tutorial simply does what your browser does, just in a different way.  When your
browser accesses an HTML file or website, it downloads all of the content directly to your
hard drive, in a special cache directory used by your browser.

This downloads the same content, just puts it where you can easily access it at a later date.


First of all, you need the HTML file that contains the list of URL's for each page.  Yeah,
it's a bunch of pages for some, annoying, reason. ??

Code: [Select]
mkdir msu && cd msu

# GET the index.html, this will also pull a gzip file of RSS and a robots.txt file which you may find interesting:
Code: [Select]
wget -r -l0 http://www.offensive-security.com/metasploit-unleashed/

# Get a list of URLs from the index.html file:
Code: [Select]
cat index.html | grep href | grep -v div | grep -v link | grep -v var | sed -e 's/<a href="//g' -e 's/">.*//g' > urls.txt

# Create a shell script to GET all pages in the tutorial.  This will also sequentially name them
#    So they don't get out of order on your server:
Code: [Select]
#!/usr/bin/perl -w
open (FLE, "urls.txt");
my $n = 0;
while (<FLE>) {
        $n++; chomp $_;
        my @split = split('/', $_);
        my $splot = pop(@split);
        print "wget $_ -O " . "$n" . "_" . $splot . "\n";
}
exit;

# Get Url's of ALL images:
Code: [Select]
grep '/msf/[a-zA-Z0-9-]*\.png' * | sed -e 's/^.*src="//g' -e 's/png".*/png/g' *

# Make images sh script using perl:
Code: [Select]
#!/usr/bin/perl -w
open(FLE, "images.txt");
while (<FLE>) {
        my @split = split('/', $_);
        my $splot = pop(@split);
        chomp $_;
        print "wget ";
        print $_ . " -O $splot";
}

# change all the image links to be local:
Code: [Select]
sed -i '' -e 's/http:\/\/www.offensive-security.com\/msf/images/g' *

# Now, we need the CSS to display it correctly:
Code: [Select]
mkdir css
cat index.html | grep css | sed -e 's/.*href="//g' -e 's/">$//g' | \
xargs -I trevelynrules wget http://www.offensive-security.com/metasploit-unleashed/trevelynrules

# You should now have a directory called "msu" with a bunch of html files, a css directory with 3 css
#   files, and an images directory with a ton of images in it, and clicking on any HTML file should
#   display it properly in your browser, and any good file manager should display the HTML files
#   in order.

Sorry that it's a funk, I am insanely tired right now and it's like 1:47am EST on a school night.
Happy hacking, hope you get some good shell / perl experience out of following along.

~Trevelyn.

Offline Nod

  • Quando omni flunkus moritati
  • Elite Cactus Squad
  • Ninja Phone Loser
  • *****
  • Posts: 3725
  • 1337 13V3L: +210/-138
  • 212-389-1318
    • twitter: @mrnudnik
Re: Metasploit unleashed.... unleashed.
« Reply #1 on: May 13, 2010, 07:17:05 AM »
I didn't understand any of this so that leads me to believe it must do something REALLY cool.
I HATE the bridge.
Meme Roth is a Food Nazi Cunt

Offline Godot

  • Go away, PLA!
  • PLA Corporate Drone
  • *****
  • Posts: 427
  • 1337 13V3L: +34/-7
    • Godot's Website
Re: Metasploit unleashed.... unleashed.
« Reply #2 on: May 13, 2010, 10:53:13 AM »
I didn't understand any of this so that leads me to believe it must do something REALLY cool.

It appears to download a copy of this document for local viewing.
"I bought a cactus and it died a week later... I was really depressed, I thought, 'Damn, I am less nurturing than a desert.'" -Demetri Martin

Offline trevelyn

  • Administrator
  • Elite Cactus Squad
  • Ninja Phone Loser
  • *****
  • Posts: 1687
  • 1337 13V3L: +183/-22
  • He likes cans and taking pictures in cans!
    • WeakNet Labs
Re: Metasploit unleashed.... unleashed.
« Reply #3 on: May 13, 2010, 06:38:39 PM »
There are some free classes (videos) offered by IronGeek right now on his site about metaplsoit.

http://www.irongeek.com/i.php?page=videos/metasploit-classx

:)

Offline chrstfer

  • Newb
  • *
  • Posts: 1
  • 1337 13V3L: +0/-0
Re: Metasploit unleashed.... unleashed.
« Reply #4 on: October 02, 2010, 04:07:42 PM »
Sorry for the bump, but ive got a couple questions..... im at the images thing. If OP could explain, if he still looks here from time to time, that would be amazing. Thanks.

Offline trevelyn

  • Administrator
  • Elite Cactus Squad
  • Ninja Phone Loser
  • *****
  • Posts: 1687
  • 1337 13V3L: +183/-22
  • He likes cans and taking pictures in cans!
    • WeakNet Labs
Re: Metasploit unleashed.... unleashed.
« Reply #5 on: October 04, 2010, 05:46:11 AM »
hey, it's been ages, I'm not sure if this method even works anymore ???  I heard resecntly that they are making changes , maybe soon you will be able to buy the PDF from them and won't have to use this method!