I am confused about this concept if a public IP is assigned to my router and my system has private IP address, how an attacker can access my system or can use my system as a BOT. Its a common scenario when we click or download some malicious file than an attacker got controlled. Is there any other way to open the door(Router) with some thing like duplicate key ?
closed as unclear what you're asking by RoraΖ, Dog eat cat world, M'vy, Jens Erat, Xander Feb 11 '15 at 14:48
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
The router is like a automated door that would:
- Let anyone open it from the inside
- Require a passcode to open from the outside
There are multiple ways to bypass the normal behaviour, some are exploiting flaw in the implementation of the router, other flaw in the protocols and some in design.
Let's say you invited a friend to stay at your home, then you go to work. If he is a bad friend, calls thieves and open the door from the inside for them, thieves can come in and rob you.
Well, now you decided not to entrust anyone. A thieves can come to your door, confuse the automate to let him think he is inside so that the door opens (e.g. TCP flag manipulation).
The thieves can also go to a bar you're usually in, pay you a couple of beers and get the passcode to enter from yourself.
The thief can also go to the door with a list of passcodes and try them one by one until the door opens.
If you open a port for a service, let's say you are a medical doctor with a secretary. People may come in and go to the secretary, but not come in and go to your house. A thieve can come in, disrupt/dupe the secretary and go in your house while she's not looking.
Back on more computer thematic. Once inside, an attacker can exploit a vulnerability of your computer to install a bot on your machine. Then your machine will try to access the internet, which it is allowed to do anyway.
Per se, NAT masquerading is not a security measure, because it has initially been design to allow multiple computers to access the internet using a single public IP address. The more we progress, the better the router are able to block malicious request coming from the outside. But they are always cases where it's not easy to distinguish legal traffic from forged one.
So, if we put this question in a real world situation, it would be: "How can attackers get in my house if the door is kept locked?" Answer: It's harder for them to get in, but the extra challenge is just getting in.
Putting your computer behind a router and locking your doors at night reduce the chances of a drive-by attack, but if you invite someone in either on purpose or accidentally, those protections are useless.
(Note, the above link is not malicious. It just shows a tool that can be used for penetration through the browser.)