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

Insert md5 options may cause the packet length reach up MTU size #30

Open
Nefurtity opened this issue Feb 24, 2018 · 0 comments
Open

Insert md5 options may cause the packet length reach up MTU size #30

Nefurtity opened this issue Feb 24, 2018 · 0 comments

Comments

@Nefurtity
Copy link
Contributor

Nefurtity commented Feb 24, 2018

When send_insertion_packet() function handles a full-sized packet with INS_DISC_MD5 flag on, send the insertion packet will cause a "Message too long" error, since the the packet length is greater than MTU size.

if (flags & INS_DISC_MD5) {
    u_char bytes[20] = {0x13,0x12,0xf9,0x89,0x5c,0xdd,0xa6,0x15,0x12,0x83,0x3e,0x93,0x11,0x22,0x33,0x44,0x55,0x66,0x01,0x01};
    memcpy(vars->tcp_opt + vars->tcp_opt_len, bytes, 20);
    vars->tcp_opt_len += 20;
}

payload_len may need to be fixed after the injection.

@Nefurtity Nefurtity changed the title send_fake_***() function should not handle tcp option field Insert wrong md5 may cause the packet length reach up MTU size Feb 24, 2018
@Nefurtity Nefurtity changed the title Insert wrong md5 may cause the packet length reach up MTU size Insert md5 options may cause the packet length reach up MTU size Feb 24, 2018
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