Project

General

Profile

Actions

Bug #2094

open

luajit: SCFlowvarGet always returns null

Added by Chris Knott about 7 years ago. Updated over 2 years ago.

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

Description

Scenario: I want to manipulate a flow variable that I've extracted with a PCRE with a Lua script. Whenever I call the SCFlowvarGet method in the Lua script it returns "null" and not the value of the flow variable as it should.

Attached you can find the files that I am using (PCAP, rules, lua).
I'm using the following Suricata call:
suricata -v -r /home/suricata/test.pcap -S /etc/suricata/rules/test.rules -k none

As you can see out of the resulting eve.json file (attached) the rule works and also the variable is extracted. Furthermore the lua script is triggered and executed as the print commands of the lua script are in the console output. Also you can see in the console output that the "testVar" is not set (in my opinion it should be set there). It this a bug or am I doing something wrong in the script?


Files

test.pcap (1.74 KB) test.pcap PCAP file for the test Chris Knott, 04/12/2017 09:01 AM
test.lua (313 Bytes) test.lua lua script for the test Chris Knott, 04/12/2017 09:02 AM
test.rules (120 Bytes) test.rules rules file for the test Chris Knott, 04/12/2017 09:02 AM
eve.json (4.14 KB) eve.json resulting eve.json after the test run Chris Knott, 04/12/2017 09:05 AM
console_out.txt (2.06 KB) console_out.txt console output of suricata Chris Knott, 04/12/2017 09:08 AM
Actions

Also available in: Atom PDF