Skip to content

Trouble understanding fuzzing with callbacks #579

Answered by cq674350529
NikolaiT asked this question in Q&A
Discussion options

You must be logged in to vote

@NikolaiT As far as I know, you can do it like this.

def callback(target, fuzz_data_logger, session, node, edge, *args, **kwargs):
    answer = target.recv(1024)
    if answer == 'good':
        answer_value = answer[5:]
        # proceed fuzzing with answer_value
        
        # you can almost get anything you have defined with `node` parameter, maybe and `session` parameter
        node.names['answer']._value = answer_value    # update the value

    return node.render()

s_initialize('msg1')
s_static("aaa", name="answer")    # to get this primitive easily later
s_byte(0xab, fuzzable=True)

session.connect(s_get('msg1'), callback=check_auth)

I used to do it like this way, but I'm not…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by SR4ven
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #306 on December 04, 2021 22:54.