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 ?


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.

  • It would be alot simpler if I knew Perl :) – Adrian A. Jan 25 '11 at 0: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 1:15

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"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.