LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Snort alerts on Web Server (https://www.linuxquestions.org/questions/linux-newbie-8/snort-alerts-on-web-server-4175736062/)

lvelazquez 04-15-2024 06:47 PM

Snort alerts on Web Server
 
Hi, I´m Leonardo, I'm new in this community.

I'm working on Centos 7 in a VM, I set up snort-2.9.16, I configured rules for detect HTTP, ICMP, FTP and SSH traffic.

I want these alerts appear in my web server.

I investigated and I tried to configure syslog but it doesn´t work. Can you help me?.

JJJCR 04-15-2024 08:31 PM

check out links below:
https://www.securityarchitecture.com...nort-on-linux/

https://docs.nxlog.co/integrate/snor...0packet%20data.

Have you explored: /var/log/snort

yancek 04-16-2024 07:07 AM

If you aren't able to resolve your problem using the links in post 2, post more details on what configuration you did so that someone familiar with snort will be able to assist. Much more detail is needed than 'it doesn't work'.

lvelazquez 04-16-2024 10:00 AM

Thanks JJJCR, I'm checking the links

lvelazquez 04-16-2024 11:59 AM

In order to understand what I'm trying to do I explain it more detailed:

I have 2 VMs with CentOS 7, I installed and set up snort-2.9.16 in one and I configured rules for detect HTTP, ICMP, FTP and SSH traffic.

Let's see how it works:

I wrote in my VM client:
[root@localhost gvelazquez]# curl 172.20.0.2
<html>
<title> Snort Logs </title>
<body> <h1> These are the snort logs </h1>
</body>
</html>

And in my VM Server (Where snort it's installed) I can see these messages:

[root@srvcentos etc]# snort -A console -q -u snort -u snort -c /home/lvelazquez/Downloads/snort-2.9.16/etc/snort.conf -i enp0s8
04/16-10:41:17.188144 [**] [1:10000040:1] HTTP Traffic Detected [**] [Priority: 0] {TCP} 172.20.130.254:36830 -> 172.20.0.2:80
04/16-10:41:17.189102 [**] [1:10000040:1] HTTP Traffic Detected [**] [Priority: 0] {TCP} 172.20.130.254:36830 -> 172.20.0.2:80
04/16-10:41:17.189116 [**] [1:10000040:1] HTTP Traffic Detected [**] [Priority: 0] {TCP} 172.20.130.254:36830 -> 172.20.0.2:80
04/16-10:41:17.191968 [**] [1:10000040:1] HTTP Traffic Detected [**] [Priority: 0] {TCP} 172.20.130.254:36830 -> 172.20.0.2:80
04/16-10:41:17.192491 [**] [1:10000040:1] HTTP Traffic Detected [**] [Priority: 0] {TCP} 172.20.130.254:36830 -> 172.20.0.2:80
04/16-10:41:17.193620 [**] [1:10000040:1] HTTP Traffic Detected [**] [Priority: 0] {TCP} 172.20.130.254:36830 -> 172.20.0.2:80


172.20.0.2 is the Ip address of my web server, I want to see these messages in my web server, but I don't know how to do it. I know that the logs of snort are in /var/log/snort so first I thought in just forwarded these logs like this:

cat /var/log/snort > /var/www/html/index.html

(/var/www/html/index.html is the path of where my web server is)

it didn't work, the web server was just filled with symbols, and nothing could be read, and the most appropriate thing would be for snort to write in index.html but I don't know how.

Can you help me?

friendlysalmon8827 04-18-2024 07:48 PM

Would the OP please further explain the reason for this exercise? Is this related to a educational endeavor or a business type situation?


All times are GMT -5. The time now is 04:56 PM.