There is a good tool for pcap base protocol testing.
You can modify the pcap by using this tool.
packetsquare is a open-source packet modification tool. It is used for protocol testing and hacking. This tool is capable to parse and modify Ethernet II, VLAN(802.1Q), MPLS, ARP, IPv4, ICMP, TCP, UDP, IGMPv3 protocols & this tool is having some unique features like Stream Based Packet field modification, Packet Deletion/Duplication/Reordering, IP and MAC Address Find And Replace, Auto CheckSum for IP/ICMP/IGMP/TCP/UDP, Pcap Replay (Selected Single packet/Multiple packets).