‫Instructor: Hi, within this section,
‫we are going to take a look at In-Network attacks.
‫So, if you're connected to the same router, same modem,
‫with another device, then you're on the same network.
‫And you can actually try to attack a device
‫on the same network using some techniques.
‫And we are going to discuss that in this section.
‫So, if you have taken the complete Ethical Hacker course
‫from me, from Call Stars,
‫then you know how to do this, okay?
‫This works in mobile devices as well.
‫Not as good as computers I would say,
‫but it actually works.
‫So if you don't know what I'm talking about,
‫just don't worry you're gonna learn within a minute.
‫So within this section,
‫we are going to focus on network attacks.
‫We have to understand how networks work.
‫So we have to understand how we can reach
‫to the internet and request some data,
‫and get some responses, and actually get that responses
‫in our devices inside of a network as well.
‫So, that's what we are going to do in this lecture.
‫So, assume that you have a device like a phone,
‫and actually a computer and a laptop in your own house.
‫So you have a router in order to connect to the internet,
‫your internet provider.
‫So, how does this work?
‫So for example, if you want to go to google.com
‫you actually forward that request to your router,
‫and your router forwards that request to the internet,
‫to google.com and gets some response,
‫and then forwards that response back to your device.
‫And in order for this to work,
‫you should have an IP address,
‫and you should have both local IP address
‫and a public IP address.
‫So, if you see something like that, 192.168.0.10
‫or 10.0.2.15, these are your local IP addresses.
‫So, if you see something like 10.0.2.15, 10.0.2.8, 10.0.2.5,
‫you're most probably on a virtual network like a net network
‫if you see something like 192.168,
‫you're most probably on a real network,
‫you're getting internet from the router itself,
‫and this is your local IP.
‫So you know how to get your local IP, right?
‫We have seen this before.
‫We have run IF config or IP config
‫depending on your operating system.
‫And in order to find your own public IP address,
‫you can actually go to google.com, okay?
‫And search for what is my IP address, like this.
‫So if you search for what is my IP,
‫it will display you an IP address, okay?
‫And most probably you will see it when you just
‫hit on the Google search like over here, okay?
‫And I'm of course blurring it
‫so that you can't see my own public IP address.
‫And you can go to any website
‫to find your own IP address as well.
‫So the important thing is that the public IP address
‫is the same thing for all the devices in your own network,
‫because public IP address is for your router actually,
‫it connects to the internet,
‫it forwards that information to your devices.
‫So every device over here has one public IP address,
‫but at the same time they have
‫all different local IP addresses.
‫And in this network attack section
‫we are actually interested in the local IP addresses
‫because that's what we are going after.
‫We are assuming that we are on the same network.
‫And to be on the same network
‫we have to connect to the same router.
‫And after that we can try to spoof the IP addresses
‫and gather the information
‫that we are not supposed to be gathering at the first place.
‫And by spoofing, I mean just tricking the rooter to think
‫that we are a different device.
‫So what we are gonna do just, we are going to
‫open our Kali Linux and connect our Kali Linux
‫directly to our router so that it can actually
‫forward some requests and get some responses
‫from the router.
‫And in order to do that, you're gonna need a USB WiFi card.
‫I'm going to explain what is it and how to get it.
‫And as I said before, just don't get it
‫if you're only taking this course
‫and if you're just watching this out of curiosity, okay?
‫Because it's a very simple and short section
‫and it costs some money to get this USB WiFi card, okay?
‫And just for that reason,
‫I don't believe you have to get this,
‫but if you're looking forward to be
‫an mobile application penetration tester,
‫of course you're more than welcome to buy it.
‫So if I are run IF config,
‫now I only see the eth0 over here, okay?
‫And I have my MAC address right there.
‫So we are not interested in the MAC address at this section.
‫However, it actually has something to do with this attack
‫because we are going to run some ARP spoofing
‫in this section.
‫So ARP stands for Address Resolution Protocol.
‫And here you can see the MAC addresses
‫and the IP addresses of the devices.
‫Of course, they're just there for example,
‫they're not real values.
‫But in order to know the MAC address
‫and IP address pairing in a network, we do some ARP scan.
‫It's nothing to do with hacking, actually.
‫You can just map the entire network
‫using some ARP requests, okay?
‫And you can say that, yeah, who has this IP address?
‫And you can broadcast this message to the entire network
‫and all of the devices will respond back immediately
‫saying that I have this IP address
‫and I have this MAC address.
‫Yeah, it matches with me, so I'm this device.
‫So the failure or the vulnerability in the system
‫is that you don't have to ask a question
‫or you don't have to broadcast a signal,
‫in order to receive a response from any device.
‫So what does it mean?
‫So assume that I am the hacker
‫on the right hand side over here.
‫I can come over to the router
‫and I can just say that I have the IP address
‫of 192.168.0.9, even though I don't have it.
‫And I can go to that device,
‫the MacBook in our case or Mac computer in our case.
‫And I can say that I have the IP address of 192.168.0.1.
‫So the MacBook will think that I'm the router
‫and the router will think that I'm the MacBook.
‫So the MacBook will actually forward the requests to me
‫and the router will forward the responses to me as well.
‫And I will forward that request to the router
‫and I will get the response back
‫and I will forward the response back
‫to the original MacBook.
‫So I will be man in the middle.
‫So this attack is called man in the middle, okay?
‫And it all always starts with ARP spoofing,
‫tricking router to believe that we are something else,
‫we are someone else in the network,
‫and tricking that someone else
‫that we are actually the router itself.
‫So, they will always forward the responses
‫and requests through us, okay?
‫So that we will be actually reading the requests
‫and responses and seeing the confidential information
‫like usernames and passwords that is being forwarded
‫to the internet, or coming back from the internet
‫so that we can hack the target device.
‫So this is man in the middle attack,
‫and we're going to see this in action
‫and we are going to learn how to do that
‫with mobile devices as well.
‫So we're gonna stop here
‫and continue within the next lecture.