Not Really Game Related - How do people hack networks?

Started by
20 comments, last by hybrid_ham 11 years, 4 months ago
I've been programming for quite a while and I've done all kinds of stuff on a single PC. What I don't get is, how do people hack into networks and steal information? I have literally no idea how that works in a language like C++? Where would you even start? Does anyone have any tutorials for this anywhere? What languages are hacking programs written in?

I'm not looking to do anything illegal I'm just very curious.
Advertisement
Generally breaches occur by taking advantage of a known exploit, (before it's patched or by finding unprotected systems,) convincing someone to install software that will provide outside access or record/send information, or using social engineering to pick up enough information to get in another way
Take a look at phrack.org (not necessarily early issues). For example, issue #49, article "Smashing the stack for fun and profit".
It explains basics of one fundamental, widely used technique of abusing code. Of course, there are many, many other techniques.
I am not a hacker and I will never claim to be, I have done research though and came across things like first scanning ports of the known IP address, once you have that connect via telnet and check the ports see what kind of technology is running on them and look for known exploits in that technology. That is as far as I got because I honestly have zero desire to go any further. It can be handy to know in some instances. Programming comes in because you can make your own tools to make your life easier.

What I don't get is, how do people hack into networks and steal information?


Often times they simply walk right in and ask for it, both figuratively and literally.

When I worked in network security, there was an often quoted figure where 90% of unauthorized access occurred from within a network. Some disgruntled programmer, an accountant that got a little greedy, a dimwitted VP with a laptop, some guest that liked looking around electronically...

Another good quote was how the most used hacking tool was a clipboard. Physical security is fairly well addressed these days, but it used to be that if you showed up to a business with a clipboard and a smile, people would let you into any phone closet you needed to get access to. Sneakers is a fantastic movie, well ahead of its time in this regard. Wired just had an article about someone calling customer support to steal a guy's info.

For all the wild stories about the evils of hackers, these are still the most common forms of attack.

The next layer are similar sorts of things. You provide input, and the server inside the network does the work for you. Some badly configured networks just let you in and ask for data. Open your browser or query tool, point it at their network and look at things that you maybe shouldn't see. SQL injection is the easiest 'attack' to understand here. Some programmer expected you to type in a name, so pasted that text into a SQL statement. You put in a SQL statement instead of a name. So when the code runs, it runs your SQL statement rather than querying by name. C/C++ buffer overflows work the same way, though it's much harder to craft assembly to do what you want than a SQL statement.

The actual tools tend to vary pretty significantly. C is likely still popular because the hardest (and most effective) hacks still involve a whole lot of bit-fiddling. perl used to be pretty popular since it allowed command line web requests easily. JavaScript is increasingly important to perform attacks against poorly implemented website security.
It starts with dicks that have nothing better to do with their lives but to steal stuff and go where they are not supposed to go and break laws. Please, excuse the language, but you have to admit it is true.

C dominates the world of linear procedural computing, which won't advance. The future lies in MASSIVE parallelism.

One of the easiest ways to gain entry is to ask.. people are a liability when it comes to computer security. If you can overload someone's brain with enough computer speak they cease to question your authority and start to become even helpful.

One of my personal favs is ARP poisoning as it is easy to overlook for almost everyone. On an Ethernet LAN with computers running the TCP/IP protocol stack it is easy to forget that the stack is actually Ethernet/TCP/IP. IP addresses are most necessary for internetworking (networking between networks) as they provide a way to group and organize a network under a single subnet. A subnet might look like this: 201.100.100.* where the asterisk could be any number from 1-254.

Anywho, computers on an ethernet LAN can't communicate directly by IP address. They actually need to know the MAC address of a local workstation in order to communicate with it through a datagram called "Frames". You've heard packets before, which is what IP uses.. but IP itself is carried inside of Frames in this case.

Now here's the thing.. computers don't know other local computers MAC addresses. How do they get them? They have to ask.. Say Joe's computer is trying to contact IP 192.168.10.200, but to do this it has to get the MAC address for that machine first. It can do this by broadcasting a frame that everyone on the LAN receives asking "Who is 192.168.10.200?" EVERYONE on the LAN receives it.. guess who answers? The machine that is 192.168.10.200 answers back directly. This broadcast frame is called an ARP request.

So here's the hack. A hacker writes software that listens for ARP requests. When one is received the hacker answers the sending device (the one asking "Who is 192.168.10.200?") with the hacker's computer's OWN mac address. This would cause any traffic from the sending computer to go to the hackers computer rather than it's actual destination. This comes in handy if you do things like hijack their gateway. The hacker can even go so far as to do full routing of traffic so that anything that arrives at his computer is sent to the actual company router. This allows the hacker to snoop on everything you are doing online without you so much as even being aware it is going on.

It starts with dicks that have nothing better to do with their lives but to steal stuff and go where they are not supposed to go and break laws. Please, excuse the language, but you have to admit it is true.


+1 if it weren't the lounge. Anonymous, LulzSec, all these cracker groups you hear about on the news, I estimate that about 1% of the members are actually politically motivated, the rest are probably antisocial basement dwellers who just like breaking things. I concern myself with creating games, something I can enjoy after the fact and show people etc, rather than coding myself into prison, because that's invariably what happens to the biggest hackers.

It starts with dicks that have nothing better to do with their lives but to steal stuff and go where they are not supposed to go and break laws. Please, excuse the language, but you have to admit it is true.

Actually, it is hard to judge those people, as it is hard to judge criminals. I don't like to defend criminals, but I have a deep interest in psychology and how the human mind work. There is many people studying it and I like to hear what they say.

For example, there is a playlist on TED of 6 videos where they talk about hackers.
One of them is about how the biggest hackers got into this life (btw all of them were arrested and interviewed). But this video in specific is all about how the government should hire those hackers and provide better conditions to them instead of hunting them.

EDIT: Many people recommend Kevin Mitnick's The Art of Deception book (I personally can't because I haven't read it). Now, I have read some chapters of the recent (2011) Ghost in the Wires book on the bookstore, and it seems pretty insightful.
Programming is an art. Game programming is a masterpiece!
Mostly its flaws in the OS its protocols or some higher level API ie web server etc.. Humans are probably incapable of writing flawless software so there will always be an opening, it's just a question of how persistent and knowledgable you are. There is some diversity too, some hackers focus on just a few types of API or specialize on some common protocol etc.. some hackers aim for the stars and try to break the big things like finding flaws in the crypto systems fundamental to the current Internet, but the attacks don't have to be directly tech related, alot of hackers also specialize in people hacks ( ie customer service phishing or backdoor hacks, etc.. ).

This topic is closed to new replies.

Advertisement