Jump to content

Recommended Posts

Posted

 

i0p0OG0.jpg

 

YUwisOj.png

 

Introduction

 

To begin with, let's start off from the very beginning. I'll go through the very basics and fundamentals of networking and reaching to a somewhat decent level of knowledge, concluding with all the detailed aspects of managing networks and servers' operations.

 

How servers communicate with each other

 

The network flow consists of packets that are being exchanged over the World Wide Web (WWW, as we know it). In order for a client to exchange information with a specific server, the client must sent over packets containing the request over to the server. The server then returns an answer for the request contained within packets of data. A flow is the period of time within which, packets from the same source and destination have occurred.

 

Hry7sJI.jpg

 

Depending on the link the traffic can be:

 

Uni-directional

Bi-directional

 

The uni-directional traffic is a one-way traffic that creates one flow and does not use reverse channel arguments unlike some protocols like TCP. A basic example of a uni-directional traffic would be using the User Datagram Protocol (UDP) so as to generate a single flow without requesting an answer from the server.

 

rYvkFDx.jpg

 

The bi-directional traffic is a two-way traffic that creates two flows. One flow is generated upon a request made to the server by the client and a second flow is being generated in order to return the answer to the client from the server. Common usage of a bi-directional traffic is that of sockets and also ICMP as a protocol.

 

kjypFPm.jpg

 

Both of them are part of the so-called UDLD (Unidirectional Link Detection) data link layer that has the mission to determine whether a link is broken or not.

 

So basically the first thing the client has to do in order to establish a connection to a particular node (connection point), he must generate an endpoint which will use a specific transport provider to carry the information. Next step is to specify the node itself with the address information so as for the client to be able to locate the destination. Then the client-server connects to the server and awaits a response.

 

Whenever the server analyzes the payload it is ready to return an answer whether the request had been accepted or rejected. Then the communication between the nodes is over and the connection is aborted.

 

Duplexes

 

The duplex is a point-to-point system, consisting of two nodes that communicate and exchange information with each another. Depending on the type of communication those systems are half-duplex and full-duplex.

 

The half-duplex is when only one of the connection points can send/receive at a moment.

 

The full-duplex is when both nodes send and receive data over the network simultaneously.

 

OSI Model

 

Most plainly said, the Open Systems Interconnection (abbreviated OSI) model defines the phases that the data must be parsed through in order to reach a certain node over a network. It allocates different types of payloads of delivery into different protocols that are part of layers. The OSI model consists of seven layers. Each layer consists of protocols. Those are (as follows):

 

wYcl59o.png

 

