BinProxy: proxy for arbitrary TCP connections
BinProxy is a proxy for arbitrary TCP connections. You can define custom message formats using the BinData gem.
Installation
Prerequisites
- Ruby 2.3 or later
- A C compiler, Ruby headers, etc., are needed to compile several dependencies.
- On Ubuntu, sudo apt install build-essential ruby-dev should do it.
- If you’ve installed a custom Ruby (e.g. with RVM), you probably already have what you need.
- openssl binary for –tls without an explicit cert/key.
- To build the UI, node.js and npm. (Not needed at runtime)
From Rubygems
gem install binproxy
You may need to use sudo, depending on your Ruby installation.
From Source
git clone https://github.com/nccgroup/BinProxy.git binproxy
cd binproxy
# Install ruby dependencies.
# Depending on your setup, one or both of these may require sudo.
gem install bundler && bundle
# The UI is built with a webpack/babel toolchain:
(cd ui && npm install) \
&& rake build-ui
# Confirm that everything works
# run.sh sets up the environment and passes all args to binproxy
./run.sh –help
To build and install the gem package:
gem build binproxy.gemspec
# Again, you may need sudo here
gem install binproxy-1.0.0.gem
Bug reports on installation issues are welcome!
Usage
Basic Usage
- Run binproxy with no arguments.
- Browse to http://localhost:4567/
- Enter local and remote hostnames or IP addresses and ports, and click ‘update’
- Point a client at the local service, and watch the packets flow.