Wazuh & Snort
Wazuh & Snort
4. Once we done set interface snort ready install and verify snort version
5. Now the set the ip address in snort.conf
• Open with Nano or vim /etc/snort/snort.conf
8. Next lets set the rule alert if someone ping ip address get from snort..
• Open with nano or vim /etc/snort/rules/local.rules
9. Inside the rule lets create ( alert tcp any any -> $HOME_NET any (msg: “ICMP
DETECTED” rev:1000001; rev:1;)
14. First install wazuh agent machine were you install snort only we can able
logs message :
• To install agent (wget
https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-
agent/wazuh-agent_4.11.1-1_amd64.deb)
• sudo dpkg -i wazuh-agent_4.11.1-1_amd64.deb
• Now set the wazuh server ip address to wazuh-agent machine of snort
• Open with nano or vim /var/osses/etc/ossec.conf
• Inside wazuh there MANAGER IP ADDRESS WORD remove it and set
the wazuh server ip
• Next lets set the rule to configure Snort logs to wazuh server
• Nearby down log analyse
<localfile>
<log_format>syslog</log_format>
<location>/var/log/snort/alert</location>
</localfile>
18. Open kali machine with root user and type msfconsole:
19. Next search eternalblue and set use 0
• Inside exploit set rhosts ip of windows 7 machine and next give exploit
20. Before attacking machine set the rules in snort machine detect alert
messages smb attack detected and warning
21. Lets set this: open the browser go-to snort.org -Downloads-rules-extract it
23. Now lets jump in to snort machine set the above the rule:
24. Save and exit and run one more time Test configuration success or
error(Snort -T -i ens33 -c /etc/snort/snort.conf)it has successfully
configuration ..Rule has been set work fine..
25. Now lets jump to kali machine attack eternalblue to windows 7
26. Warning (Before when exploiting machine we need run background snort
configure ON (snort -q -l /var/log/snort -A console -I ens33 -c
/etc/snort/snort.conf)this rule ON. Because only that will be get the alert
notification log:)
Above the Metasploit it has been exploit and check snort machine alert and
notification:
Now lets check the logs:
https://snort.org/
<localfile> -- wazuh-agent
<log_format>syslog</log_format>
<location>/var/log/snort/alert</location>
</localfile>
https://youtu.be/U6xMp-MIEfA?si=SIjdETaHw-iPhuGT
https://youtu.be/RzF5-fVz7Oc?si=qJzLghFzqk9GezL2)