Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

[0x01] Introduction to networking

What is a computer network?


A computer network is a group of computers that are linked together through a communication channel in order to share information and resources.


The Internet


Before, when people wanted to speak with someone who lives in a distant place, they would have to reach a phone and make a phone call. If they don’t have any access to a phone, they would write a letter and wait. Nowadays, the Internet has undoubtedly become a huge part of our lives since it does an amazing job at connecting people to each other and allows us to do a multitude of tasks easily.


OSI Model


The Internet as whole is a collection of different layers stacked upon each other. The OSI Model (Open Systems Interconnection Model) is one of the most popular networking model that standardizes the communication functions. This system is divided into small parts called layers where each layer is assigned to some specific tasks that defines some key functions. These tasks are completed with the help of one or many protocols assigned to a specific layer.

[Image: osi-model-table.png?w=660]


Physical layer
The physical layer contains all the physical contents that are used to transmit and receive bits through the network. The bits are transferred using signals that reacts to specific voltage levels, voltage fluctuations, physical data rates, transmission distances and physical connections. It is where things like cables, connectors and hubs resides.

Data link layer
The data link layer is where the stream of raw bits from the physical layer are converted into data frames. This layer also contains an error detection and correction before it transmits the data frames separately to the next layer. It is where devices like switches and bridges resides.

Network layer
The two main functions of the network layer is to move the data frame from the incoming link of the router to the correct outgoing link and to identify the correct path from the sender to the receiver. This is why this layer is responsible of assigning addresses to devices, dealing with packet switching, data congestion and routing. Network layer also converts the data frames into packets and checks if the packet reached the destination with the correct requirement. It is where devices like routers resides.

Transport layer
The transport layer converts the packets that it received from the network layer into segments and checks if the segments are ready for transmission over the network. It provides an error-checking to guarantee correct data delivery with no losses or duplication. It is where devices like firewall resides.

Session layer
The session layer initiates, maintains and ends sessions across the network. It is responsible for identification so only authorized person can participate in the session. It also provides synchronization and deals with session failure by transmitting only the data from the last check point. It also allows to manage who is able to transmit data at what time and how long.

Presentation layer
The main function of the presentation layer is to format the data in a common and uniform way that the rest of the OSI Model can understand. It is responsible for protocol conversion, character conversion, data encryption/decryption, expanding commands and data compression. Basically, it sets standards for different systems to provide seamless communication.

Application layer
It is used by the applications that the user sees and directly works on. The application layer provides network services like file transfer, electronic mail and more to the application processes.
Would rep you if I could. This is definitely a great model to look look at when it comes to REAL hacking (and not just being a script kiddie). A true hacker would ask himself; how can I exploit each layer to get what I need to get to. In my opinion, once one can ask him/herself this, and know the answer; that's when they've weened themselves away from script-kiddie-ism.
(May 8, 2017 10:39 AM)Noobface80 Wrote:  Would rep you if I could. This is definitely a great model to look look at when it comes to REAL hacking (and not just being a script kiddie). A true hacker would ask himself; how can I exploit each layer to get what I need to get to. In my opinion, once one can ask him/herself this, and know the answer; that's when they've weened themselves away from script-kiddie-ism.

Thanks you a lot, I hope this helped you and will help others to understand/review the fundamentals.

I am planing to do a series of threads like this to cover Ethical Hacking.
You're definitely in the right direction. Hacking starts with learning! Which is why I've been studying networking so long prior to learning how to hack; It's definitely a smoother learning curve when you already understand how/why something works/doesn't work!

I will admit I am still a bit of a script kiddie, but hopefully with learning (not just how to run hack.exe, but learning more networking, and even application development) will come experience, and the title of a true hacker!
(May 8, 2017 10:39 AM)Noobface80 Wrote:  A true hacker would ask himself; how can I exploit each layer to get what I need to get to. In my opinion, once one can ask him/herself this, and know the answer; that's when they've weened themselves away from script-kiddie-ism.

Wrong and wrong.

