Fix Burp Suite's horrible TLS stack & spoof any browser fingerprint

Awesome TLS

This extension hijacks Burp's HTTP and TLS stack to make it more powerful and less prone to fingerprinting by all kinds of WAFs. It does this without resorting to hacks, reflection or forked Burp Suite Community code. All Java code only leverages Burp's Extender API.

screenshot

How it works

Unfortunately Burp's Extender API is very limited for more advanced use cases like this, so I had to play around with it to make this work.

Once a request comes in, the extension intercepts it and forwards it to a local HTTPS server that started in the background once loaded/installed. This server works like a proxy; it forwards the request to the destination, while persisting the original header order and applying a customizable TLS configuration. Then, the local server forwards the response back to Burp.

Configuration settings and other necessary information like the destination server address are sent to the local server per request by a magic header. This magic header is stripped from the request before it's forwarded to the destination server, of course.

diagram

Another option would've been to code an upstream proxy server and connect burp to it, but I personally wanted an extension because it's customizable at runtime and more portable.

Installation

  1. Download the jar file for your operating system from releases. You can also download a fat jar, which works on all platforms supported by Awesome TLS. This means it's also portable and could be loaded from a USB for access from multiple different operating systems.
  2. Open burp (pro or community), go to Extender > Extensions and click on 'Add'. Then, select Java as the extension type and browse to the jar file you just downloaded. Click 'Next' at the bottom, and it should load the extension without any errors.
  3. Check your new 'Awesome TLS' tab in Burp for configuration settings and start hacking!

Manual build Instructions

This extension was developed with JetBrains IntelliJ (and GoLand) IDE. The build instructions below assume you're using the same tools to build. See workflows for the target programming language versions.

  1. Compile the go package within ./src-go/. Run cd ./src-go/server && go build -o ../../src/main/resources/{OS}-{ARCH}/server.{EXT} -buildmode=c-shared ./cmd/main.go, replacing {OS}-{ARCH} with your OS and CPU architecture and {EXT} with your platform's preferred extension for dynamic C libraries. For example: linux-x86-64/server.so. See the JNA docs for more info about supported platforms.
  2. Compile the GUI form SettingsTab.form into Java code via Build > Build project.
  3. Build the jar with Gradle.

You should now have one jar file that works with Burp on your operating system.

License

GPL V3

