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

'BSON message larger than MAX_MESSAGE_LENGTH' For Non-Content File #483

Open
sust4in opened this issue Aug 28, 2017 · 5 comments
Open

'BSON message larger than MAX_MESSAGE_LENGTH' For Non-Content File #483

sust4in opened this issue Aug 28, 2017 · 5 comments

Comments

@sust4in
Copy link

sust4in commented Aug 28, 2017

Hello people, i cant analyze any of bson logs. i changed the code little and tried to see error. and there is;

File:
image

netlog.py line - 78

I dont know why blen variable is really more than max_message_lenght without any content but just 'BSON'

    def read_next_message(self):
        data = self.handler.read(4) --------------- data : b'BSON'
        blen = struct.unpack("I", data)[0] ----------- blen: 1313821506
        if blen > MAX_MESSAGE_LENGTH:
            log.critical("BSON message larger than MAX_MESSAGE_LENGTH, "
                         "stopping handler.")
            return False

debug output:

BSON message larger than MAX_MESSAGE_LENGTH, stopping handler.
BSON message larger than MAX_MESSAGE_LENGTH, stopping handler.

BsonParser decoding problem bad eoo on data[:50] b'\n\xe4\x00\x00\x00\x10I\x00\x00\x00\x00\x00\x02name\x00\x0c\x00\x00\x00__process__\x00\x02type\x00\x05\x00\x00\x00info\x00\x02'

@doomedraven
Copy link
Contributor

no hash no happens :P

@sust4in
Copy link
Author

sust4in commented Aug 28, 2017

I dont really understand. all process logs has 'BSON' string on their first 4 chars.
after the logs fullfilled, cuckoo logs same errors. Just 'BSON' lenght cant be 1313821506 bits

it can be encode or decode error, something that conflicting with index lenght.

@doomedraven
Copy link
Contributor

can you share sample? it looks like it report with wring package header

@sust4in
Copy link
Author

sust4in commented Aug 28, 2017

before the example,
extra info would be good.

  • i am in debug mode on cuckoomon,
    image

  • is cuckoo decoding .log files into .bson inside the pipe or just analysis process .log files? (i cannot see any .bson file after i debugged cuckoomon, just .log extension exist.)
    i am trying to debug from behaviour.py for getting BsonParser into work.

  • before the fully sending example. the full results looks like this.
    image

i also found this similar cuckoosandbox/cuckoo#520

@doomedraven
Copy link
Contributor

you need to check how logging working, it start netlogger and send bson data, and you answered your question in second part

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

2 participants