alright hello everyone and welcome to
advanced Metasploit class what we're
gonna try to do with this class is we're
going to try to cover pretty much the
foundations of the things you'd need to
know to be comfortable using Metasploit
so we're going to cover a lot of Ruby
we're going to cover a lot of be easy to
Metasploit writing tools for Metasploit
auxilary modules host modules food and
even some exploits as well so what I'm
going to be doing is it's going to be an
interactive class so for the students
that are actually here we'll be just
talking with them directly and we'll be
working with them throughout the class
we're going to start using something
called paste bin so this is the paste
bin file and what that means is this
link is the link that you'll use so you
can follow along with me and this is
going to allow you to copy and paste all
the commands that I'm doing each day the
reason that I use paste bin is because
I'm not a real death by PowerPoint kind
of guy I don't really care for death by
PowerPoint I really like to have
students working now because there's a
lot of command line Linux the reason
that I like to use the paste bin is
because a students tend to make a lot of
mistakes back then during this typing
stuff trying to take notes and all of
that so it's a little bit easier for
students to copy and paste because it
gives them the ability to take notes it
gives them the ability to ask questions
it gives them the ability to deal with
cases work for example the font on the
screen may be a little hard to read
sometimes this really tends to help the
other thing that's the beauty of the
paceman file is you're going to have the
option to download so you can download
that file and you can open it up in
notepad and you can make changes you can
save notes it gives you a lot of
flexibility now you're going to need to
download some virtual machines for the
class
now I'm helping one of the students
right now so you're gonna see me walk in
the student through downloading game
we're player get in game a player going
you're gonna see me walk the student
through wow VMware is getting set up
downloading and installing Ruby the
reason that I like to do Ruby for the
first day is Metasploit is based on a
scripting language called Ruby so we're
going to do a quick introduction bill to
the language itself because if you're
comfortable with the language and I
don't mean comfortable in the sense of
your programmer but comfortable in the
sense of you can drive around it you
know what stuff looks like
so you're just familiar with it that's
we're really going to help you with just
being able to understand what's going on
when you have to open up best boy look
inside it and start changing things
around so let's get started
the first place that we want to go is
VMware comm I want to go to VMware calm
slash products slash player we want to
download and it's all a free version of
the dealer player and I think it's now
called player pro oh looks like it's
been renamed workstation pro so this is
what we want to get going with first so
it should have a sex
where it says try for free and this
would be what we'd want you to do so
let's get this downloaded now let's get
this installed now I'm hoping that
you're also downloading this virtual
machine ya know this virtual machine is
probably about 5 gigabytes so it's gonna
take a while so what we're gonna do is
we're gonna move on
wow this virtual machine is downloading
so while this virtual machine is
downloading we'll just let it download
same with same with the other virtual
machine let's just let them download in
the short term you're going to need this
one on line 7 and this one on line 19
but at a minimum for Game one you're
gonna need this one now I'm going to try
and run the class so that we can work
for one without the magician okay all
right so you're gonna hear me at times
is asking students questions now when I
ask the students questions
you're not gonna seem the student has
asked me a question but this is what it
looks like for me so you'll see that
maybe a student has asked me a question
so you'll see it once a student is
asking you a question I'm answering it
so it'll kind of look like I don't know
where I'll be like yeah jimm sure the
answer is blah blah blah so please be
understanding then I'm just dealing with
students that are in class asking
questions ok alright so Alexander just
checking in on your buddy are you
downloading VMware Workstation
yes I am excellent okay so let's get
that downloaded and let's get VMware
Workstation installed all right so Joe
you said at the minimum we need to
download two VM for the part yeah but
let's get started without killing your
network connection
all right well let's just start with the
one that's in line number seven the five
big one
alright okay and then how we do it would
be a more player did that get installed
my internet is kind of beans for today
that's like okay would you chill out of
69 max almost yep Joe this is a rolling
I can you hear me oh yeah there you go
rolling you doing buddy how you doing
there buddy how are you on retro I'd
love to chat about this class great
question for you on my previous class
that I have with you uh I downloaded
those VMware's Windows seven in the
bundle I do have a copy of those can I
use that or how to use a fresh copy of
ah I don't know friend you can use the
same ones no problem Oh excellent okay
so I I would say miss don't worry
because I'm trying to download those
things make in a while yeah no no no I'm
her friend you'll be ok excellent ok
I'll launch those and uh I think you
know I'm ready for you directions
appreciate it okay so we're gonna be
kind of moving a little slow cuz we got
to get Alexander caught up well of
course in the next half hour so we get
him go in and we'll be we'll be cooking
with Crisco excellent yeah we're gonna
do good guys and then you know the class
will be pretty free-flowing so we'll
just do kind of
you know I got some base things that I
like to cover but no we can go as fast
or as slow as you like then we can kind
of cover whenever you like if you if
we're on a certain subject and you want
to go a little faster or go a little
deeper into that subject feel free so
you know you're taking a class with me
before you kind of know the way I like
to work and I think I think it'll be
beneficial to you having taken the
classes you can be like hey Joe you know
we covered that last time the other
students are okay I'd like to spend more
time on subject X you know excellent yet
no he's and you're very thorough too and
so I like that I like very much
yes so looking forward to be sharing it
buddy where you at now New York oh my
god I'm jealous
finally yeah it's a little sunny today
man but it's finally warm enough
Alexander where are you in the way you
asked you out of country well yeah buddy
New York New York I was really worried
about a bunch of West Coast people being
in the class and yeah we got out from
the west coast from signed up and what I
think is happening is like it was like 6
o'clock in the morning for those guys
yeah so we wanted to actually start
class at 9:00 no 9 o'clock Eastern Time
but I made the mistake and RD sent out
the invite for 8:30 so hard it was like
then my hair the operations manager she
was like Joe why don't you start class
at 9:00 and give the students kind of
time to trickle in and make sure it's
recorded so I'm doing that that's very
nice
all right okay Alexander you have the
VMware installed yeah
yeah that's almost yep yep all right so
if you have be aware install what I'm
gonna try to have you do is let's go or
let's go put in a movie so we're going
to actually have you do the labs in
Windows or until VMware it's all
finished being set up
okay so what I'm doing button is I'm
giving you a link or Ruby and once you
grab that 64-bit version room
alright looks like it was a pretty
straight shot here this is the one where
I grab I grab the 64-bit version all
right
and Roland is it rollin rollin rollin
rollin yeah I am okay rolling okay
and voila what we can do is if we're in
Linux you literally can just from a
command prompt type wounds okay
and right now on I went to support an
app the Linux Esper knock window this up
I Windows 7 is up Windows machine
waiting for Linux whatever look good
great I'm sorry I made a mistake you
should have typewritten you should type
IRB
no I haven't have anything yet so that's
good
yeah I have a stupid attacking so you
still Python like a Python you just find
icon just like this
then I'll go clean this Ruby installer
so I couldn't be doing the same thing
that Alexander's doing ok so I'm going
to do a quick little thing right here do
you see that I'm choosing these two
options
Alexander yeah okay so we want to add
ribbon to the path and we want to
associate our B files in Windows
this installation a ruby
okay just check him in on you guys
alright they're getting ready to ask you
got good time in Alexander yep okay so
let's just try a couple of things and
then we'll take a quick break so in
Windows if you've got Ruby installed you
can just go to one of these command
prompt or Explorer windows and you can
type IRB IRB short for interactively
okay
in Linux you'd do the same thing get
your Linux command prompt and you just
type IRB you're going to see that
they're going to look pretty much the
same alright so down here this is me
doing that in Linux right here this is
me doing it in Windows a Windows so
Annette to be in the world of senior
just for the come on front no we I just
went to one of my explorer windows like
you can open a boulder oh oh I see
interests happening I are be yep okay so
once you're at this prompt I'm going to
do everything in Linux but I want you to
want to make sure that you can get to
this type of compost
all right ideas search within Windows
seven
there's machine IRB in it you got
anything I come up so do they associate
those files or those two checkboxes oh
can go read thought you know I think I
missed that one apart boxes the fastest
thing to do with
you rerun the install file and check
those two checkboxes because one puts it
in your path and other associates the
files correctly I'll leave a little have
an accent buddy where you from Alexander
yeah I'm good I I got to this point
there's a common problem so I'm good ear
Alan where you from Buddy are you
meeting a Lincoln no I'm from Bolivia
actually South America away yeah I'm
sorry okay can you uh directly to uh I
completely forgot it was way back what
what is that like that disputable what
is that file and sour wouldn't those
files just I'll see here with let's see
so this is the file and then it should
already be in your downloads folder
right okay you know I have not
downloaded those ok that's my mistake
sure this is if you want to do it in
Windows that's all right it's by default
Linux ok I know I would rather who use
Windows Thanks ok so give it that way
thank you right I'm loving the 2.4 right
okay got it
Europe so I'm gonna say okay
okay was one second is somos hair
English except okay okay
I went to click accept okay the install
is you okay right you see this link
right so after the accept screen those
two really important checkboxes okay
that Ruby and I fluffy a right because
this puts it in your path remember like
you'll type Ruby and you're like here
you can't find the file like once it's
in your path it'll work from anywhere
exactly okay and then salty these we
don't check that right yeah no we don't
need TV and TK okay right now that those
are for GUI development like if you want
to make an interface we're only doing
command line stuff yep so check those
two boxes mm-hmm yeah someday when I go
up to my mom prom I should be able to
okay daddy
yeah this is IRB now watch this again
let me launch s administrator yes yes
sir yep
got it wow we're cooking with Crisco
okay right okay so we've got that IRB
command prompt now what we want to do
yes we want to go to the paceman now
okay and look now on the paste bin
should look in I'm sorry on the paste
and doesn't require a password
no please bill it's just a website okay
no I got it I mean Oh actually spawning
it to enter the password
strange children okay let me click on
the link again and I see it it's on your
it's on the uh it's on the uh yeah
chap Charlie I'll just paste the link
one more time okay just turn that right
now
yeah it gets the pontiff to enter a
password ok face there I'm sorry about
that
okay mr. Kyle password
actually it is fucking eternity past
four - yeah it did to me so oh okay
yeah I can do this yeah it's brought to
me the password
I'm sorry while I was editing it I had
it marked as private now it's public you
got me all right so I'll uncheck end up
one second show up all right I think now
we're cooking
now well now I can actually copy the
link because I was typing it before to
the DM it's very long yeah I'm sorry
about that guys you know just so used to
driving I didn't even realize I didn't
know better
I'll die scream all yay now oh yeah now
we're cookin Joe alright okay so one of
the things I want you guys to just get
you know a little bit more familiar with
Oh second here that number was okay so
what I want you guys to get a little bit
more familiar with it's some real simple
things with Ruby so we'll start with
some basic operators so inside of that
IRB I want you guys to jump down to line
86 okay and is that working for you guys
yeah it works
86 got it yeah yep so we're going to try
a couple of these things really simple
let's do I can x equals 25 let's do like
an X plus 30 like know why pull 69 you
can do like a wide less than 33
seem to be working okay yep okay
now how many of you guys are noticing
with each line lets you type what's
happening yes
see this is hmm what's happening this
this is just your line number count you
don't need to be too worried like I've
seen people like as their type and stuff
that are kind of like hey you know
what's what's what's going on here right
so anytime you have a value that's
populated right you're gonna see this
Ruby's gonna give you this sign right
here which is an equals and greater than
sign mm-hmm right so anytime of value is
populated with something you're gonna
see that I want you guys to hit ctrl L
okay what did you guys notice when you
hit ctrl L now in Windows nothing
happened
this is one of those little Linux isms
did you guys notice for me in Linux it
cleared my screen okay so normally why I
got so much to do it missing Linux but
normally that's a way to clear your
screen like if you have a bunch of trash
you've been typing for a while you just
want to clear your screen now what I
want you guys to do is I want you guys
to hit your up arrow start hitting your
up arrow and down arrow what are you
noticing okay yes see how you can go
through your previous history of
commands all right yeah that's right
cool so like if I did an X so let me see
we did a x equals 25 now I'm gonna do an
x equals 22 now if I say X do you see
that the values changed yep okay so once
you just create it you just created
something called a variable so you're
just saying hey I just want to give
something a name that's really all a
variable is like think of it like 10
like your phone number right like no one
remembers every friend's phone number
that they remember their name right so
you just have an association that you
map on top and so
if I just have you know variable name
and it's going to equal whatever it
equals right well that variable name
right now in pools Joe okay now there's
one little thing that you guys notice
while I was making variables that
equaled numbers I just typed in the
number when I make a variable that
equals a block of text you call block of
text a string what do you notice here I
want you to try that right want you to
do help name and then make it equal your
own name yeah so something like this
what if I go like you know first name
right and then you know my last name
all right now check this out I can go
first name plus last name right what's
he do and you have so sceeto's so now
let me try age forty just working for
you guys yeah yeah now try this
I'll go first name plus age and now
something happen
the reason is because as long as we're
dealing with numbers we can slam numbers
together all we want as long as we're
dealing with strings remember stranger
or grouping texts we could put those
together all we want when we want to mix
numbers and strings that's when we start
to have problems
mm-hmm oh you just want to kind of get
in your mind okay every time I'm talking
about numbers it's just numbers
anytime I'm talking about blocks of text
we call blocks of text strings anytime
I'm dealing with strings I always have
to put strings in quotes so I'm going to
show you something it's gonna look a
little comical but I want you to get in
the habit okay so I wanna do like this
okay I want you to go name equals now
watch me do single quote excuse me a
double quote double quote right mm-hmm
now I put my left arrow okay then I type
in my name did you guys see it
mmm when you tie it you always say like
whatever you want right I always go
double bit-level quote left arrow okay
right now it's March
okay got it
mmm okay why am I trying to teach you
right you know name equals single quote
single quote left arrow okay no matter
what if you go double quote double quote
left arrow single quote single quote
left arrow left hair and right parents
left parent right parent left arrow key
these nice guys make sense if ok why am
I trying to teach you that why is that
important
I guess a shortcut I mean I know I mean
easy too
yeah definitely a shortcut it's one of
those things that's gonna save you
heartache later on right the reason it's
going to save you some headache and
heartache just because what starts to
happen as you tie it you might have
something that goes like function like
this and then inside of it is double
quotes you know right plus something
else right and then that's something
else will have numbers inside of it I'm
starting to see what's going on right
right well problem is for this not to
work all of the parentheses and quotes
need to be balanced see how these are
together right these are together these
need to be balanced so this is together
this is together hardly seen
so for me I had to start learning I had
to start learning like not how to
program right like I can't teach you how
to program in one day right but but what
I can teach you is how to have stuff
look so confusing and you see what I'm
saying
right anything get very confusing - very
quickly is it so like you start to learn
just a few programming rules what I've
found is that really kind of helps
students tomorrow when we got to look at
these Metasploit scripts you can look at
it you can be like oh no no no he's just
assigning a variable and calling the
variable payload you know I get it again
and that's cool you know it's just he's
calling it for himself and also he knows
what he's talking about this you know
all he's calling the variable command
shell old King's calling the variable
antivirus you know yeah so not a problem
okay all right guys I say let's take a
quick break let's take ten minutes
sounds good okay and then we'll come
back and we'll get started on classes
and it classes are going to be at line
100 okay excellent
all right so let's do it whoo stop Joe
thank you no problem buddy okay