Owner
Sleeyax
Using the right skills for the right job
Sleeyax
Comments
  • Unable to load library 'server.dylib'

    Unable to load library 'server.dylib'

    After loading the extension in Burp, the following error is shown in stdout:

    dlopen(libserver.dylib.dylib, 0x0009): tried: 'libserver.dylib.dylib' (relative path not allowed in hardened program), '/usr/lib/libserver.dylib.dylib' (no such file)
    dlopen(libserver.dylib.dylib, 0x0009): tried: 'libserver.dylib.dylib' (relative path not allowed in hardened program), '/usr/lib/libserver.dylib.dylib' (no such file)
    Native library (darwin-x86-64/libserver.dylib.dylib) not found in resource path ([file:/var/folders/hn/_pcv7pl154bbns24yhwjt05c0000gn/T/burp10831821168041598492.tmp/2])
    	at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:301)
    	at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:461)
    	at com.sun.jna.Library$Handler.<init>(Library.java:192)
    	at com.sun.jna.Native.load(Native.java:622)
    	at com.sun.jna.Native.load(Native.java:596)
    	at burp.ServerLibrary.<clinit>(ServerLibrary.java:8)
    	at burp.BurpExtender.lambda$registerExtenderCallbacks$0(BurpExtender.java:36)
    	at java.base/java.lang.Thread.run(Thread.java:833)
    	Suppressed: java.lang.UnsatisfiedLinkError: dlopen(libserver.dylib.dylib, 0x0009): tried: 'libserver.dylib.dylib' (relative path not allowed in hardened program), '/usr/lib/libserver.dylib.dylib' (no such file)
    		at com.sun.jna.Native.open(Native Method)
    		at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:191)
    		... 7 more
    	Suppressed: java.lang.UnsatisfiedLinkError: dlopen(libserver.dylib.dylib, 0x0009): tried: 'libserver.dylib.dylib' (relative path not allowed in hardened program), '/usr/lib/libserver.dylib.dylib' (no such file)
    		at com.sun.jna.Native.open(Native Method)
    		at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:204)
    		... 7 more
    	Suppressed: java.io.IOException: Native library (darwin-x86-64/libserver.dylib.dylib) not found in resource path ([file:/var/folders/hn/_pcv7pl154bbns24yhwjt05c0000gn/T/burp10831821168041598492.tmp/2])
    		at com.sun.jna.Native.extractFromResourcePath(Native.java:1145)
    		at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:275)
    		... 7 more
    
  • Cannot have multiple response headers w/ same name

    Cannot have multiple response headers w/ same name

    If the response contains multiple cookies w/ the same name (such as set-cookie), only one is returned.

    Set overwrites the header's value, if a header with that key already exists: https://github.com/sleeyax/burp-awesome-tls/blob/08fce6f79867de4568c1abb4d9690a318ac16820/src-go/server/server.go#L52-L55

    Add could be used instead, but maybe instead of looping through all the headers and copying them that way, it would be better to just copy the Header instance from res to w?

  • [read all before merge] bug fix and more compatitable

    [read all before merge] bug fix and more compatitable

    optimize:

    • upgrade golang to 1.18 in CI
    • downgrade JDK to 11 in CI , for more users who is running JDK 11
    • introduce more details about build plugins manually, especially for Apple Silicon users who runs an ARM64 JDK instead of amd64 one. remove user identity related string in golang build by introducing -trimpath -ldflags='-s -w' param. Currently, it is still not available for users to compile against Apple M1 automatically due to bugs listed below.

    bug fix:

    • when load plugin, it will tells you in Settings.java :
        public int getTimeout() {
            return Integer.parseInt(this.read(this.timeout));
        }
    

    number conversion failed due to timeout is NULL. Since I'm not that familiar with Burp extension development, but I think it might because it only allows all settings in String instead of int here. So I change the Settings.timeout to String and removed redundant type conversion.

    HOWEVER

    There are still bugs here:

    • unload extension will result in:
    java.lang.NoClassDefFoundError: Could not initialize class burp.ServerLibrary
    	at burp.BurpExtender.extensionUnloaded(BurpExtender.java:76)
    	at burp.c6o.h(Unknown Source)
    	at burp.izp.b(Unknown Source)
    	at burp.a8_.lambda$toggleLoadedState$1(Unknown Source)
    	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    	at java.base/java.lang.Thread.run(Thread.java:829)
    
    • server.dylib is loaded, but no port get listened. I have no idea how to debugging it.

    If you could give me some help about fix the bug, I will build a more strong auto build script to help all of us.

    Thanks for your excellent idea.

  • Not Worked

    Not Worked

    java.lang.NumberFormatException: Cannot parse null string at java.base/java.lang.Integer.parseInt(Integer.java:627) at java.base/java.lang.Integer.parseInt(Integer.java:781) at burp.Settings.getTimeout(Settings.java:52) at burp.SettingsTab.(SettingsTab.java:38) at burp.BurpExtender.registerExtenderCallbacks(BurpExtender.java:33) at burp.zkf.K(Unknown Source) at burp.u2d.O(Unknown Source) at burp.u29.lambda$initialiseOnNewThread$0(Unknown Source) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.base/java.lang.Thread.run(Thread.java:1589)

  • Multi-value headers fix

    Multi-value headers fix

    Second fix for multi-value headers (#17).

    The fix can be tested using: http://httpbin.org/cookies/set?cookie_1=c_1&cookie_2=c_2

    Before fix: Before Fix

    After fix: After Fix

  • Build cross platform .jar files

    Build cross platform .jar files

    Ideally, instead of having a release that looks like this

    • burp-awesome-tls.jar
    • *-server.dll
    • *-server.so
    • *-server.dylib

    We should have something like this:

    • burp-awesome-tls-linux-x64.jar
    • burp-awesome-tls-win-x64.jar

    This is much more user friendly.

    Thinking further, we could also release an actual cross platform 'fat jar' burp-awesome-tls-fat.jar that contains all server binaries for all supported platforms (i.e. most popular win, mac and linux). This jar would be significantly bigger in size, but it would work everywhere and could be dragged around on an USB stick for example.


    I'm not sure how this build process should look like though. I think we'd need something like this, unless I'm missing something obvious:

    • go build action builds all binaries and places them in ./src-go/server/build
    • a custom script copies each binary into src/java/resources with the correct JNA {OS}-{ARCH} folder name and builds the jar file each time one gets copied, plus cleans up afterwards (i.e delete the resources/{OS}-{ARCH} that was created)
    • a custom script copies all binaries to resources and builds the fatjar
  • [Frontend] Setup GUI

    [Frontend] Setup GUI

    Possible fields:

    • Remote server connection URL
    • TLS fingerprint
      • Chrome
      • Firefox
      • iOS Safari
      • Android Chrome
      • Android okhttp
      • Charles
    • Custom fingerprint from wireshark capture
    • Other customizable UTLS settings
  • [Frontend] Settings management

    [Frontend] Settings management

    We should consider how to pass settings from UI to the backend server. Perhaps we could keep it simple and just pass in a header with JSON serialized settings and then remove that header at the backend so it doesn't get sent to the destination host.

  • Setup cross-platform builds

    Setup cross-platform builds

    We must be able to distribute cross-platform jar files targetting win, mac, linux. Each jar file should include one server library built for the target platform.

    Alternatively we could distribute backend and frontend separately. Thus we end up having cross platform jar files for the frontend and cross platform binaries for the backend. This method is less portable but results in smaller jar files. Plus the server can update independently this way.

  • [backend] Automatic SSL certificate generation

    [backend] Automatic SSL certificate generation

    The backend server should support SSL/TLS for security reasons. Certificates should be automatically generated for additional security. We could use code from gomitmproxy for this (with proper credit, of course!).

  • Add

    Add "InsecureSkipVerify: true" to tls config (RoundTrip: x509: certificate name does not match input)

    Hi, I have problems with tls on some sites: RoundTrip: x509: certificate name does not match input. Can we add "InsecureSkipVerify: true" to tls config here? https://github.com/sleeyax/burp-awesome-tls/blob/main/src-go/server/roundtripper.go#L84

  • Crashing Burp on  Ubuntu 22.04

    Crashing Burp on Ubuntu 22.04

    After loading the module and sending an HTTP request to the listener it crashes the whole BURP. Burp version: 2022.9.1(Professional) Java 17 os: Ubuntu 22.04

  • Add response header order

    Add response header order

    If you compare the response header order of a request with and without the extension enabled, you'll notice it's different.

    GET http://httpbin.org/get with extension: Screen Shot 2022-09-25 at 9 45 06 PM

    GET http://httpbin.org/get without extension: Screen Shot 2022-09-25 at 9 45 14 PM

  • Error on first installation: java.lang.NumberFormatException: Cannot parse null string

    Error on first installation: java.lang.NumberFormatException: Cannot parse null string

    Run java 17.0.4 2022-07-19 LTS and I have tried various versions of Java but none of them works. these are errors. Thanks for your contribution. java.lang.NumberFormatException: Cannot parse null string at java.base/java.lang.Integer.parseInt(Integer.java:630) at java.base/java.lang.Integer.parseInt(Integer.java:786) at burp.Settings.getTimeout(Settings.java:52) at burp.SettingsTab.(SettingsTab.java:38) at burp.BurpExtender.registerExtenderCallbacks(BurpExtender.java:33) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at burp.xu1.lambda$registerExtenderCallbacks$0(Unknown Source) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833)

Http-server - A HTTP server and can be accessed via TLS and non-TLS mode

Application server.go runs a HTTP/HTTPS server on the port 9090. It gives you 4

Feb 3, 2022
Reverse proxy server to filter traffic based on JA3 fingerprint/hash

JA3RP (JA3 Reverse Proxy) Ja3RP is a basic reverse proxy server that filters traffic based on JA3 fingerprints. It can also operate as a regular HTTP

Sep 17, 2022
Go tool to wrap and fix errors with the new %w verb directive
Go tool to wrap and fix errors with the new %w verb directive

errwrap Wrap and fix Go errors with the new %w verb directive. This tool analyzes fmt.Errorf() calls and reports calls that contain a verb directive t

Nov 10, 2022
Deskreen turns any device with a web browser into a secondary screen for your computer
Deskreen turns any device with a web browser into a secondary screen for your computer

Deskreen Website: https://deskreen.com ▶️ Deskreen Youtube channel (video tutorials, demos, use cases for Deskreen day to day usage) Deskreen turns an

Jan 7, 2023
CFSSL: Cloudflare's PKI and TLS toolkit

CFSSL CloudFlare's PKI/TLS toolkit CFSSL is CloudFlare's PKI/TLS swiss army knife. It is both a command line tool and an HTTP API server for signing,

