Package: mim
MIM UsageDescriptionThis is a man-in-the-middle proxy server that shows a log of request and response headers; and fires signals that allow plugins to read and manipulate requests and responses.A number of plugins are included. It is very easy to add more based on these examples.Installation alternativesPippip install mimClonegit clonehttps://github.com/simonm3/mimpip install -r requirements.txtDownload .tar.gzclick download button athttps://pypi.python.org/packages/source/m/mimtar -zxvf <filename>.tar.gzpip install -r requirements.txtInstallation of BeefIf you want to use the beef framework then: apt-get install beef-xssScripts (run with -h to see usage and options)scriptdescriptionproxystart the proxyserver with pluginsuserslist users on the network so you can select a targetarpstart arp poisonfakeapcreate fake access point [https://github.com/DanMcInerney/fakeAP]Plugin options for proxy.pyoptiondescription–authLog userids/passwords–beefInject beef hook (browser exploitation framework)–catsReplace images with cats–faviconReplace favicon with lock symbol–injectInject data/injection.html–killKill session on first visit to domain (forces relogin)–requestsLog requests–sslstripReplace https with http then proxy links via https–upsidedownTurn images upsidedownAlternative ways to send requests to the proxyRedirect browserproxy.pySet browser proxy settings to point to ip address of proxy PC port 10000Run arp attackproxy.pyusers.py to see available machines to target on the local networkarp -t <ip address> to initiate arp attack on a target ipRun fake access pointfakeapconnect to Free Wifi from target pcproxy.py [NOTE: run after fakeAP to set firewall settings]How to create a pluginTo create a plugin called “test”:Create a module file “plugins/test.py” based on other modules in plugins folder.Use decorators e.g. @on(gotRequest) to link functions to the signals fired by the proxy. The signals are gotRequest, gotResponseTree, gotResponseText, gotResponseImage.Edit the docstring for proxy.py to add the optionTo add a plugin to “otherplugins” (a single file containing many smaller plugins):Follow the same format as the other plugins in “plugins/otherplugins”Edit the docstring for proxy.py to add the optionWhere does it workTested via usage on a range of websites using proxy settings, arp attack and fakeAPIt should never block and has a timeout on web requestsWhere does it not workSome security software prevents arp attacksHttps requests typed directly in the address bar will not be interceptedHttpsEverywhere (chrome extension) prevents interceptionSome websites enforce https via the browser e.g. gmail, facebookSome websites change http links back to https after the page loads e.g. ebaySome websites have misformed html. Calling lxml.html.fromstring then tostring can change the appearance of the page as the parser attempts to correct problems. An alternative is to use lxml.etree instead but this causes issues with other pages and is missing functions such as rewrite_links.MIM DesignCore filesBuilt in python2.7 using “twisted.web” and follows this chain:proxy1 (a bash script that runs proxy.py with selected options)=> Proxy.pyproxyserver [listens for connections]=> ProxyFactory(http.HTTPFactory)=> Proxy(http.HTTPChannel)=> Request(http.Request)proxyclient [creates connections to web]=> ProxyClientFactory(proxy.ProxyClientFactory)=> ProxyClient(proxy.ProxyClient, TimeoutMixin)=> internetUses pydispatch2 (extended pydispatch) to manage signalsproxyclient and proxyserver send signalsplugins listen for signalsOther filesfiledescriptiontools.fileserver.pysimple file server e.g. to serve imagestools.bash.pywrapper for bash commandstools.pydispatch2.pydecorator that connects a function to a signaltools.logs.pyconfiguration for tools.logslog.txtlog of current session. This is cleared on each run.