I have an embedded device which connects to the Internet using TCP and UDP using custom protocols on a series of ports along with DHCP, DNS, NTP and ICMP pings. It has two interfaces - a GPRS modem and a Ethernet socket.
I would like to build a proxy so that I can tamper with the communications on the Ethernet side. This would ideally be a framework that allows be to either chose to forward or intercept and modify communications.
I was surprised when I couldn't find any tools, frameworks or tutorials to do this.
Does anyone have any guidance?
edit: this is relevant to reverse engineering because the custom protocols are not understood. By MITMing the connection, it would enable a better understanding of the protocols e.g. what happens when a packet goes missing? Is what appears to be a sequence number important? etc.
Already using a switch with mirror port for monitoring, but that doesn't allow me to drop the packets, does it? As the switch has already sent them onto the gateway.
– Cybergibbons May 23 '14 at 06:54iptables
to drop packets based on patterns, or re-route them to some software on the box, and usemitmproxy
to change what's going out. Themitmproxy
docs have some nice examples on this. – Guntram Blohm May 23 '14 at 07:10