Jan 4, 2023
Toy TLS certificate viewer

veilig Toy tls certificate viewer that I built because openssl s_client confuses me Source available at: https://github.com/noqqe/veilig/ Please repor

Aug 25, 2022
Mutual TLS encryption TCP proxy with golang
Mutual TLS encryption TCP proxy with golang

mtls-tcp-proxy Mutual Authentication TLS encryption TCP proxy with golang Why? I created this because of sometimes, it is not possible for us to estab

Oct 17, 2022
Fork of Go stdlib's net/http that works with alternative TLS libraries like refraction-networking/utls.

github.com/ooni/oohttp This repository contains a fork of Go's standard library net/http package including patches to allow using this HTTP code with

Sep 29, 2022
High-performance, non-blocking, event-driven, easy-to-use networking framework written in Go, support tls/http1.x/websocket.

High-performance, non-blocking, event-driven, easy-to-use networking framework written in Go, support tls/http1.x/websocket.

Jan 8, 2023
Ephemeral One Time/Build-Time gRPC TLS PKI system.

PkiSauce Ephemeral Build Time TLS PKI saucing for your intra services GRPC (or not) communications. Description A simple attempt to avoid deploying co

Jul 4, 2022
go HTTP client that makes it plain simple to configure TLS, basic auth, retries on specific errors, keep-alive connections, logging, timeouts etc.

goat Goat, is an HTTP client built on top of a standard Go http package, that is extremely easy to configure; no googling required. The idea is simila

Jun 25, 2022
Transparent TLS and HTTP proxy serve and operate on all 65535 ports, with domain regex whitelist and rest api control

goshkan Transparent TLS and HTTP proxy serve & operating on all 65535 ports, with domain regex whitelist and rest api control tls and http on same por

Nov 5, 2022
Using Wireshark to decrypt TLS gRPC Client-Server protobuf messages
Using Wireshark to decrypt TLS gRPC Client-Server protobuf messages

Using Wireshark to decrypt TLS gRPC Client-Server protobuf messages Sample client server in golang that demonstrates how to decode protobuf messages f

Sep 8, 2022
Monitors the expiry time of tls certificates and exports prometheus metrics

Certificate Monitor Monitors the expiry time of tls certificates and exports prometheus metrics. Target domains can be automatically discovered via in

Feb 7, 2022
Diameter stack and Base Protocol (RFC 6733) for the Go programming language

Diameter Base Protocol Package go-diameter is an implementation of the Diameter Base Protocol RFC 6733 and a stack for the Go programming language. St

Dec 28, 2022
A RTP stack for Go

RTP/RTCP stack for Go This Go package implements a RTP/RTCP stack for Go. The package is a sub-package of the standard Go net package and uses standar

Dec 21, 2022
Go SIP Stack

GoSIPs Go SIP Stack (http://www.GoSIPs.org) The objective of GoSIPs is to develop a Golang stack interface and implementation to the Session Initiatio

Aug 31, 2022
A decentralized P2P networking stack written in Go.

noise noise is an opinionated, easy-to-use P2P network stack for decentralized applications, and cryptographic protocols written in Go. noise is made

Dec 29, 2022