首页 > 其他分享 >Wazuh自定义decoder实例

Wazuh自定义decoder实例

时间:2023-06-15 19:45:16浏览次数:42  
标签:AC 12 自定义 FW Wazuh decoder +. AV Evt

 

样本日志:

IPS:
Mar 10 17:12:34 XX-Internet-IPS1-R03-25U IPS: SerialNum=23139121998 GenTime="2023-03-10 17:12:34" SrcIP=23.10.156.214 SrcIP6= SrcIPVer=4 DstIP=120.26.160.74 DstIP6= DstIPVer=4 Protocol=TCP SrcPort=65443 DstPort=443 InInterface=xge1/1 OutInterface=xge1/2 SMAC=f0:a2:b8:8c:93:07 DMAC=00:1c:54:ff:08:2e FwPolicyID=1 EventName=TCP_远程控制软件_hello_V9_建立控制连接 EventID=152328230 EventLevel=2 EventsetName=new_all SecurityType=安全审计 SecurityID=11 ProtocolType=HTTPS ProtocolID=51 Action=PASS Vsysid=0 Content="数据长度=1350;TCP数据内容=5e;TCP目的端口=65443;" CapToken= EvtCount=1


Mar 16 15:46:51 XX-Internet-IPS1-R03-25U IPS: SerialNum=2311998 GenTime="2023-03-16 15:46:51" SrcIP=23.10.156.66 SrcIP6= SrcIPVer=4 DstIP=10.38.48.254 DstIP6= DstIPVer=4 Protocol=FTP SrcPort=53767 DstPort=21 InInterface=xge1/1 OutInterface=xge1/2 SMAC=f0:a2:b8:8c:93:07 DMAC=00:1c:54:ff:08:2e FwPolicyID=1 EventName=FTP_口令弱 EventID=169225718 EventLevel=2 EventsetName=new_all SecurityType=脆弱口令 SecurityID=24 ProtocolType=FTP ProtocolID=12 Action=PASS Content="username=anonymous;password=******" EvtCount=1


防毒墙:
<156>utm_event: devid=4 date="2023/06/12 11:21:38" dname=HZH-AV-M logtype=7 pri=4 ver=0.3.0 user="" mod=av eventtype=AV eventname="僵尸网络 [疑似]僵尸网络" severity=高 dsp_msg="[疑似]僵尸网络" protocol=TCP srcaddr=23.34.60.8 srcport=46568 destaddr=59.82.120.227 destport=443 srcregion="HOST" destregion="CN-中国" app=TCP:443 repeated=1 eventdetails="" action=通过 if="" fwlog=0


WAF:
<902>Jun 12 10:49:23 LJ_DMZ_WAF_R06_34U WAG: SerialNum=2213342106039998 GenTime="2023-06-12 10:49:23" Module=HTTP_认证请求 SrcIP=23.231.117.94 DstIP=10.32.64.28 SrcPort=10665 DstPort=80 In=ge0/1 Out=ge0/2 Action=pass URL="vjoin.landspace.com:48880/seeyonjoin/main/login" Content="用户名称=;URL=/seeyonjoin/main/login;HOST=vjoin.landspace.com:48880;Body_Data=login_username=13810487986&login_password=v12345678&login.code=129835;" EvtCount=1 Evt_level=10 Evt_type=网页爬虫 Evt_log_level=6 Host=vjoin.landspace.com:48880 Evt_response=0 BeforeNat= Method=POST



上网行为:
<6>Jun 12 11:24:06 LJ-JX-ACM-M;550101300120120901622684;ipv4;3; statistic_traffic: user_name=23.33.63.178;ugname=anonymous;umac=F4:1D:6B:98:09:C7;uip=23.33.63.178;appname=飞书_视频语音;appgname=办公软件;up=1327920;down=272960;create_time=1686540240;end_time=1686540300


华为FW
<190>Jun 12 2023 11:20:51 LJ-YanFa-FW2-R04-14U %%01POLICY/6/POLICYDENY(l):vsys=public, protocol=17, source-ip=23.8.27.252, source-port=57975, destination-ip=192.203.230.10, destination-port=53, time=Jun 12 2023 11:20:51, source-zone=trust, destination-zone=untrust, application-name=, rule-name=default.

 

Wazuh decoder:

<decoder name="ips_log">
  <program_name>^IPS</program_name>
</decoder>

<decoder name="LJ_IPS_log">
  <parent>ips_log</parent>
    <regex type="pcre2">SerialNum=(\d+) GenTime="(.+?)" SrcIP=(\d+.\d+.\d+.\d+) SrcIP6= SrcIPVer=4 DstIP=(\d+.\d+.\d+.\d+) DstIP6= DstIPVer=4 Protocol=(\w+) SrcPort=(\d+) DstPort=(\d+) InInterface=([a-zA-Z0-9/]+) OutInterface=([a-zA-Z0-9/]+) SMAC=(\w+:\w+:\w+:\w+:\w+:\w+) DMAC=(\w+:\w+:\w+:\w+:\w+:\w+) FwPolicyID=(\d+) EventName=([^\s]*) EventID=(\d+) EventLevel=(\d+) EventsetName=([^\s]*) SecurityType=([^\s]*) SecurityID=(\d+) ProtocolType=(\w+) ProtocolID=(\d+) Action=(\w+)</regex>
    <order>SerialNum,GenTime,SrcIP,DstIP,Protocol,SrcPort,DstPort,InInterface,OutInterface,SMAC,DMAC,FwPolicyID,EventName,EventID,EventLevel,EventsetName,SecurityType,SecurityID,ProtocolType,ProtocolID,Action</order>
</decoder>


<!--WAF日志decoder-->
<decoder name="WAF_log">
  <program_name>^WAG</program_name>
</decoder>

<decoder name="LJ_WAF_log">
  <parent>WAF_log</parent>
    <regex type="pcre2">SerialNum=(\d+) GenTime="(.+?)" Module=([^\s]*) SrcIP=(\d+.\d+.\d+.\d+) DstIP=(\d+.\d+.\d+.\d+) SrcPort=(\d+) DstPort=(\d+) In=([a-zA-Z0-9/]+) Out=([a-zA-Z0-9/]+) Action=(\w+) URL="([^\s]*)" Content="([^\s]*)" EvtCount=(\d+) Evt_level=(\d+) Evt_type=([^\s]*) Evt_log_level=(\d+) Host=([^\s]*) Evt_response=([^\s]*) BeforeNat=([^\s]*) Method=(\w+)</regex>
    <order>SerialNum,GenTime,Module,SrcIP,DstIP,SrcPort,DstPort,InInterface,OutInterface,Action,URL,Content,EvtCount,Evt_level,Evt_type,Evt_log_level,Host,Evt_response,BeforeNat,Method</order>
</decoder>

<!--防毒墙日志decoder-->
<decoder name="LJ_AVFW_log">
  <prematch>^utm_event: </prematch>
    <regex type="pcre2">devid=(\d+) date="(.+?)" dname=(.+?) logtype=(\d+) pri=(\d+) ver=([^\s]*) user=\"\" mod=(\w+) eventtype=(\w+) eventname="(.+?)" severity=([^\s]*) dsp_msg="([^\s]*)" protocol=(\w+) srcaddr=(\d+.\d+.\d+.\d+) srcport=(\d+) destaddr=(\d+.\d+.\d+.\d+) destport=(\d+) srcregion="([^\s]*)" destregion="([^\s]*)" app=([^\s]*) repeated=(\d+) eventdetails="" action=([^\s]*)</regex>
    <order>AV_devid,AV_date,AV_dname,AV_logtype,AV_pri,AV_ver,AV_mod,AV_event_type,AV_event_name,AV_serverity,AV_dsp_msg,AV_protocol,AV_srcaddr,AV_srcport,AV_destaddr,AV_destport,AV_srcregion,AV_destregion,AV_app,AV_repeated,AV_action</order>
</decoder>

<!--上网行为管理日志decoder-->
<decoder name="LJ_AC_log">
  <prematch>^LJ-JX-ACM-M</prematch>
    <regex type="pcre2">user_name=(\d+.\d+.\d+.\d+);ugname=(\w+);umac=(\w+:\w+:\w+:\w+:\w+:\w+);uip=(\d+.\d+.\d+.\d+);appname=([^\s]*);appgname=([^\s]*);up=(\d+);down=(\d+);create_time=(\d+);end_time=(\d+)</regex>
    <order>AC_user_name,AC_ugname,AC_umac,AC_uip,AC_appname,AC_appgname,AC_up,AC_down,AC_create_time,AC_end_time</order>
</decoder>



<!--华为防火墙日志decoder-->
<decoder name="HW_FW">
  <prematch>^\w+\s+\d+\s+\d+\s+\d+:\d+:\d+\s+LJ-\S+-FW\S+\s+%%\d\d\S+/\d/\S+\(\w\):</prematch>
</decoder>

<decoder name="LJ_HW_FW">
  <parent>HW_FW</parent>
    <regex type="pcre2">vsys=(\w+), protocol=(\d+), source-ip=(\d+.\d+.\d+.\d+), source-port=(\d+), destination-ip=(\d+.\d+.\d+.\d+), destination-port=(\d+), time=(\w+\s+\d+\s+\d+\s+\d+:\d+:\d+), source-zone=(\w+), destination-zone=(\w+), application-name=, rule-name=(\w+)</regex>
    <order>FW_vsys,FW_protocol,FW_SRC_IP,FW_SRC_port,FW_DST_IP,FW_DST_port,FW_time,FW_SRC_Zone,FW_DST_Zone,FW_rule_name</order>
</decoder>

 

标签:AC,12,自定义,FW,Wazuh,decoder,+.,AV,Evt
From: https://www.cnblogs.com/bonjov1/p/17483917.html

相关文章

  • qt——自己手动添加菜单栏、工具栏(自定义菜单栏、工具栏的位置)
    参考:原文链接 不一定非要用QGroupBox,其他继承自widget的控件都可以我的实现: ......
  • Vue 中 组件通信 - 子传父(自定义事件)
    Vue中组件通信-子传父(自定义事件)Vue中组件通信-子传父(自定义事件)子传父步骤:在子组件的data里面定义好要传递的数据在子组件的模版里面正常使用该数据(一般是通过一定的动作,如点击,滑动等,来自定义事件向父组件传递,这里以click为例)在子组件的methods里面定义this.$......
  • elementui 输入框 自定义图标
    <el-form-itemprop="visitorpath"><el-inputv-model="formData.visitorpath":placeholder="t('EnterName')"class="input-wit......
  • springboot 自定义listener 添加环境变量。 抄的springboot项目去掉了一些不用的ja
    1.自定义listener实现 ApplicationListener<ApplicationEnvironmentPreparedEvent>,Ordered(如果要设置优先级可以实现Ordered接口,注意order值越小优先级越高)publicclassMyListenerimplementsApplicationListener<ApplicationEnvironmentPreparedEvent>,Ordered{......
  • 搜狗五笔 date 自定义时间格式
    搜狗五笔date自定义时间格式 搜狗五笔date默认打出的是“2023-6-15”,如果需要“2023-06-15”,则需要在自定义短语中设置 属性设置-高级-找到“自定义短语”旁边的"设置"按钮,点击“设置”。点击“添加新定义”:缩写输入:date下面输入框输入:#$year-$month_mm-$day_dd保存......
  • 界面控件DevExtreme UI组件——增强的自定义功能
    在本文中,我们将回顾DevExtremeUI组件在v22.2版本主要更新中一系列与自定义相关的增强。DevExtreme拥有高性能的HTML5/JavaScript小部件集合,使您可以利用现代Web开发堆栈(包括React,Angular,ASP.NETCore,jQuery,Knockout等)构建交互式的Web应用程序。从Angular和Reac,到ASP.NETCore......
  • Vue自定义校验
    age:[{required:true,message:'请输入年龄',trigger:'blur'},{validator:(rule,value,callback)=>{if(value>=18){callback();}else{callback(newError("教练年龄必须大于18周岁"));}}......
  • SpringBoot使用自定义的logback日志
    1.介绍描述:主要由三个模块构成logback-core:核心代码块(不介绍)logback-classic:实现了slf4j的api,加入该依赖可以实现log4j的api。logback-access:访问模块与servlet容器集成提供通过http来访问日志的功能(也就是说不需要访问服务器,直接在网页上就可以访问日志文件,实现HTTP访问......
  • SpringBoot使用自定义日志注解,配置切面
    1.使用技巧以下是需要注意的部分:在环绕通知中使用ProceedingJoinPoint,控制目标方法的运行。在其他通知类型中使用JoinPoint。如果使用JoinPoint则必须位于参数的第一位。ProceedingJoinPoint中有特殊的方法proceed()。当有多个切面时,使用@Order(11)来指定注解的优先级。......
  • 自定义配置文件
       ......