Time
13 hours 9 minutes
Difficulty
Intermediate
CEU/CPE
13

Video Transcription

00:00
hello and welcome to another penetration test in execution. Standard discussion Today we're going to be looking at specifying I P ranges and domains within the pre engagement interactions components of the Pee test standard. So before we get started, let's have a quick disclaimer.
00:19
Pee. Test videos do cover tools that could be used for system hacking. Any tools discussed or used during the demonstrations
00:26
should be researched and understood by the user. Please researcher laws and regulations regarding the use of such tools in your given area. While we want to learn and have fun, we also want to ensure that we protect ourselves from any repercussions that could be brought on by the law.
00:43
So let's go ahead and talk about the objectives for today's discussion.
00:47
So we're going to discuss what I p ranges are and domains are at a high level. How this information should be formatted, discuss and review. Ah, sample document with respect to, um, you know, getting permission and laying that out a cz faras the ranges and things of that nature and then a review of tools to assist invalidation.
01:07
Now keep in mind that our audience here may not all be sock managers or experienced I t. Professionals.
01:14
You know, we we may have some business managers and things of that nature that are partaking in this so that they could better understand security testing and things of that nature. And so we're going to touch on what I P ranges are the high level and give a very brief explanation of those. But we're not going to get into very meticulous details on the subject matter.
01:33
So let's go ahead
01:34
and get into what do do remains an I. P addresses look like. So there are two different types of I P addresses that you want to be aware of i. P v four and I p v six. Now, relevance to that is really that I. P v four still widely used. And what you see here are some examples of those addresses.
01:53
Now we talk about
01:55
different types of addresses, but primarily which you'd want to be concerned with is internal ranges and external ranges, internal ranges, meaning I P addresses that do not route to the Internet or outside of the network and then external addresses. Public addresses would be addresses that are out on the Internet. It is essentially like
02:15
your house has a street address. That street address would be the equivalent of a public I p address on Dhe. Then, if you had, let's say items within your home, those were private items. Those items should not be available publicly said. We're talking about two different things here.
02:32
So these ranges given at the top are the primary internal rangers that you'll see
02:38
for private networks. Now Class A, B, C, D and E is given below are essentially ranges of the I P addresses. Now
02:49
you will notice that the Class A, B and C ranges again do not have all of the private range is listed. So in this case, these particular addresses within the Class A range okay, within this range are what are considered private
03:07
addresses or internal addresses.
03:10
The same thing goes for the class B range, see range, etcetera. So, as you can see, they do not take up the entire range for each of these areas. So anything outside of those ranges, aside from what we call reserved addresses, would be considered public I p addresses, meaning
03:28
the address is that allowed traffic on the Internet to get to your business.
03:31
Whatever the case may be, There now we did add in the address is here at the bottom, which were considered
03:38
reserved as well. And these air typically not used outside of the given cases here. So if you don't know what multi casting is, don't worry about that. Essentially, these rangers would not be used for your business is for us an I. P you would give to a tester or something of that nature.
03:54
And so this is the standard format foreign I p addresses that you have four octet. It's so that means that there will be four
04:03
sets of numbers ranging from zero,
04:08
2 255 in each of those four. So that is what would make up an I P V for address. Now
04:15
let's go ahead and move to our next line and kind of continued the discussion. So then we have what are called I p V six addresses. Now,
04:24
for those of you that have been working in I t for some time and you've gone to school and done things of that nature, you may have had your professors at the time tell you that I pee before is going away and I p v six is the future and, you know, you better start learning it. Well, for me, that was almost a decade ago, and we're still using I pee before, but
04:44
as of this year 2019 we're finding that over 10% of the spaces now utilizing I P V six addresses exclusively. So it is coming for business owners.
04:55
Essentially, what you want to pay attention to is anything that is this long string of numbers and letters that is likely an I. P v six address. Now, in some cases, you can shorten or take out repeat characters in order to reduce the size of this.
05:12
But it is essentially made up of 108 28 bits
05:15
as opposed to 32 bits. Now, the reason that we're looking at this and need to understand this is that while it may not be as prevalent today as we continue to move towards 2020 2030 2040
05:30
on, then my retirement hopefully in 2050
05:33
we will start to see I p v six be more commonly utilized. And so we need to you know, remember how to recognize properly test and document these address ranges in our penetration testing efforts.
05:46
Now the other side of this that is very important to remember, is that if you're going to do any testing on a domain, you have to remember that sub domains may not be the ownership or under the ownership of the business. And so this could be something like store dot or mail dot or something of that nature that may redirect to 1/3 party.
06:05
So when we talk about domains and identifying what domains within scope,
06:11
we always want to consider that stub domains may not be going to servers or systems that belong to the client. So in those cases we want to be extremely careful and ensure if we're doing testing against u. R l's if we're doing any type of spider ring against the domain, the primary domain
06:30
that we understand whether or not sub domains are within scope.
06:33
Now,
06:34
when we go to document this information, there are some key things that we want to remember the format.
06:42
All right, we want to include the sub net mask
06:45
for the I P addresses. That will be tested, all right, regardless of whether those air, external or internal. And the reason for that is is that if the client gives us a slash 24 internal range
06:59
and we know that that particular range goes from 1 to 2 54 okay, and this is more for my I t folks in the business owners if they give us this range, and we know that this is it.
07:11
But this range also happens to be owned by two parties. Let's say that there's a mixed environment. They share that address space with 1/3 party, another business. Whatever the case may be, then we need to figure out of this range. What do we need to admit? What do we need to leave out? What should we not test? Or
07:29
we get permission from the other party to do testing as well? And that would be between the business owner and that third party as well as faras negotiations. And who's doing what? Who's paying for what
07:39
domains should include any sub domains is what we were discussing, so subbed in Maine should be included in some cases. Again, they may only own they be in the client of the business the primary domain. But a sudden domain may redirect with third party. So I've seen plenty of times where we look at mel dot
07:57
and that goes to something like Office 365 Well, the client may
08:03
own the mail, the mail, maybe the mail for their organization. But they don't own the equipment, the software, the service's that are providing them with that male. And so they're very specific directions and permissions that you have to get taken care of before you can do testing against that domain.
08:20
Otherwise, you could be in violation of some statutes or the law.
08:24
Same thing goes for user dot This is just a example. This could be stored dot block dot Whatever the case may be,
08:31
that may not belong to the business. And so we need to validate whether or not those servers or systems are actually hosted on prim and typically the business owners will be able to tell you. Yes, we have a service from 1/3 party that takes care of payment. They host that in X y C location.
08:48
You can start to, you know, ascertain whether or not that that is a non print application, or whether or not they own that.
08:54
Now the same thing goes for additional pages off of the primary domain. So there may be a limited scope. And where the client on Lee wants you to test certain domains. I'm sorry, certain pages within their domain. And in that case, you need to specify those so that if you plan to use a tool
09:13
that does some dynamic testing, you may want to. It omits Spider Ring. You may not want it to crawl the domain because that at that point you could be in violation of the limitations and restrictions put on the testing.
09:26
So all of these things thesis UB, that mask the I p ranges, the domains and sub domains need to be taken into consideration when we're looking at conducting any type of test in the way that it's formatted specificity here. Exactness
09:43
is key. If we leave anything open to interpretation, that could be detrimental to us in our organization.
09:50
Now, let's look at a quick sample document. So this is compliments of a wasp on dhe. They've got this language on their site,
09:58
something that I wanted to break down here, too, is that it's very similar to the other document that we looked at previously and that we identify the customer
10:07
and we identify the employees of company. Okay, so the employees to conduct verification activities of the applications and systems described below. So this is the thing that I like about this permission form is that we need to specify and they even go as far as to say, unambiguous, alright application and system names
10:26
and a brief description.
10:28
This is great because by the time you finish with this document, there should be no questions or concerns with regard to what items air within the scope of the test. And so that goes back to providing explicit external I. P address range is explicit
10:43
internal address ranges, explicit domain names and some domains, as well as maybe pages within the domain that should be tested. Now, the thing that you want to remember is if a client provides you with a primary domain and says it is wide open, test it anyway. You like
11:01
you should use a tool, which I'll show you some tools to tools here in a moment. But you should look at whether or not. There are potentially any sub domains attached to that domain because the client may not have the breadth of knowledge required to properly explain the scenarios. You have a responsibility as the tester.
11:18
Even once this information is provided
11:20
to do Cem Cem, due diligence and validate the information again. You're the one that's responsible for doing this. The client will hopefully do their best to provide accurate information. But you should be the one validating the data.
11:35
And then again, the last part of this that's always great is Theo effective dates the specific dates in which the authorization is provided.
11:41
And then there would be some additional language in this where you can insert permissions in or restrictions as appropriate. So in this case, we may define information here at the top level. But then below, we may say, you know what? I need you to exclude
11:56
the following i p. I need you to exclude the given domain or see no page within the domain.
12:03
So you could take this document and really be as detailed as possible to ensure that you're properly protected and that you don't do anything that would be out of scope. Don't be laxed in this particular area, or you'll end up being a use case for one of our later discussions to be careful with that stuff.
12:22
Now let's talk about two tools that we can use for some validation purpose. And again, the goal with validation here is not to do active testing. We do want to be careful that we don't use any D. N s tools. It would brute force. Some domains do things of that nature, because when we get into active testing,
12:37
we run the risk of getting into trouble or having some issues. So one of the tools that I like to use you can use any who is tool. But essentially, this is from domaine tools dot com, and what you conduce you
12:50
is if a client provides a domain, you could enter Cem, Cem domain, the domain name, and then what? That conduce. It can provide you some potential I pr arranges associated with that. It can provide you with domain information ownership, address things of that nature, so that can kind of give you some some additional details on
13:09
you know what I P addresses associated with that domain
13:13
as well as who owns it and whether or not it may be hosted by 1/3 party. If there's issues, they're one of my personal favorite tools is D. N s Dumpster,
13:24
which is a sight
13:26
where you can input a domain name and it maps that domain name to a T M X Indian s records.
13:33
And so the great thing about this is
13:35
that if the client says, Hey, I've got a mail server and here's the address and here's you know, my domain name. And here's the I P addresses and all of my software's hosted on premise and things of that nature. And there's absolutely nothing that is that is, off site that belongs to another party, et cetera. Well, you can take a domain name,
13:56
put it in the site, and then it will attempt to map a M, x and D. N s records back to that domain. And so the great thing about this is, is if it maps that MX record
14:07
and it doesn't come off of the I p address that they provided In fact, it goes to what looks like a night P address that they didn't provide by 1/3 party.
14:16
You could cross reference that I p address with something like the office. 365 public I p addresses Whatever the case may be and do some further validation. There are many times where I've been given public I p addresses in domain names, you know, by the organization,
14:31
and I've gone back and looked and found that there were some addresses that were excluded. But we're still associated with the primary location, and that led to additional questions are Waters were being excluded and things of that nature, and we found that, you know, they just want aware that those addresses were a part of their their, uh,
14:52
particular range. And so this is a great way to really start not so much doing again active reconnaissance, but validating that.
15:00
You can also use any any Google tool that would give you the eye. The current public I P address you can look in the far wall. That would definitely be great if you could get some validation there and have them provide firewall information about public. I P ranges that around and through the device
15:16
many different ways that you can do that again, though We want to avoid active reconnaissance in map scanning doing things of that nature in these instances because that could be considered active testing, which may be a violation of statutes if you don't have permission, So always be careful
15:31
in those cases.
15:33
So with that in mind, let's do a quick check on learning.
15:37
So which of the following is not a valid I p address?
15:41
So please take a moment to pause the video if need be
15:46
so
15:48
of these things
15:48
which I p or which example is not a valid I p address.
15:56
Well, let's talk about the ones that are valid. So a is a part of a private address range and it is valid d is a valid I P V six address be is the Google D. N s address and is a is a valid public. I P address, see is not
16:15
a valid address. The reason being is remember, this is what we call an I P V for address. And so in those cases there are four octet ce and so if we count the numbers here, we will see that we're missing an octet. So
16:32
in that particular case that is not a valid I p address,
16:37
so let's go ahead and wrap this up with our summary.
16:41
So in summary, we discussed what I, P ranges and domains are at a high level again, keeping in mind that this is also content for business owners. And we don't want to make any assumptions about knowledge levels with respect to what those addresses ranges or domain names are and how they're formatted. And so we looked at four man and as well,
17:00
we discussed in reviewed an additional high level document as faras how we could form at our permission memo and how we should lay out the information to ensure that there is no room for interpretation when we're looking at those documents.
17:15
And then we were reviewed tools to assist in validation. So again, all of this is important with respect to ensuring that our scope is well defined and ensuring that we get appropriate information from our questionnaires to ensure that we get the appropriate information into our contracts.
17:33
All of the previous discussions build on these concepts.
17:37
We also looked at tools again. Keep in mind the two tools that we looked at our at passive in nature and that you're not directly squaring the information from your systems you're not doing in maps canned. You're not brute forcing D N s. You're not doing things of that nature
17:52
when you cross that line and you do that type of validation prior to getting permission, you run the risk of legal ramifications or issues.
18:02
So with that in mind, I want to thank you for your time today, and I look forward to seeing you again soon.

Up Next

Penetration Testing Execution Standard (PTES)

In this course we will lay out the Penetration Testing Execution Standard (PTES) in all its phases and their application for business leaders and Security Professionals alike.

Instructed By

Instructor Profile Image
Robert Smith
Director of Security Services at Corsica
Instructor