I want to filter tcp packets depending upon the payload. is it possible.?
Hi ,
I am trying to implement SCADA aware firewall in RHEL 4 (2.6.16.14). Here using modbus/TCP for communcation.Here modbus packet is attached in the payload of tcp.Required kernel module for modbus is added in the netfilter.Iptables rules are added to filter undesirable modbus packets. here i face a problem :- Once a modbus packet is dropped , none of the packets from the client reaches the server. Client resends the dropped tcp packet(in the server) again and again for the ack. if no packets dropped no problem at all.Problem occurs only after when drop a packet from client. Here firewall and modbus server is in the same machine. i tried the same with firewall and server as separate machines, but again the results are same. When i check the connection status in the server using netstat -a , is ESTABLISHED. So is it possible to drop a tcp packet in an ESTABLISHED connection state of TCP.? Please help me to solve this problem. |
Well TCP connections are streams of data, it doesn't make sense to disrupt data in the middle of the connection at a per packet level. Some systems will permit interception and rewriting of TCP data, but this is still at a higher level than a per packet thing. As you're seeing, if you remove a packet, then TCP's job is to resend it, that has to happen.
|
Hai,
Thanks for the reply. Is it possible to modify payload of a tcp packet using netfilter.? I think if an undesirable packet arrives ,firewall will change the payload of that packet to a default value. |
Quote:
I'm saying this because from what I've read sofar I am quite certain you are trying to fix the right solution with the wrong problem. If you want MBAP (Layer 7) dissectors please have a look at Digitalbonds SCADA IDS Preprocessors, Searching File Content with Nessus the other SCADA-related stuff they provide, DHS CSSP and sans.org best practice whitepapers instead. |
All times are GMT -5. The time now is 01:00 AM. |