Skip to content
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

Skips some HTTP requests for some reason #9

Open
v0s opened this issue May 21, 2020 · 0 comments
Open

Skips some HTTP requests for some reason #9

v0s opened this issue May 21, 2020 · 0 comments

Comments

@v0s
Copy link

v0s commented May 21, 2020

Noticed that justniffer drops some requests, supposedly those that weren't correctly closed.

Example:
https://vos.uz/f/t/1.pcap — drops this request
https://vos.uz/f/t/2.pcap — parses this one fine

NIDS state transition on a normal stream: 7 → 1 → 2 → 2 → 3 (NIDS_CLOSE)
On a buggy stream: 7 → 1 → 2 → 2 → 6 (NIDS_EXITING)

I also noticed that -t (bool handle_truncated) isn't used anywhere. Perhaps NIDS_EXITING should be handled like that:

diff --git a/src/formatter.cpp b/src/formatter.cpp
old mode 100644
new mode 100755
index 7f45024..aff0342
--- a/src/formatter.cpp
+++ b/src/formatter.cpp
@@ -60,6 +60,9 @@ void parser::nids_handler(struct tcp_stream *ts, void **yoda, struct timeval* t,
                        }
                        break;
                case NIDS_EXITING:
+                       if (theOnlyParser->handle_truncated) {
+                               theOnlyParser->process_timedout_connection(ts, t, packet);
+                       }
                    break;
                case NIDS_OPENING:
                        theOnlyParser->process_opening_connection(ts, t, packet);

I didn't look into the architecture though, this one outputs the postponed line after all the other ones of the dump file, out of order

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant