GithubHelp home page GithubHelp logo

d00movenok / bounceback Goto Github PK

View Code? Open in Web Editor NEW
556.0 8.0 63.0 631 KB

↕️🤫 Stealth redirector for your red team operation security

License: MIT License

Go 98.76% Shell 1.24%
redteam proxy redirector cobalt-strike infrastructure pentesting phishing c2 pentest cybersecurity

bounceback's Introduction

BounceBack

License: MIT Go Report Card Tests CodeQL Docs

↕️🤫 Stealth redirector for your red team operation security.

Atchitecture

Overview

BounceBack is a powerful, highly customizable and configurable reverse proxy with WAF functionality for hiding your C2/phishing/etc infrastructure from blue teams, sandboxes, scanners, etc. It uses real-time traffic analysis through various filters and their combinations to hide your tools from illegitimate visitors.

The tool is distributed with preconfigured lists of blocked words, blocked and allowed IP addresses.

For more information on tool usage, you may visit project's wiki.

Features

  • Highly configurable and customizable filters pipeline with boolean-based concatenation of rules will be able to hide your infrastructure from the most keen blue eyes.
  • Easily extendable project structure, everyone can add rules for their own C2.
  • Integrated and curated massive blacklist of IPv4 pools and ranges known to be associated with IT Security vendors combined with IP filter to disallow them to use/attack your infrastructure.
  • Malleable C2 Profile parser is able to validate inbound HTTP(s) traffic against the Malleable's config and reject invalidated packets.
  • Out of the box domain fronting support allows you to hide your infrastructure a little bit more.
  • Ability to check the IPv4 address of request against IP Geolocation/reverse lookup data and compare it to specified regular expressions to exclude out peers connecting outside allowed companies, nations, cities, domains, etc.
  • All incoming requests may be allowed/disallowed for any time period, so you may configure work time filters.
  • Support for multiple proxies with different filter pipelines at one BounceBack instance.
  • Verbose logging mechanism allows you to keep track of all incoming requests and events for analyzing blue team behaviour and debug issues.

Rules

The main idea of rules is how BounceBack matches traffic. The tool currently supports the following rule types:

  • Boolean-based (and, or, not) rules combinations
  • IP and subnet analysis
  • IP geolocation fields inspection
  • Reverse lookup domain probe
  • Raw packet regexp matching
  • Malleable C2 profiles traffic validation
  • Work (or not) hours rule

Custom rules may be easily added, just register your RuleBaseCreator or RuleWrapperCreator. See already created RuleBaseCreators and RuleWrapperCreators

Rules configuration page may be found here.

Proxies

The proxies section is used to configure where to listen and proxy traffic, which protocol to use and how to chain rules together for traffic filtering. At the moment, BounceBack supports the following protocols:

  • HTTP(s) for your web infrastructure
  • DNS for your DNS tunnels
  • Raw TCP (with or without tls) and UDP for custom protocols

Custom protocols may be easily added, just register your new type in manager. Example proxy realizations may be found here.

Proxies configuration page may be found here.

Installation

Just download latest release from release page, unzip it, edit config file and go on.

If you want to build it from source, clone it (don't forget about GitLFS), install goreleaser and run:

goreleaser release --clean --snapshot

Usage

  1. (Optionally) Update banned_ips.txt list:

    bash scripts/collect_banned_ips.sh > data/banned_ips.txt
  2. Modify config.yml for your needs. Configure rules to match traffic, proxies to analyze traffic using rules and globals for deep rules configuration.

  3. Run BounceBack:

    ./bounceback

    Usage of BounceBack:
    -c, --config string Path to the config file in YAML format (default "config.yml")
    -l, --log string Path to the log file (default "bounceback.log")
    -v, --verbose count Verbose logging (0 = info, 1 = debug, 2+ = trace)

bounceback's People

Contributors

d00movenok avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bounceback's Issues

Case sensitive headers bug

So for some reason profiles that are created with the help of the SourcePoint are getting rejected
are blocked even though the host_stage set to false

2023-11-08T13:33:01Z DBG http-get/post/stager did not match from=192.168.1.146 proxy=https_proxy rule=malleable_https_traffic
2023-11-08T13:33:01Z WRN Rejected from=192.168.1.146 proxy=https_proxy rule=malleable_https_traffic

Cannot configure multiple TLS certificates

I have multiple domains resolving to my Nginx server and I configured BounceBack to proxy to the Nginx server. But it doesn't support configuring multiple TLS certificates.

I have a error in port 80

image

I have an error on port 80, I am using gophish already executed in tmux, any way to resolve if gophish is using it, or change the port to another?

I'm going to try changing the local port in the config
image

SAME ERROR
image

Does this work with Havoc c2?

I'm sure it can but since Havoc is going through a major rewrite it might change things up. I'll do some testing today to see what I can do with it. I'll be testing out the yaotl configs for Havoc. Maybe I'll get somewhere. Who knows.

Disable certificate check on proxy target url

Bug:

2023-11-06T15:22:47Z DBG http-get match from=192.168.1.146 match= proxy=https_proxy rule=malleable_https_traffic
2023-11-06T15:22:47Z ERR Can't make proxy request error="Get "https://127.0.0.1:8443/test?param=aGVsbG8gd29ybGQsZnJvbSBibGFja3NudWZraW4K/test": tls: failed to verify certificate: x509: cannot validate certificate for 127.0.0.1 because it doesn't contain any IP SANs" from=192.168.1.146 proxy=https_proxy

Fix:
/BounceBack/Internals/proxy/http/proxy.go
Line 81:

	if p.TLSConfig != nil {
		p.TLSConfig.InsecureSkipVerify = true // Add this line to skip certificate verification
		p.client.Transport = &http.Transport{
			TLSClientConfig:   p.TLSConfig,
			ForceAttemptHTTP2: true,
		}
		p.server.TLSConfig = p.TLSConfig
	}

	return p, nil

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.