Physical Layer [#1]

 

This layer is the first and lowest in the OSI model. It is responsible for the management of electrical signals. A fundamental layer configuring the logical data structures of the higher level functions in a network. Some of it's protocols are:

 

bawpn7q.jpg

 

► Telephone network modems- V.92

► IRDA physical layer

► USB physical layer

► EIA RS-232, EIA-422, EIA-423, RS-449, RS-485

► Ethernet physical layer

► Varieties of 802.11 Wi-Fi physical layers

► DSL

► ISDN

► SONET/SDH

► Optical Transport Network (OTN)

► GSM Um air interface physical layer

► Bluetooth physical layer

► ITU Recommendations: see ITU-T

► IEEE 1394 interface

► TransferJet physical layer

 

bawpn7q.jpg

 

The Physical layer mainly manages cables, connectors, hubs, and repeaters.

 

Data Link Layer [#2]

 

The Data Link or just Link Layer is responsible for addressing between nodes, error notifications and output of server-side errors. Most usually we come to know it around the casual status codes like 403, 404 etc. that we encounter upon an unsuccessful attempt to access a page, directory or link. The following protocols append to the Data Link layer:

 

bawpn7q.jpg

 

► ARP/InARP

► NDP

► Different types of tunnels

► L2TP

► Ethernet

► DSL

► ISDN

► FDDI

► PPP

► Media Access Control

 

bawpn7q.jpg

 

As I mentioned, part of this layer's duties is to notify of a permission denied page or other resources. As of that I have included the top most common status codes that occur.

 

a2O3xTs.png

 

 

Network Layer [#3]

 

This is the third layer in the OSI model also known as Internet Layer. The layer manages logical addressing between nodes, routing functions and host addressing where you can track the source to its location. Also controls message forwarding operations for packet forwarding over a network. Some of its protocols are:

 

bawpn7q.jpg

 

► BGP

► ECN

► IGMP

► IPsec

► IP

► IPv4

► IPv6

► ICMP

► ICMPv6

► RIP

► OSPF

 

bawpn7q.jpg

 

We come to know it as of the IP (Internet Protocol) which is mostly used to determine users over a network and restrict permissions or grant privileges.

 

Transport Layer [#4]

 

Probably one of the most important layers in the OSI model. The Transport Layer (#4) provides end-to-end communication over a network. It also enables data being transferred in stealth and controls the flow. Usually Denial of Service attacks are being carried over this layer. Some of the protocols it includes are:

[/align]


[align=center]

bawpn7q.jpg

 

► UDP

► SYN

► TCP

► WTCP

► DCCP

► SCTP

► RSVP

► TIPC

► ALCAP

► WAP Datagram Protocol

► Xpress

 

bawpn7q.jpg

 

Session Layer [#5]

 

A connection between two applications is called a session. The fifth layer - Session Layer - establishes, manages and terminates connections between applications. The session layer (as of its name) operates sessions. It can open and/or close a session. Also responsible for the restoration of an inactive session and so on. The protocols that append to it are the following:

 

bawpn7q.jpg

 

► NetBIOS

► SAP

► PPTP

► RTP

► Named Pipe

► SOCKS

► SPDY

► TLS/SSL

 

bawpn7q.jpg

 

Presentation Layer [#6]

 

The sixth layer of the OSI model is the presentation layer. Imagine we have a courier, a recipient and a factory. This layer serves as the courier. It encrypts data over the network and configures it in a way that only the designated connection point can read  and accept it. By far it contains of only two protocols:

 

► MIME

► XDR

 

Application Layer [#7]

 

Now the final layer of the OSI model is the Application Layer (#7). This layer is pretty much responsible for identifying the connection points and user authentication. Its protocols rely on protocols from the transport layer in order to establish host-to-host connections. It includes the following protocols:

 

bawpn7q.jpg

 

► DHCP

► DHCPv6

► DNS

► FTP

► HTTP

► IMAP

► IRC

► LDAP

► MGCP

► NNTP

► BGP

► NTP

► POP

► RPC

► RTSP

► RIP

► SIP

► SMTP

► SNMP

► SSH

► Telnet

 

bawpn7q.jpg

 

Denial of Service

 

M0Go7tF.jpg

 

Let's see a basic example of a Denial of Service (DoS) attack, carried out through a Slowloris script against an Apache server. Let's first load up our script. What the Slowloris attack does is open an amount of connections to a host and leaving them open for as long as possible. Meanwhile, whenever a connection is about to get terminated due to inactivity Slowloris sends HTTP headers to keep it alive. That way the DoS is rarely filtered up automatically and a system crashes quickly without manual nullrouting.

 

We will start by running the script with:

 

./slowloris.pl

 

width=778 height=768http://i1067.photobucket.com/albums/u433/aeroxtk/wdada_zps8ec3071a.png[/img]

 

First of all, in case we are now aware of the timeouts, the script offers a mode for testing. Based on port usage Slowloris determines the timeouts itself, although the numbers won't be precise it is still recommended that we should first start off with this.

 

./slowloris.pl -dns [url=http://www.site.com]www.site.com[/url] -port 80 -test

 

But let's say we've got the timeout (for example the number 1500). What we want to do now is launch the actual attack.

 

./slowloris.pl -dns [url=http://www.site.com]www.site.com[/url] -port 80 -timeout 1500 -num 700 -tcpto 5

 

The -num switch is for how many sockets to be used to initiate the attack. Also the -tcpto should be set to the value of 5 (by default).

 

width=811 height=768http://i.imgur.com/e6rnuSe.png[/img]

 

Also a thing that could usually bust our whole attack is the HTTPReady accept filter. This filter buffers entire HTTP requests at the kernel level. Once the entire request is received, the kernel sends it to the server. So as Slowloris is based on opening connections and leaving them open for as long as possible, that pretty much fails our attack. However, the developer of the script has thought of this and developed a method that would send the attack as a POST verses a GET or HEAD request. We come to use it by the -httpready switch (how ironic).

 

width=748 height=768http://i1067.photobucket.com/albums/u433/aeroxtk/123_zpsbeccc689.png[/img]

 

Now let's have a look at some statistical information, Monitoring the bandwidth usage during the attack, it is plainly visible that we use a minimum part of it but actually manage to take down an Apache server with it. In comparison the this the victim we have targeted has most of its traffic timeout (in red).

 

width=1024 height=622http://i.imgur.com/XViEVT9.jpg[/img]

 

Smurf Attacks

 

Smurf attacks represent an attack carried over the IP protocol using Internet Control Message Protocol (ICMP). ICMP packets are being sent in immense amounts with a spoofed Internet Protocol source. The attack is by far a pretty advanced method of attacking a server. It is both reflective and amplificational. Lemme explain it a bit plainer. The victim server returns an answer to the slave (which is in control of the actual attacker) from the ICMP request/packet. Each time it is being returned it gets multiplied as the attacker's server replies the answer that was first replied by the target. That explain both theories of amplification and reflection.

 

8nRecWm.jpg

 

The more slaves there are, the harder the impact will be. In a network there may be hundreds of bots, all of which replying to the server responses and overloading it to excess. Smurfing attacks as mentioned above use a spoofed IP source to perform their attacks in stealth. The spoofed protocol is randomly generated sequence of numbers that does not originate in fact but has the illusion it does. However, if a developer blocks ICMP response packets this will pretty much mitigate the attack.

 

Conclusion

 

I guess, I placed it a bit noob friendly for people who are new to this. All in all took me two days but there is Part 2 coming soon. Thanks for reading!

 

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Thank you everyone — we're doing our best to deliver the highest quality experience!   ⏳ Less than 2 days left until the L2Elixir Launch! Our team is working nonstop, polishing every little detail to ensure a smooth and exciting opening. A huge thank you to everyone who participated in the Open Beta — your support and feedback have been invaluable. Get ready… the adventure begins soon! ⚔️✨   Launch: November 28 & 21:00 UTC +2   Website: https://l2elixir.org/ Discord: https://discord.gg/5ydPHvhbxs  
    • Do you sell interlude interfaces?
    • in conclusion when somebody who has a project for 10+ years still on development writes an e-say to try until you succeed and then advertises his project, one of the reasons is he needs money, so l2j has once more become pure expensive hobby, you wont make money out of it.   You can still use L2jFrozen and get better results for this, i know some people that done it    keep in mind that C in aCis stands for Crappy, and after all these years its not a cool wordplay anymore, its a fact, prove me wrong.
    • First, don't really follow the "main voice", moreover if you consider it an hobby. Simply do what you want, you got only one life so use it as you want. If you make it an hobby, it's exactly like piano, or velo - only practice makes you better.   Secondly, how do you learn things ? It's actually a really important question, since some can simply be scholar, read books (theory) then practice ; and some simply can't read books. I'm the second type, I hated school, I find it boring - my knowledge in Java comes from try-and-fail. You improve your coding style every year or so, I can myself rewrite my own code (which I already considered top-notched) after a while. You always learn something new - even if Java barely evolves. L2J is a fun way to learn programming, it's a giant sandbox where you can edit anything, and I believe it should be taken as it.   My own way of learning was as follow : Add existing customs, no matter what they are : the point is to know main classes used by L2J / customs. L2J is barely Java knowledge ; the true knowledge is to know WHAT to search in WHICH location (what I call, organization). You have to understand than EVERYTHING you think already exists, in a form on another, in the source code. A custom is only the association of the different mechanisms you found "here and there", glued together in a proper goal. Once you know main classes to edit, and the customs you added are compiling fine, the main point is to know WHAT exactly you DID. Try to understand WHY and WHERE you actually copied the code. Third point would be to MANIPULATE the customs you added in order to fit your wish. First edit little values, then logic conditions ; eventually add a new Config, or a new functionality to the custom. Fourth point would be to begin to craft your own ideas. Once again, EVERYTHING already exists, in a form or another. You want a cycled event ? You got Seven Signs main task as exemple. Npc ? Search any type of Npc and figure out what it does. Fifth point would be to understand Java - mostly containers (WHAT and WHERE to use them), variables types and main Java mechanisms (inheritance, static modifier, etc). You should also begin to cut your code into maintainable classes or methods. Java can actually run without optimization, but bigger your ideas, more optimized and well-thought it should be. It's direct saved time in the future, and you would thank yourself doing so. Main tips : ALWAYS use any type of versioning system - GIT or SVN. It allows to save your work, step by step and eventually revert back anytime you want if you terribly messed up. L2J is 80% organization knowledge, and 20% Java knowledge. Basically, if you know WHAT and WHERE to search, if you aren't dumb, it's easy to replicate and re-use things. Cherry on top is to use a already good coded pack to avoid copy-paste crap and get bad habits. Avoid any type of russian or brazilian packs, for exemple - their best ability is to leak someone's else code. Obviously you need some default sense of logic, but Java and programming in general help you to improve it.   Finally, most of your questions could be solved joining related Discord (at least for aCis, I can't speak for others) - from the moment your question was correctly asked (and you seemed to search for the answer). My community (and myself) welcomes newbies, but got some issues with noobies.   The simpliest is to try, fail and repeat until you succeed - it sounds stupid, but that's basically how life works.   PS : about Java ressources, before ChatGPT, it was mostly about stackoverflow website, and site like Baeldung's one. With ChatGPT and alike, you generally double-cross AI output to avoid fucked up answers. Also, care about AI, they are often hallucinating really hard, even today. They can give you complete wrong answer, you tell them they are wrong, and they say "indeed, I suck, sorry - here's a new fucked up answer". You shouldn't 100% rely over AI answer, even if that can give sometimes legit answers, full code or just skeletons of ideas.   PPS : I don't think there are reliable ressources regarding L2J itself, also most of the proposed code decays pretty fast if the source code is actually maintained (at least for aCis). Still, old coded customs for old aCis sources are actually a good beginner challenge to apply on latest source.
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock