[Zeek] Need help splitting HTTP log

Jorge Garcia Rodriguez jgarciar at sia.es
Mon Jun 29 01:03:15 PDT 2020


Hi everyone!

Im trying to Split the http logs in two.

What I want to accomplish is that when the http event tags have the "URI_SQLI", instead of being logged in the normal http.log I want it to be logged in a new http-sqli.log.

I have tried a lot of different ways but with no success, since this is the very first script that im writing for Zeek.

This is one of the ways that i´ve tried:

event zeek_init()
        {
        Log::remove_default_filter(HTTP::LOG);
        Log::add_filter(HTTP::LOG, [$name = "http-sqli",
                                    $path_func(id: Log::ID, path: string, rec: HTTP::Info) = {
                                        return ([URI_SQLI] in c$http$tags ? "http-sqli" : "http");
                                    }]);
                               }

The problem here seems that I cannot refer properly to the "tags" field.

Thanks for your time.

Regards!

Jorge García Rodríguez
Technical Consultant
Security Infrastructures
jgarciar at sia.es<mailto:jgarciar at sia.es>
Grupo SIA
Avda.Europa,2 - Alcor Plaza, Edificio B - Parque Oeste Alcorcón
28922 Alcorcón - Madrid
Tlf: +34 902 480 580<nxphone:+34%20902%20480%20580>   Fax: +34 91 307 79 80<nxphone:+34%2091%20307%2079%2080>
www.siainternational.com<http://www.siainternational.com/>
delivering value
This e-mail and any attached files are intended solely for the addresse/s identified herein. It may contain confidential and/or legally privileged information and may not necessarily represent the opinion of SIA.
No legally binding commitments will be created by this E-mail message. Where we intend to create legally binding commitments these will be made through hard copy correspondence or documents. If you receive this message by mistake, please immediately notify the sender and delete it since you are not authorized to use, disclose, distribute, print or copy all or part of the contained information Thank you. It is understood that the message was sent to you accidentally, although you appear as the addressee, you can see from the frame of existing relations that you were not the final addressee.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/zeek/attachments/20200629/429ee90a/attachment.html 


More information about the Zeek mailing list