0

I have a server which will act as a proxy, using squid. My goal is to have something replace outgoing data. I tried ettercap, no luck whatsoever. The idea is, whatever-will-replace-data needs to run alongside with squid on the same box. Any ideas of a good ettercap replacement ? Or how would I go about using ettercap with squid on the same box ?

Adrian A.
  • 85
  • 2
  • 12

2 Answers2

1

If you're using squid that implies you're talking about HTTP. But you're trying to modify the contents at the stram level - if you try to do this at the packet level, that means that you need to build your own TCP stack to decompose/resompose the HTTP stream, then implement your own HTTP stack on top of that before you can get acces to the data!

Wouldn't it be a lot simpler to use the TCP and HTTP stacks already available in squid and the OS? Here's a simple example of how to modify content using squid.

symcbean
  • 19,931
  • 1
  • 29
  • 49
  • It would be alot simpler if I knew Perl :) – Adrian A. Jan 25 '11 at 00:56
  • You can write a url redirector in any language you like - it reads URLs on stdin, then outputs the modified version on stdout - the one I referenced just happens to download the content and modify it before pointing the request to the local copy. – symcbean Jan 25 '11 at 10:51
  • All the solutions above refer to the URL, and none to the actual content injection. – Adrian A. Jan 29 '11 at 01:15
0

In linux you can use mitmf for that.

mitmf --spoof --arp -i wlan0 --gateway <GATEWAY_IP> --target <TARGET_IP> --replace --search-str "searchstring" --replace-str "replacestring"
BrainWorx
  • 21
  • 7