Proof of Concept - Using squid url rewrite feature to "hijack" proxy traffic and inject BeEF payload into it.
- Copy rewrite.php and payload.js to apache document root
- Make rewrite.php executable by using following command
- chmod +x /rewrite.php
- Edit /etc/squid3/squid.conf and add following line
- url_rewrite_program /rewrite.php
- Change #_BEEFURL_# inside payload.js to BeEF Hook URL
- Create empty folder and allow writable by all user
- mkdir -p /payload
- chmod 0777 /payload
Be sure to restart squid3 (sudo service squid3 restart) to refresh the changes.