If you want to "exploit" by stealing credentials over a wireless network, you aren't gonna figure out how exploiting Layer7 (Application, HTTP) will help, because it won't. 90% of the time, you're gonna ask yourself how to exploit Laer6 (Presentation, SSL) to actually make use of the data that Wireshark picks up. Of course the obvious answer would be to force HTTP over HTTPS which can be done with a combination of SSLstrip, a DNS server and often a Rogue AP. You don't need to exploit each layer, just the ones that will get you where you want (Especially since you can't really "exploit" a physical layer practically)

Also, you can understand how networks work, understand what you have to do to complete the exploitation process and achieve your desired goal, but if you can't actually put it into practice, or if you can't write your own scripts (or at the very least understand scripts that are previously made, [no need to rewrite nmap]) then you shouldn't be calling yourself a "true hacker." I know people that do exploit development, other websec stuff and are crazy good, yet still don't refer to themselves as hackers.

Back on topic, good simple explanations for people to understand but with all due respect it's been done numerous time by the people in the networking section(s). With much more indepth explanations, also covering topologies, handshakes, etc.
humble rubyist in a world of pythonistas
Good overview of networking fundamentals, I'm sure many new folks will find this useful.

Keep up the HQ work, OP. 🤝
(May 8, 2017 12:49 PM)Faith Connors Wrote:  Wrong and wrong.

If you want to "exploit" by stealing credentials over a wireless network, you aren't gonna figure out how exploiting Layer7 (Application, HTTP) will help, because it won't. 90% of the time, you're gonna ask yourself how to exploit Laer6 (Presentation, SSL) to actually make use of the data that Wireshark picks up. Of course the obvious answer would be to force HTTP over HTTPS which can be done with a combination of SSLstrip, a DNS server and often a Rogue AP. You don't need to exploit each layer, just the ones that will get you where you want (Especially since you can't really "exploit" a physical layer practically)

Also, you can understand how networks work, understand what you have to do to complete the exploitation process and achieve your desired goal, but if you can't actually put it into practice, or if you can't write your own scripts (or at the very least understand scripts that are previously made, [no need to rewrite nmap]) then you shouldn't be calling yourself a "true hacker." I know people that do exploit development, other websec stuff and are crazy good, yet still don't refer to themselves as hackers.

Back on topic, good simple explanations for people to understand but with all due respect it's been done numerous time by the people in the networking section(s). With much more indepth explanations, also covering topologies, handshakes, etc.

Thanks for the post, this is a brief introduction to networking and OSI Model. In the [0x02 Networking] thread that I am currently making, I will cover the protocols of each layers in order to do a more in depth explanation.

After the networking thread a [0x10 Programming] will be next where I am going to start from Python basics then teach how to write some useful tools.


(May 8, 2017 01:02 PM)Xphile Wrote:  Good overview of networking fundamentals, I'm sure many new folks will find this useful.

Keep up the HQ work, OP. 🤝

Thank you, the support motivates a lot 😁
(May 8, 2017 01:15 PM)0NUR0UX Wrote:  Thanks for the post, this is a brief introduction to networking and OSI Model. In the [0x02 Networking] thread that I am currently making, I will cover the protocols of each layers in order to do a more in depth explanation.

After the networking thread a [0x10 Programming] will be next where I am going to start from Python basics then teach how to write some useful tools.

Ah, alright. I thought this one was to somehow cover all of networking, as the title suggested. Maybe change it to Networking - OSI Model or something like that?
I dunno, just my two cents.
But sure, keep it up boss.
humble rubyist in a world of pythonistas
(May 8, 2017 01:27 PM)Faith Connors Wrote:  Ah, alright. I thought this one was to somehow cover all of networking, as the title suggested. Maybe change it to Networking - OSI Model or something like that?
I dunno, just my two cents.
But sure, keep it up boss.

Hey, I changed it thanks for the proposition and the support.
I agree with you that the title talks more by itself now.
(May 8, 2017 12:49 PM)Faith Connors Wrote:  You don't need to exploit each layer, just the ones that will get you where you want.

That was what I was trying to say. I have a hard time getting things out sometimes, and end up wording things incorrectly.

Correction:
How can I use whatever layer to get to what I want?

Also, as I said, still a script kiddie meaning I prematurely read up on exploits, zdays, vulns, and hacks before knowing how they work because of my lack of software dev experience, but slowly/surely learning you know?
Anyway, thanks for the correction!
Nice tutorial OP, it's great to see newer members contributing positively to the forum :)
I'm going to assume that you are going to make a continuation of this series of networking threads, will be excited to see up coming ones!
Can you hear my weed?



cuz it's loud
(May 8, 2017 10:45 PM)THC Wrote:  Nice tutorial OP, it's great to see newer members contributing positively to the forum :)
I'm going to assume that you are going to make a continuation of this series of networking threads, will be excited to see up coming ones!

Thanks a lot, of course there will be a continuation :)
It's coming soon (will be there by the end of the week)
😁
Great tutorial mate! Keep going!
(May 9, 2017 04:06 PM)Mr. WAVES Wrote:  Great tutorial mate! Keep going!

Thanks brother 👍
Nice simple tutorial for new users.
Kind of like condensed a version of my 2 combined 😝
https://hackforums.net/showthread.php?tid=4834114
https://hackforums.net/showthread.php?tid=4838715

Keep up the good write ups man. 👍


Possibly Related Threads...
Thread / Author Replies Views Last Post
by avocJan 11, 2013 04:14 PM 3 250 Jan 11, 2013 04:14 PM
Last Post: N3WER4
by Mushr00mOct 12, 2011 02:37 PM 10 185 Oct 12, 2011 02:37 PM
Last Post: ThatGoatherd
by Mushr00mOct 12, 2011 11:56 AM 5 886 Oct 12, 2011 11:56 AM
Last Post: joey213