Skip to content

Automatic Lookback on Events

CYBERQUEST exposes functionalities for looking back into events, in order to trace and cross correlate new information with past received information. For this particular purpose, Data Transformation Service exposes the following methods, which can be used when creating a script:

Alert class:

  • Create
    template:"template name",
    logs: ["<<Events as json string>>"],
    name: "alert name",
    emails:"emails to send",
    description: "alert description",
    secLevel: 8,
    secScore: 80,
    metaData:"metadate extra"
  • CreateSimple
    logs: ["<<Events as json string>>"],
    GeneratedTime: moment().format('YYYY-MM-DD HH:mm:ss.SSS'),
    IsAlert: "1",
    AlertSecurityLevel: 9,
    AlertSecurityScore: 90,
    AlertName: "alert name",
    TemplateName: "",
    Description: "alert description",
    Why: metaData,
    Category: "Security-test",
    SubCategory: "Sub Security-test",
    Tenant: "Tenant-test",
    MitreID: "MitreID-test"

Events class:

getCount (query, days = 0) // returns the number of matches for a particular query. The query could be any query string. Please refer to the query syntax.
getBackLogs (query, days = 0, maxcount = 100) // returns the events based on the query, ordered descending by localtime, maxcount of events.

These methods can be used by accessing the Rules > DTS Objects section, adding an object and creating a custom script. The syntax presented below can be used together with the informaton from the Threat Intelligence Source. In this way, each new Indicator of Compromise (IOC) is validated against the backlog and if events are found with those malitious IP addresses an alert can be raised:

let query = "SourceIP: OR DestinationIP:";

let numberOfEvents = Events.getCount(query, 30);

if (numberOfEvents > 2) {

    let cqEvents = Events.getBackLogs(query, 30);

        emails:",", // separated by comma
        name:"Alert created by DTS for backEvents",
        description: "alert description",
        secLevel:5, // security level (between 1-10) 
        secScore:10 // security score (between 1-100)

You can access the following link to see how to create a DTS alert.