mirror of
https://github.com/andreacristaldi/DefenderRuleParser
synced 2026-06-16 13:55:00 +00:00
53 lines
1.5 KiB
C#
53 lines
1.5 KiB
C#
using System.Collections.Generic;
|
|
|
|
namespace DefenderRuleParser2.Models
|
|
{
|
|
public class Threat
|
|
{
|
|
public string ThreatName { get; set; }
|
|
public long BeginPosition { get; set; }
|
|
public long EndPosition { get; set; }
|
|
|
|
public Dictionary<string, long> SignatureStats { get; set; } = new Dictionary<string, long>();
|
|
public List<SignatureEntry> Signatures { get; set; } = new List<SignatureEntry>();
|
|
}
|
|
|
|
public class SignatureEntry
|
|
{
|
|
public string Type { get; set; }
|
|
public long Offset { get; set; }
|
|
public List<string> Pattern { get; set; } = new List<string>();
|
|
public bool Parsed { get; set; } = false;
|
|
|
|
|
|
public string ConditionType { get; set; }
|
|
public int? ConditionValue { get; set; }
|
|
|
|
|
|
public SignatureLogic Logic { get; set; }
|
|
|
|
|
|
public List<SubSignature> SubSignatures { get; set; } = new List<SubSignature>();
|
|
}
|
|
|
|
public class SignatureLogic
|
|
{
|
|
public int Threshold { get; set; }
|
|
public List<SubRuleLogic> SubRules { get; set; } = new List<SubRuleLogic>();
|
|
}
|
|
|
|
public class SubRuleLogic
|
|
{
|
|
public string Pattern { get; set; }
|
|
public int Weight { get; set; }
|
|
public byte Control { get; set; }
|
|
}
|
|
|
|
public class SubSignature
|
|
{
|
|
public string Type { get; set; }
|
|
public List<string> Pattern { get; set; } = new List<string>();
|
|
public bool Parsed { get; set; } = false;
|
|
}
|
|
}
|