Other Log Sources Part 1
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
Already have an account? Sign In »
2 hours 5 minutes
hello and welcome back to the course, identifying Web attacks through logs.
In the last video, we talked about cross site scripting request forgery.
In this video, we'll see some other sources of locks.
Let's start with a learning objectives of this video.
The learning objectives of this video are toe learn about other sources of Long's that could help to identify attacks and some of the network attacks that can affect Web applications.
Here we have some examples of other sources of logs,
packets, the firewall network, bandwidth usage, CPU and memory usage and intrusion prevention system and Web application firewalls.
Do you remember this picture
here? We have a topology of infrastructure that could support a Web application.
Remember that all these components consent information in the form of logs or graphs and can help in identifying the attack.
Let's talk about two attacks
S y n Flood and http Flood.
The first is a network attack. In the second is a Web application attack.
Both types of flood attacks. Try the same thing
to consume all the network or the Web server Resource is,
if this happens, it can cause a delay of service in the Web applications
and s y in flood can happen because of the three way handshake.
The component received the S y N, and you try to complete the three way handshake,
but it will never happen,
So the connection is just not established.
All these connection attempts will be on the server or network equipment memory,
more memory consumed.
So the component gets flooded by connection attempts
for the http flood. The three way handshake is completed, but the Web server will receive a lot of requests.
Depending on the size of the servers and the number of the requests,
the Web application can be impacted.
That's why it's important to understand these types of attacks.
let's analyze some locks.
Check this log. Can you identify any key components? Is it similar to the Web application logs?
Here we have an example of a firewall log. This is a firewall for our lab.
The firewall is a component that handles network connections, so it's log is gonna be a little different from the Web servers.
Let's analyze this log together.
First. You have the date and time, followed by an I P address.
In this case, it's the i p address of the firewall
after you have some numbers. In a word, TCP
remember, we have UDP and TCP connections.
In this case, it's a TCP connection.
You have another number and one I p. Address
this I p address is from the source computer. In our case, the attacker
The second i p address is the Web server address.
The number 80 is the http port.
It could be 443 for https
and you have a s.
This s letter is the identifier of the S y n flag from TCP.
If you were to check the other lines, you would see that these fields that we talked about would be the same.
Depending on the firewall and the web server capacity,
they can handle a lot of connections, sometimes thousands of connections in the same second,
depending on the environment.
The entire ER therefore might need to generate a lot of connections. But the behavior will be the same.
An uncommon number of connections from the same IP Onley sending the s y n flag.
Can you think in one of the attacks that we saw that is similar to this one?
One of the attacks is the brute force Attack.
The S Y in flood is like a brute force attack. But the objective is to make the application unavailable.
One more thing.
Do you remember our questions of who? What, and when
we'll hear the fields can help in answering these questions.
Date and time I p addresses and the what is the connection?
TCP port 80 with the S y n flag.
let's talk about the Web server.
Which laws will be shown on the Web server?
In this case, we won't have any log from the Web server.
Remember that we restart the Web server log after the TCP through a handshake, and the S y N flood will not establish the connection. So
no, http requests
Do you remember that the TCP connection is a job of the operational system?
Normally, the operational systems have a command to check the connections.
This command is net stat.
It will show the status of the connections
if you check the result of the net step commands during an S y n flood a tag.
Will you see a lot of S Y N requests?
It will say that it received the S y n like in this picture.
You can see in this picture that we have the Web server. I peep. And the http port 80 and another i p with a lot of different ports.
This means that the operational system is waiting for the other side to complete the connection.
Now we will see http Flood and compare it with an S y n flood attack.
Again, we have the firewall logs. We have the same components
date and Time firewall I p Source I p server I p and deport 80.
We also have the letter s. But in this case, we have a difference.
We have a s slash a c k. Within. Okay.
This means that the TCP through a handshake was completed.
So since we have the connection, let's check the web server logs.
Now check this Web server log.
Try to identify a malicious behavior.
If you want to pause the video for a while, that's okay.
Let's analyze the web server logs together. We have the Web server I P. Date and time. Http Method. The requested file http version
status, code size and the user agent
the Web server log is okay. The point here is the number of requests and the many errors.
If you check the requested files, it doesn't make sense. A large number that results in an error.
Http. Status code 400 means bad request.
Why would someone send a lot of errors? Usually users get upset with errors.
here we have the same source. A lot of errors
and a small period of time and some random requested files.
In this case, we haven't. Http, Flood and again, depending on the size of the Web server, the attacker might need a lot of request to get the Web server and the web application down
in this example. We have the era the 400.
But http flood can result in another status code like 500 or 200.
It all depends on the requests.
Basically, the most important factor is the number of the requests.
If you notice that there is a higher number of requests more than normal,
maybe you have a flood.
So what do you think will happen if we use the nets that command during an http flood?
We should have ah, lot of lines, but
now we have the word established.
That means that the TCP connection was established. That's why we have the Web server locks
on the previous slide. We said that flood attacks try to consume all the resource is of the machine.
Well, here we can see the CPU usage from the firewall.
You can see on both graphs that the CPU usage percentage raised a lot and really fast. In the first graph, we have a few moments of high CPU usage. In the second graph, we have the same two periods of high CPU usage.
But we can see another increase in the CPU usage
during the period of high CPU usage. Since the Web servers after the firewall, the Web application was down.
This means that the denial of service attack was successful.
We can see the same behavior on the network band with graph. It goes from kilobits two megabits.
let me show you some directions To identify the flood attacks,
watch out for send requests many requests from the same source in a small period of time, a rapid increase of CPU, or bandwidth usage. Many seen requests without establishing through a handshake,
uncommon or random requests on the Web server log. Or if your Web application is simply slow or stop toe work,
don't forget to check the user agent,
since you need to send a lot of corrected http packets,
it's better to use auto.
Also, remember, the attacker can change the user agent.
This lesson continues in the next video.