Project

General

Profile

Actions

Feature #5676

open

ASN1 Spec to Rust nom generator

Added by Philippe Antoine about 2 years ago. Updated 4 months ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
Effort:
Difficulty:
Label:

Description

to be used for SNMP, Kerberos, Bacnet...


Related issues 3 (3 open0 closed)

Related to Suricata - Task #5488: Suricon 2022 brainstormAssignedVictor JulienActions
Related to Suricata - Feature #5675: protocol: MMS SCADA supportNewCommunity TicketActions
Related to Suricata - Feature #6461: ics protocol: bacnetNewCommunity TicketActions
Actions #1

Updated by Philippe Antoine about 2 years ago

  • Related to Task #5488: Suricon 2022 brainstorm added
Actions #2

Updated by Philippe Antoine about 1 year ago

Actions #3

Updated by Philippe Antoine about 1 year ago

Actions #4

Updated by Victor Julien 4 months ago

What is the purpose of this ticket? Can you add a bit more detail?

Actions #5

Updated by Philippe Antoine 4 months ago

Victor Julien wrote in #note-4:

What is the purpose of this ticket? Can you add a bit more detail?

Many protocols such as SNMP, LDAP, kerberos... have a spec describing the messages in ASN1.
It is possible to do a program that compiles this ASN1 into rust code using nom

For instance snmpv2 ans is here https://www.rfc-editor.org/rfc/rfc3416#section-3

   PDUs ::= CHOICE {
        get-request      GetRequest-PDU,
        get-next-request GetNextRequest-PDU,
        get-bulk-request GetBulkRequest-PDU,
        response         Response-PDU,
        set-request      SetRequest-PDU,
        inform-request   InformRequest-PDU,
        snmpV2-trap      SNMPv2-Trap-PDU,
        report           Report-PDU }

should become a rust enumeration and

GetRequest-PDU ::= [0] IMPLICIT PDU

should tell us that value 0 should be parsed as `PDU` (which is described afterwards...)

Actions #6

Updated by Philippe Antoine 4 months ago

Does that answer the question ?

Actions

Also available in: Atom PDF