All Projects → secretsquirrel → Bdfproxy

secretsquirrel / Bdfproxy

Patch Binaries via MITM: BackdoorFactory + mitmProxy.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Bdfproxy

Proxy.py
⚡⚡⚡Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging
Stars: ✭ 1,291 (+50.64%)
Mutual labels:  mitm, mitmproxy
Secret Agent
The web browser that's built for scraping.
Stars: ✭ 151 (-82.38%)
Mutual labels:  mitm, mitmproxy
Proxify
Swiss Army knife Proxy tool for HTTP/HTTPS traffic capture, manipulation, and replay on the go.
Stars: ✭ 1,153 (+34.54%)
Mutual labels:  mitm, mitmproxy
Go Mitmproxy
mitmproxy implemented with golang. 用 Golang 实现的中间人攻击(Man-in-the-middle),解析、监测、篡改 HTTP/HTTPS 流量。
Stars: ✭ 61 (-92.88%)
Mutual labels:  mitm, mitmproxy
mps
MPS is a high-performance HTTP(S) proxy library that supports forward proxies, reverse proxies, man-in-the-middle proxies, tunnel proxies, Websocket proxies. MPS 是一个高性能HTTP(s)中间代理库,它支持正向代理、反向代理、中间人代理、隧道代理、Websocket代理
Stars: ✭ 64 (-92.53%)
Mutual labels:  mitm, mitmproxy
Pokemon Go Mitm
🎁 Pokemon Go MITM Proxy - Intercepts the traffic between your Pokemon Go app and their servers, decodes the protocol and gives you a handy tool to enrich your own game experience on the fly.
Stars: ✭ 475 (-44.57%)
Mutual labels:  mitm, mitmproxy
Mastermind
Man in the middle testing
Stars: ✭ 341 (-60.21%)
Mutual labels:  mitm, mitmproxy
Wilma
Service Virtualization Solution – a combined Service Stub and Transparent Proxy
Stars: ✭ 50 (-94.17%)
Mutual labels:  mitm, mitmproxy
PassivesScan
《被动扫描资源汇总》
Stars: ✭ 27 (-96.85%)
Mutual labels:  mitm, mitmproxy
Houki
🧹 Customizable MitM proxy / 可定制化的中间人代理
Stars: ✭ 28 (-96.73%)
Mutual labels:  mitm, mitmproxy
mitm-play
Man in the middle using Playwright
Stars: ✭ 13 (-98.48%)
Mutual labels:  mitm, mitmproxy
httransform
A framework to build precise and fast HTTP proxies.
Stars: ✭ 54 (-93.7%)
Mutual labels:  mitm, mitmproxy
Ssh Mitm
ssh mitm server for security audits supporting public key authentication, session hijacking and file manipulation
Stars: ✭ 335 (-60.91%)
Mutual labels:  mitm, mitmproxy
Wssip
Application for capturing, modifying and sending custom WebSocket data from client to server and vice versa.
Stars: ✭ 373 (-56.48%)
Mutual labels:  mitm
Fox Scan
Fox-scan is a initiative and passive SQL Injection vulnerable Test tools.
Stars: ✭ 366 (-57.29%)
Mutual labels:  mitmproxy
Node Tutorial
☺️Some of the node tutorial -《Node学习笔记》
Stars: ✭ 364 (-57.53%)
Mutual labels:  mitm
Awesome Network Stuff
Resources about network security, including: Proxy/GFW/ReverseProxy/Tunnel/VPN/Tor/I2P, and MiTM/PortKnocking/NetworkSniff/NetworkAnalysis/etc。More than 1700 open source tools for now. Post incoming.
Stars: ✭ 578 (-32.56%)
Mutual labels:  mitm
Apklab
Android Reverse-Engineering Workbench for VS Code
Stars: ✭ 470 (-45.16%)
Mutual labels:  mitm
Caplets
bettercap scripts (caplets) and proxy modules.
Stars: ✭ 363 (-57.64%)
Mutual labels:  mitm
Mitm Cheatsheet
All MITM attacks in one place.
Stars: ✭ 467 (-45.51%)
Mutual labels:  mitm

New version of BDFProxy to be released JULY 2021, only to sponsors! Sponsor here: https://github.com/sponsors/secretsquirrel

BLOG: http://secureallthethings.blogspot.com/2017/08/closing-door-end-of-backdoor-factory.html

The Backdoor Factory Proxy (BDFProxy) v0.3.8

For security professionals and researchers only.

Join the chat at https://gitter.im/secretsquirrel/BDFProxy Black Hat Arsenal

###NOW ONLY WORKS WITH v.0.17 >= MITMPROXY >= v.0.11

Docker:

 # sudo echo 1 > /proc/sys/net/ipv4/ip_forward  # linux
 # sudo sysctl -w net.inet.ip.forwarding=1 # macOS
 docker pull secretsquirrel/bdfproxy
 docker run -it -p 8080:8080 secretsquirrel/bdfproxy bash
 # ./bdf_proxy.py

To install on Kali:

apt-get update
apt-get install bdfproxy

Black Hat USA 2015:

Video: https://www.youtube.com/watch?v=OuyLzkG16Uk

Paper: https://www.blackhat.com/docs/us-15/materials/us-15-Pitts-Repurposing-OnionDuke-A-Single-Case-Study-Around-Reusing-Nation-State-Malware-wp.pdf

DerbyCon 2014:

Video: http://www.youtube.com/watch?v=LjUN9MACaTs

About 18 minutes in is the BDFProxy portion.

Contact the developer on:

IRC:
irc.freenode.net #BDFactory 

Twitter:
@midnite_runr

This script rides on two libraries for usage: The Backdoor Factory (BDF) and the mitmProxy.

###Concept: Patch binaries during download ala MITM.

###Why: Because a lot of security tool websites still serve binaries via non-SSL/TLS means.

Here's a short list:

	sysinternals.com
	Microsoft - MS Security Essentials
	Almost all anti-virus companies
	Malwarebytes
	Sourceforge
	gpg4win
	Wireshark
	etc...

Yes, some of those apps are protected by self checking mechanisms. I've been working on a way to automatically bypass NSIS checks as a proof of concept. However, that does not stop the initial issue of bit flipping during download and the execution of a malicious payload. Also, BDF by default will patch out the windows PE certificate table pointer during download thereby removing the signature from the binary.


##Depends:

Pefile - most recent
ConfigObj  
mitmProxy - Kali Build .10
BDF - most current
Capstone (part of BDF)

##Supported Environment: Tested on all Kali Linux builds, whether a physical beefy laptop, a Raspberry Pi, or a VM, each can run BDFProxy.

##Install: BDF is in bdf/

Run the following to pull down the most recent:

./install.sh

OR:

git clone https://github.com/secretsquirrel/the-backdoor-factory bdf/

If you get a certificate error, run the following:

mitmproxy

And exit [Ctr+C] after mitmProxy loads.

##Usage: Update everything before each use:

./update.sh

READ THE CONFIG!!!

	-->bdfproxy.cfg

You will need to configure your C2 host and port settings before running BDFProxy. DO NOT overlap C2 PORT settings between different payloads. You'll be sending linux shells to windows machines and things will be segfaulting all over the place. After running, there will be a metasploit resource script created to help with setting up your C2 communications. Check it carefully. By the way, everything outside the [Overall] section updates on the fly, so you don't have to kill your proxy to change settings to work with your environment.

But wait! You will need to configure your mitm machine for mitm-ing! If you are using a wifiPineapple I modded a script put out by hack5 to help you with configuration. Run ./wpBDF.sh and enter in the correct configs for your environment. This script configures iptables to push only http (non-ssl) traffic through the proxy. All other traffic is fowarded normally.

Then:

./bdf_proxy.py

Here's some sweet ascii art for possible phyiscal settings of the proxy:

Lan usage:

	<Internet>----<mitmMachine>----<userLan>

Wifi usage:

	<Internet>----<mitmMachine>----<wifiPineapple>)))

##Testing:

Suppose you want to use your browser with Firefox and FoxyProxy to connect to test your setup.

	Update your config as follows:
	transparentProxy = None

	Configure FoxyProxy to use BDFProxy as a proxy.
	Default port in the config is 8080.

##Logging: We have it. The proxy window will quickly fill with massive amounts of cat links depending on the client you are testing. Use tail -f proxy.log to see what is getting patched and blocked by your blacklist settings. However, keep an eye on the main proxy window if you have chosen to patch binaries manually, things move fast and behind the scences there is multi-threading of traffic, but the intial requests and responses are locking for your viewing pleasure.

##Attack Scenarios (all with permission of targets): -Evil Wifi AP -Arp Redirection -Physical plant in a wiring closet -Logical plant at your favorite ISP

##Bug Reporting

Bugs happen, but if I can't understand your issue, I can't help you.

Submit issues here: https://github.com/secretsquirrel/BDFProxy/issues

Include the following information from the output of the these commands (use pastebin for the longer commands):

# bdfproxy only supports v11 -> v17
$ mitmproxy --version

$ uname -a

# Use pastebin perhaps
$ cat bdfproxy.cfg 
$ ./bdf_proxy.py

###Change Log:

####07/04/2016

Support for BDF Preprocessor and mitmProxy v17

####12/20/2015

Added configuration options in bdfproxy.cfg to support PE code signing from BDF => CODE_SIGN See BDF README for details

####11/13/2015

Remove python-magic dependencies because there are two libraries that are named as such. Which is confusing.

####10/19/2015

Add support for BDF Import Directory Patching into the a code cave vs a new section. Update IDA_IN_CAVE to True in the bdfproxy.cfg file for this. EXPERIMENTAL...

####8/12/2015

Added support for the PE replace method, replace downloaded binary with an attacker supplied one. To use change PATCH_METHOD to replace and provide a SUPPLIED_BINARY

####8/6/2015

Added support for onionduke. To use change PATCH_METHOD to onionduke and SUPPLIED_BINARY to the binary that you wish to bind to the target executable.

Added support to set the check and patching of the requestedExecutionLevel in the PE manifest as highestAvailable for both x86 and x86_64 PE binaries. Set RUNAS_ADMIN as True.

Added support to set whether to support legacy XP machines via the XP_MODE flag as True. This can have evasion against AVs as their emulators may fail if this setting is set to FALSE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].