-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Matching similar squences seems limited #13
Comments
This seems intentional, at least from the code point of view. When sniff() finds a previous attempt it only supports a single previous attempt in the for loop and breaks when one is found. Would have to change attempt to be a list and iterate through them for your similar sequences configuration to operate.
|
When a port was used in multiple sequences, only the first instance in the first sequence was honored due to the for loop breaking out once found. Updated it populate a linked list and then loop round the found attempts to check for validity.
Have crafted a fix in my fork. |
Hi, wanted to verify your fix, but unfortunately the current 0.7.7 version does not compile for me on Centos 6.7. I will open a separate ticket for that. |
Will take a look at this later tonight. P. On December 16, 2015 4:16:35 AM EST, jalbstmeijer notifications@github.com wrote:
Spam detection software, running on the system "pootle.flumps.org", Content preview: Will take a look at this later tonight. P. On December 16,
Content analysis details: (4.0 points, 3.0 required) pts rule name description 1.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. |
You should be able to compile it now from my fork. Makefile parameters updated so you don't have to set the CFLAGS variable manually. Have a queued push request to bring that back into master. |
Tested 0.7.7, but I don't seem to be able to trigger any sequence now. Sequence comes in, but does not seem to be recognized. knock -d5 1.2.3.4 2001 2002 2003 2011knockd -D -v -i eth0config: new section: 'options' |
now tested 0.7.8, seems to work now and main issue seems to be fixed. [2016-01-19 21:04] XXX: sequence1: Stage 1 [2016-01-19 21:04] XXX: sequence1: Stage 1 [2016-01-19 21:04] XXX: sequence1: Stage 1 [2016-01-19 21:04] XXX: sequence1: Stage 1 |
Hi Judd, Can we close this one out now please? P. |
Hi,
It seems that matching sequences is very linear and will not match when sequences start in a similar way.
Is this a feature or bug?
Gr, J
with the following config:
[sequence1]
sequence = 2001,2002,2003,2011
seq_timeout = 15
tcpflags = syn
start_command = date
[sequence2]
sequence = 2001,2002,2003,2012
seq_timeout = 15
tcpflags = syn
start_command = date
[sequence3]
sequence = 2001,2002,2003,2013
seq_timeout = 15
tcpflags = syn
start_command = date
[sequence4]
sequence = 2001,2002,2003,2014
seq_timeout = 15
tcpflags = syn
start_command = date
and the following actions:
knock -d5 123.123.123.123 2001 2002 2003 2011
knock -d5 123.123.123.123 2001 2002 2003 2012
knock -d5 123.123.123.123 2001 2002 2003 2013
knock -d5 123.123.123.123 2001 2002 2003 2014
I see:
[2014-11-12 15:26] 54.72.48.222: sequence1: Stage 1
[2014-11-12 15:26] 54.72.48.222: sequence2: Stage 1
[2014-11-12 15:26] 54.72.48.222: sequence3: Stage 1
[2014-11-12 15:26] 54.72.48.222: sequence4: Stage 1
[2014-11-12 15:26] 54.72.48.222: sequence1: Stage 2
[2014-11-12 15:26] 54.72.48.222: sequence1: Stage 3
[2014-11-12 15:26] 54.72.48.222: sequence1: Stage 4
[2014-11-12 15:26] 54.72.48.222: sequence1: OPEN SESAME
[2014-11-12 15:26] sequence1: running command: date
[2014-11-12 15:26] 54.72.48.222: sequence1: Stage 1
[2014-11-12 15:26] 54.72.48.222: sequence2: Stage 1
[2014-11-12 15:26] 54.72.48.222: sequence3: Stage 1
[2014-11-12 15:26] 54.72.48.222: sequence4: Stage 1
[2014-11-12 15:26] 54.72.48.222: sequence1: Stage 2
[2014-11-12 15:26] 54.72.48.222: sequence1: Stage 3
[2014-11-12 15:26] 54.72.48.222: sequence1: Stage 1
[2014-11-12 15:26] 54.72.48.222: sequence2: Stage 1
[2014-11-12 15:26] 54.72.48.222: sequence3: Stage 1
[2014-11-12 15:26] 54.72.48.222: sequence4: Stage 1
[2014-11-12 15:26] 54.72.48.222: sequence1: Stage 2
[2014-11-12 15:26] 54.72.48.222: sequence1: Stage 3
[2014-11-12 15:26] 54.72.48.222: sequence1: Stage 1
[2014-11-12 15:26] 54.72.48.222: sequence2: Stage 1
[2014-11-12 15:26] 54.72.48.222: sequence3: Stage 1
[2014-11-12 15:26] 54.72.48.222: sequence4: Stage 1
[2014-11-12 15:26] 54.72.48.222: sequence1: Stage 2
[2014-11-12 15:26] 54.72.48.222: sequence1: Stage 3
The text was updated successfully, but these errors were encountered: