mirror of
https://github.com/Oxbian/SIDPS.git
synced 2025-07-06 20:05:42 +02:00
feat: idps + détection scan TCPConnect, SynScan
This commit is contained in:
8
idps/rules/TCP/Scan/synscan.py
Normal file
8
idps/rules/TCP/Scan/synscan.py
Normal file
@ -0,0 +1,8 @@
|
||||
# Seuils
|
||||
TIME_WINDOW = 180
|
||||
NB_SEUIL = 5
|
||||
|
||||
|
||||
def rule(packet, tcp_packets):
|
||||
if (tcp_packets.count_packet_of_type("RA", TIME_WINDOW) + tcp_packets.count_packet_of_type("SA", TIME_WINDOW)) + tcp_packets.count_packet_of_type("R", TIME_WINDOW) >= NB_SEUIL:
|
||||
print(f"Alerte, seuil dépassés, risque de SynScan")
|
8
idps/rules/TCP/Scan/tcpconnectscan.py
Normal file
8
idps/rules/TCP/Scan/tcpconnectscan.py
Normal file
@ -0,0 +1,8 @@
|
||||
# Seuils
|
||||
TIME_WINDOW = 180 # 180 secondes pour avoir X paquets
|
||||
NB_SEUIL = 5
|
||||
|
||||
|
||||
def rule(packet, tcp_packets):
|
||||
if (tcp_packets.count_packet_of_type("A", TIME_WINDOW) + tcp_packets.count_packet_of_type("RA", TIME_WINDOW)) >= NB_SEUIL:
|
||||
print(f"Alerte, seuils dépassés, risque de TCPConnectScan")
|
Reference in New Issue
Block a user