sleeyax / burp-awesome-tls

Burp extension to evade TLS fingerprinting. Bypass WAF, spoof any browser.
GNU General Public License v3.0
992 stars 66 forks source link

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

Open root0xa3 opened 1 year ago

root0xa3 commented 1 year ago

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)

sleeyax commented 1 year ago

Thank you for reporting this issue.

When (e.g. at runtime or upon installation) and how exactly do you get this error though? I remember an old PR #14 that included a similar fix to number conversion issues like this, though I haven't been able to reproduce it myself. I'm pretty sure this isn't related to your Java version. I'll investigate it further, but any more info you can provide is appreciated!

sleeyax commented 1 year ago

I pushed some changes that could fix the issue (still couldn't reproduce, so I've made some changes based on what I know), please see the v0.0.2-rc.1 tag or build from source to check if it resolves your issue.

EDIT: something seems wrong with the builds, please compile from source for now.

EDIT 2: Builds are fixed, try https://github.com/sleeyax/burp-awesome-tls/releases/tag/v0.0.2-rc.2.

sleeyax commented 1 year ago

Assuming this is fixed, re-open if you're still experiencing this issue.

xliee commented 1 year ago

I still have the bug. Burp suite version: 2022.6.1 Java version: 17.0.4.1 2022-08-18 LTS

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.<init>(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.kl4.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)

sleeyax commented 1 year ago

@xliee can you provide more information on how to reproduce this bug exactly and which operating system you're using.

xliee commented 1 year ago

Hello, the error just dissapeared and running normally now, but i encountered another issue. As a sidething i'd point in the readme that you need java +17 to run this extension.

Im running windows 11. Burp suite version: 2022.6.1 Java version: 17.0.4.1 2022-08-18 LTS

The issue: At random times the server just crash along with burp instance.

I was connecting to https://tls.peet.ws/ after some successful connections to that exact website with the same tls settings I was using the android 11 okhhp tls settings at the time of the crash

Got this logs in the console:

fatal error: concurrent map writes

goroutine 895 [running]:
runtime.throw({0x6edce251, 0x1c00046c0c0})
        /usr/local/go/src/runtime/panic.go:1198 +0x76 fp=0x1c00028fa20 sp=0x1c00028f9f0 pc=0x6e9c7216
runtime.mapassign_faststr(0x6ed708a0, 0x1c00046c0c0, {0x6edcabda, 0xd})
        /usr/local/go/src/runtime/map_faststr.go:211 +0x39c fp=0x1c00028fa88 sp=0x1c00028fa20 pc=0x6e9a3b7c
server/internal/net/http.Header.writeSubset(0x1c0001dc000, {0x6ee444a0, 0x1c0000a6040}, 0x1c000111110, 0x0)
        /source/internal/net/http/header.go:256 +0x632 fp=0x1c00028fce8 sp=0x1c00028fa88 pc=0x6ec58b32
server/internal/net/http.(*Request).write(0x1c000298900, {0x6ee444a0, 0x1c0000a6040}, 0x0, 0x0, 0x0)
        /source/internal/net/http/request.go:651 +0x8db fp=0x1c00028fed0 sp=0x1c00028fce8 pc=0x6ec59a9b
server/internal/net/http.(*persistConn).writeLoop(0x1c0001286c0)
        /source/internal/net/http/transport.go:2393 +0x189 fp=0x1c00028ffc8 sp=0x1c00028fed0 pc=0x6ec7cf49
server/internal/net/http.(*Transport).dialConn·dwrap·119()
        /source/internal/net/http/transport.go:1752 +0x26 fp=0x1c00028ffe0 sp=0x1c00028ffc8 pc=0x6ec799a6
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1581 +0x1 fp=0x1c00028ffe8 sp=0x1c00028ffe0 pc=0x6e9f4621
created by server/internal/net/http.(*Transport).dialConn
        /source/internal/net/http/transport.go:1752 +0x1e65

goroutine 17 [IO wait, locked to thread]:
internal/poll.runtime_pollWait(0x1b89306c898, 0x72)
        /usr/local/go/src/runtime/netpoll.go:303 +0x85
internal/poll.(*pollDesc).wait(0x1c0000602e0, 0x6e99dd74, 0x0)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.execIO(0x1c00011bb98, 0x1c000449988)
        /usr/local/go/src/internal/poll/fd_windows.go:175 +0xe5
internal/poll.(*FD).acceptOne(0x1c00011bb80, 0x1b50, {0x1c0003521e0, 0x6ea051bf, 0x0}, 0x0)
        /usr/local/go/src/internal/poll/fd_windows.go:810 +0x6d
internal/poll.(*FD).Accept(0x1c00011bb80, 0x1c000449b60)
        /usr/local/go/src/internal/poll/fd_windows.go:844 +0x1d6
net.(*netFD).accept(0x1c00011bb80)
        /usr/local/go/src/net/fd_windows.go:139 +0x65
net.(*TCPListener).accept(0x1c000004228)
        /usr/local/go/src/net/tcpsock_posix.go:140 +0x28
net.(*TCPListener).Accept(0x1c000004228)
        /usr/local/go/src/net/tcpsock.go:262 +0x3d
crypto/tls.(*listener).Accept(0x1c000004240)
        /usr/local/go/src/crypto/tls/tls.go:66 +0x2d
server/internal/net/http.(*Server).Serve(0x1c000152000, {0x6ee4b6b0, 0x1c000004240})
        /source/internal/net/http/server.go:3006 +0x394
server.StartServer({0x1c00001e690, 0x12})
        /source/server.go:81 +0x2ff
main.StartServer(0x0)
        /source/cmd/main.go:20 +0x1e

goroutine 910 [IO wait]:
internal/poll.runtime_pollWait(0x1b89306c3e8, 0x72)
        /usr/local/go/src/runtime/netpoll.go:303 +0x85
internal/poll.(*pollDesc).wait(0x3e3, 0x2070000, 0x0)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.execIO(0x1c0004f8f18, 0x6ede5f98)
        /usr/local/go/src/internal/poll/fd_windows.go:175 +0xe5
internal/poll.(*FD).Read(0x1c0004f8f00, {0x1c0001c7100, 0x630, 0x630})
        /usr/local/go/src/internal/poll/fd_windows.go:441 +0x25f
net.(*netFD).Read(0x1c0004f8f00, {0x1c0001c7100, 0x0, 0x1c000069a98})
        /usr/local/go/src/net/fd_posix.go:56 +0x29
net.(*conn).Read(0x1c00029a040, {0x1c0001c7100, 0x6e9de20f, 0x1c000069ae8})
        /usr/local/go/src/net/net.go:183 +0x45
crypto/tls.(*atLeastReader).Read(0x1c000166888, {0x1c0001c7100, 0x0, 0x6e99a92d})
        /usr/local/go/src/crypto/tls/conn.go:778 +0x3d
bytes.(*Buffer).ReadFrom(0x1c0002c53f8, {0x6ee445a0, 0x1c000166888})
        /usr/local/go/src/bytes/buffer.go:204 +0x98
crypto/tls.(*Conn).readFromUntil(0x1c0002c5180, {0x1b893024008, 0x1c00029a040}, 0x6ec62a30)
        /usr/local/go/src/crypto/tls/conn.go:800 +0xe5
crypto/tls.(*Conn).readRecordOrCCS(0x1c0002c5180, 0x0)
        /usr/local/go/src/crypto/tls/conn.go:607 +0x112
crypto/tls.(*Conn).readRecord(...)
        /usr/local/go/src/crypto/tls/conn.go:575
crypto/tls.(*Conn).Read(0x1c0002c5180, {0x1c0006078d1, 0x1, 0x1c0001c6780})
        /usr/local/go/src/crypto/tls/conn.go:1278 +0x16f
server/internal/net/http.(*connReader).backgroundRead(0x1c0006078c0)
        /source/internal/net/http/server.go:672 +0x3f
created by server/internal/net/http.(*connReader).startBackgroundRead
        /source/internal/net/http/server.go:668 +0xcf

goroutine 947 [IO wait]:
internal/poll.runtime_pollWait(0x1b89306c5c8, 0x72)
        /usr/local/go/src/runtime/netpoll.go:303 +0x85
internal/poll.(*pollDesc).wait(0x0, 0x0, 0x0)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.execIO(0x1c0003e2518, 0x6ede5f98)
        /usr/local/go/src/internal/poll/fd_windows.go:175 +0xe5
internal/poll.(*FD).Read(0x1c0003e2500, {0x1c0001c6a00, 0x6d0, 0x6d0})
        /usr/local/go/src/internal/poll/fd_windows.go:441 +0x25f
net.(*netFD).Read(0x1c0003e2500, {0x1c0001c6a00, 0x0, 0x0})
        /usr/local/go/src/net/fd_posix.go:56 +0x29
net.(*conn).Read(0x1c0000060b8, {0x1c0001c6a00, 0x6ed31860, 0x1c000227ae8})
        /usr/local/go/src/net/net.go:183 +0x45
crypto/tls.(*atLeastReader).Read(0x1c000166870, {0x1c0001c6a00, 0x0, 0x6e99a92d})
        /usr/local/go/src/crypto/tls/conn.go:778 +0x3d
bytes.(*Buffer).ReadFrom(0x1c0004ac5f8, {0x6ee445a0, 0x1c000166870})
        /usr/local/go/src/bytes/buffer.go:204 +0x98
crypto/tls.(*Conn).readFromUntil(0x1c0004ac380, {0x1b893024008, 0x1c0000060b8}, 0x0)
        /usr/local/go/src/crypto/tls/conn.go:800 +0xe5
crypto/tls.(*Conn).readRecordOrCCS(0x1c0004ac380, 0x0)
        /usr/local/go/src/crypto/tls/conn.go:607 +0x112
crypto/tls.(*Conn).readRecord(...)
        /usr/local/go/src/crypto/tls/conn.go:575
crypto/tls.(*Conn).Read(0x1c0004ac380, {0x1c00026b8d1, 0x1, 0x1c00023d440})
        /usr/local/go/src/crypto/tls/conn.go:1278 +0x16f
server/internal/net/http.(*connReader).backgroundRead(0x1c00026b8c0)
        /source/internal/net/http/server.go:672 +0x3f
created by server/internal/net/http.(*connReader).startBackgroundRead
        /source/internal/net/http/server.go:668 +0xcf

goroutine 929 [select]:
server/internal/net/http.(*persistConn).roundTrip(0x1c0001286c0, 0x1c0000a6000)
        /source/internal/net/http/transport.go:2618 +0x97d
server/internal/net/http.(*Transport).roundTrip(0x1c000456000, 0x1c000298900)
        /source/internal/net/http/transport.go:598 +0x7d1
server/internal/net/http.(*Transport).RoundTrip(...)
        /source/internal/net/http/roundtrip.go:18
server.(*RoundTripper).RoundTrip(0x1c00015d380, 0x1c000298900)
        /source/roundtripper.go:127 +0x6a5
server.StartServer.func1({0x6ee4bd70, 0x1c0005f2fc0}, 0x1c000298900)
        /source/server.go:44 +0xce
server/internal/net/http.HandlerFunc.ServeHTTP(0x1c00021da48, {0x6ee4bd70, 0x1c0005f2fc0}, 0x1c0004f8f00)
        /source/internal/net/http/server.go:2051 +0x2f
server/internal/net/http.(*ServeMux).ServeHTTP(0x0, {0x6ee4bd70, 0x1c0005f2fc0}, 0x1c000298900)
        /source/internal/net/http/server.go:2429 +0x149
server/internal/net/http.serverHandler.ServeHTTP({0x1c0006078c0}, {0x6ee4bd70, 0x1c0005f2fc0}, 0x1c000298900)
        /source/internal/net/http/server.go:2883 +0x43b
server/internal/net/http.(*conn).serve(0x1c0003501e0, {0x6ee4dc80, 0x1c000111830})
        /source/internal/net/http/server.go:1934 +0xb08
created by server/internal/net/http.(*Server).Serve
        /source/internal/net/http/server.go:3038 +0x4e8

goroutine 894 [IO wait]:
internal/poll.runtime_pollWait(0x1b89306c6b8, 0x72)
        /usr/local/go/src/runtime/netpoll.go:303 +0x85
internal/poll.(*pollDesc).wait(0xd, 0x80000000000, 0x0)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.execIO(0x1c000335918, 0x6ede5f98)
        /usr/local/go/src/internal/poll/fd_windows.go:175 +0xe5
internal/poll.(*FD).Read(0x1c000335900, {0x1c000476000, 0x13ef, 0x13ef})
        /usr/local/go/src/internal/poll/fd_windows.go:441 +0x25f
net.(*netFD).Read(0x1c000335900, {0x1c000476000, 0x1c0000bd960, 0x6ed8d500})
        /usr/local/go/src/net/fd_posix.go:56 +0x29
net.(*conn).Read(0x1c00027c0a8, {0x1c000476000, 0x0, 0x1c0000bd9e8})
        /usr/local/go/src/net/net.go:183 +0x45
github.com/refraction-networking/utls.(*atLeastReader).Read(0x1c000092030, {0x1c000476000, 0x0, 0x6e99a92d})
        /go/pkg/mod/github.com/sleeyax/utls@v1.1.1/conn.go:780 +0x3d
bytes.(*Buffer).ReadFrom(0x1c0003b85d8, {0x6ee44760, 0x1c000092030})
        /usr/local/go/src/bytes/buffer.go:204 +0x98
github.com/refraction-networking/utls.(*Conn).readFromUntil(0x1c0003b8380, {0x1b893024008, 0x1c00027c0a8}, 0x1c000298723)
        /go/pkg/mod/github.com/sleeyax/utls@v1.1.1/conn.go:802 +0xe5
github.com/refraction-networking/utls.(*Conn).readRecordOrCCS(0x1c0003b8380, 0x0)
        /go/pkg/mod/github.com/sleeyax/utls@v1.1.1/conn.go:609 +0x10f
github.com/refraction-networking/utls.(*Conn).readRecord(...)
        /go/pkg/mod/github.com/sleeyax/utls@v1.1.1/conn.go:577
github.com/refraction-networking/utls.(*Conn).Read(0x1c0003b8380, {0x1c0002b5000, 0x1000, 0x3})
        /go/pkg/mod/github.com/sleeyax/utls@v1.1.1/conn.go:1259 +0x157
server/internal/net/http.(*persistConn).Read(0x1c0001286c0, {0x1c0002b5000, 0x6e99601d, 0x60})
        /source/internal/net/http/transport.go:1930 +0x4e
bufio.(*Reader).fill(0x1c0001f4240)
        /usr/local/go/src/bufio/bufio.go:101 +0x103
bufio.(*Reader).Peek(0x1c0001f4240, 0x1)
        /usr/local/go/src/bufio/bufio.go:139 +0x5d
server/internal/net/http.(*persistConn).readLoop(0x1c0001286c0)
        /source/internal/net/http/transport.go:2091 +0x1ac
created by server/internal/net/http.(*Transport).dialConn
        /source/internal/net/http/transport.go:1751 +0x1e05

goroutine 909 [select]:
server/internal/net/http.(*persistConn).roundTrip(0x1c000214120, 0x1c00015c100)
        /source/internal/net/http/transport.go:2618 +0x97d
server/internal/net/http.(*Transport).roundTrip(0x1c000240280, 0x1c00022ee00)
        /source/internal/net/http/transport.go:598 +0x7d1
server/internal/net/http.(*Transport).RoundTrip(...)
        /source/internal/net/http/roundtrip.go:18
server.(*RoundTripper).RoundTrip(0x1c0000a71c0, 0x1c00022ee00)
        /source/roundtripper.go:127 +0x6a5
server.StartServer.func1({0x6ee4bd70, 0x1c000262e00}, 0x1c00022ee00)
        /source/server.go:44 +0xce
server/internal/net/http.HandlerFunc.ServeHTTP(0x1c000219a48, {0x6ee4bd70, 0x1c000262e00}, 0x1c0003e2500)
        /source/internal/net/http/server.go:2051 +0x2f
server/internal/net/http.(*ServeMux).ServeHTTP(0x0, {0x6ee4bd70, 0x1c000262e00}, 0x1c00022ee00)
        /source/internal/net/http/server.go:2429 +0x149
server/internal/net/http.serverHandler.ServeHTTP({0x1c00026b8c0}, {0x6ee4bd70, 0x1c000262e00}, 0x1c00022ee00)
        /source/internal/net/http/server.go:2883 +0x43b
server/internal/net/http.(*conn).serve(0x1c00045d540, {0x6ee4dc80, 0x1c000111830})
        /source/internal/net/http/server.go:1934 +0xb08
created by server/internal/net/http.(*Server).Serve
        /source/internal/net/http/server.go:3038 +0x4e8

goroutine 964 [IO wait]:
internal/poll.runtime_pollWait(0x1b89306c4d8, 0x72)
        /usr/local/go/src/runtime/netpoll.go:303 +0x85
internal/poll.(*pollDesc).wait(0x0, 0x8, 0x0)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.execIO(0x1c0003e2798, 0x6ede5f98)
        /usr/local/go/src/internal/poll/fd_windows.go:175 +0xe5
internal/poll.(*FD).Read(0x1c0003e2780, {0x1c000477500, 0x13ef, 0x13ef})
        /usr/local/go/src/internal/poll/fd_windows.go:441 +0x25f
net.(*netFD).Read(0x1c0003e2780, {0x1c000477500, 0x0, 0x10100b836ae768d})
        /usr/local/go/src/net/fd_posix.go:56 +0x29
net.(*conn).Read(0x1c00027c0b0, {0x1c000477500, 0x1c0001d1988, 0x1c0001d19e8})
        /usr/local/go/src/net/net.go:183 +0x45
github.com/refraction-networking/utls.(*atLeastReader).Read(0x1c0000c81f8, {0x1c000477500, 0x0, 0x6e99a92d})
        /go/pkg/mod/github.com/sleeyax/utls@v1.1.1/conn.go:780 +0x3d
bytes.(*Buffer).ReadFrom(0x1c0003b8958, {0x6ee44760, 0x1c0000c81f8})
        /usr/local/go/src/bytes/buffer.go:204 +0x98
github.com/refraction-networking/utls.(*Conn).readFromUntil(0x1c0003b8700, {0x1b893024008, 0x1c00027c0b0}, 0x3)
        /go/pkg/mod/github.com/sleeyax/utls@v1.1.1/conn.go:802 +0xe5
github.com/refraction-networking/utls.(*Conn).readRecordOrCCS(0x1c0003b8700, 0x0)
        /go/pkg/mod/github.com/sleeyax/utls@v1.1.1/conn.go:609 +0x10f
github.com/refraction-networking/utls.(*Conn).readRecord(...)
        /go/pkg/mod/github.com/sleeyax/utls@v1.1.1/conn.go:577
github.com/refraction-networking/utls.(*Conn).Read(0x1c0003b8700, {0x1c00046a000, 0x1000, 0x0})
        /go/pkg/mod/github.com/sleeyax/utls@v1.1.1/conn.go:1259 +0x157
server/internal/net/http.(*persistConn).Read(0x1c000214120, {0x1c00046a000, 0x6e99601d, 0x60})
        /source/internal/net/http/transport.go:1930 +0x4e
bufio.(*Reader).fill(0x1c00023e6c0)
        /usr/local/go/src/bufio/bufio.go:101 +0x103
bufio.(*Reader).Peek(0x1c00023e6c0, 0x1)
        /usr/local/go/src/bufio/bufio.go:139 +0x5d
server/internal/net/http.(*persistConn).readLoop(0x1c000214120)
        /source/internal/net/http/transport.go:2091 +0x1ac
created by server/internal/net/http.(*Transport).dialConn
        /source/internal/net/http/transport.go:1751 +0x1e05

goroutine 965 [select]:
server/internal/net/http.(*persistConn).writeLoop(0x1c000214120)
        /source/internal/net/http/transport.go:2390 +0xfb
created by server/internal/net/http.(*Transport).dialConn
        /source/internal/net/http/transport.go:1752 +0x1e65

Btw nice work, the extension works great :) Should i open another issue?

sleeyax commented 1 year ago

Yes, please open another issue.

AlecHaring commented 1 year ago

I ran into this error as well on macOS 12.6 w/ Burp Suite CE v2022.8.4 right after installing. Closing and reopening Burp seemed to solve the problem for me

root0xa3 commented 1 year ago

Am sorry for the late responses, it been a while since I use the computer hope you are good. About my environment OS: Archlinux with Java 17

On Fri, Sep 23, 2022, 4:55 AM Alec Haring, @.***> wrote:

I ran into this error as well on macOS 12.6 w/ Burp Suite CE v2022.8.4 right after installing. Closing and reopening Burp seemed to solve the problem for me

— Reply to this email directly, view it on GitHub https://github.com/sleeyax/burp-awesome-tls/issues/15#issuecomment-1255801311, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOCILUFLDJRKNW57KIPBH4DV7UZ3VANCNFSM56OG4PQA . You are receiving this because you authored the thread.Message ID: @.***>

AlecHaring commented 1 year ago

@root0xa3, try the newest release. If you still get the error, try restarting Burp

sleeyax commented 1 year ago

Am sorry for the late responses, it been a while since I use the computer hope you are good. About my environment OS: Archlinux with Java 17 On Fri, Sep 23, 2022, 4:55 AM Alec Haring, @.> wrote: I ran into this error as well on macOS 12.6 w/ Burp Suite CE v2022.8.4 right after installing. Closing and reopening Burp seemed to solve the problem for me — Reply to this email directly, view it on GitHub <#15 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOCILUFLDJRKNW57KIPBH4DV7UZ3VANCNFSM56OG4PQA . You are receiving this because you authored the thread.Message ID: @.>

Odd, I have the same setup and still can't reproduce this. I might try again later in a VM just so I can get glimpse of what you're experiencing. Try the suggested work around for now.

sleeyax commented 1 year ago

Just tried to install the extension in a Ubuntu 22.04 VM with default setup and got the same error. I finally managed to reproduce this! Seems to only happen upon installation though. Reloading the extension after installation seems to 'fix' the issue.

sleeyax commented 1 year ago

I guess it could be related to the Java version then. On Ubuntu, Burp Suite's installer bundles OpenJDK 17:

$ pwd
/usr/local/BurpSuitePro
$ ./jre/bin/java --version
openjdk 17.0.2 2022-01-18
OpenJDK Runtime Environment (build 17.0.2+8-86)
OpenJDK 64-Bit Server VM (build 17.0.2+8-86, mixed mode)
AlecHaring commented 1 year ago

Based on the error traceback, I think it's a race condition with the settings. It's trying to parseInt the timeout setting before its default value is set, which explains why it only occurs during the initial installation. After the initial installation, all of the settings' values are already set.

sleeyax commented 1 year ago

Could be, it's just odd that I can never reproduce this on my local install (which actually uses openjdk 19, not 17) and can only reproduce this on ubuntu with the bundled openjdk 17.

In fact, the extension doesn't even seem to work at all on ubuntu because the server isn't even starting. That could be a configuration issue on my hand related to permissions, but if it's not there are bigger issues at play here. I will create an other issue for this if the solution doesn't become apparent soon.

AlecHaring commented 1 year ago

Burp extension settings seem to persist even after the extension is removed. For example, try changing the Listener address, remove the extension, and then reinstall it. You'll see that your change is still there. So that might be why you can't reproduce it on your local install. You're not actually starting from a clean slate. I had this problem the first time I ever installed the extension, and haven't run into it since. I'm having trouble figuring out exactly where the settings are stored, but I suspect if you were able to find and delete the file, you'd be able to reproduce the issue.

I can do some more investigating tomorrow

sleeyax commented 1 year ago

I just reset burp via Help > Clean Burp from computer > Remove saved configuration files (warning; this deletes all settings, not just extension settings) but the issue is still not reproducible on my arch install 😅

Anyways, it probably isn't relevant. There should be enough information here to look for the actual cause.

AlecHaring commented 1 year ago

I just reset burp via Help > Clean Burp from computer > Remove saved configuration files

Did you check to see if your changed extension settings were reverted after doing this? I just tried, and my changes were never reverted. All my Burp extensions were removed, but their settings were not.

sleeyax commented 1 year ago

I just reset burp via Help > Clean Burp from computer > Remove saved configuration files

Did you check to see if your changed extension settings were reverted after doing this? I just tried, and my changes were never reverted. All my Burp extensions were removed, but their settings were not.

For real? I didn't notice that, oops. Now I wonder if uninstalling/purging burp from the system even removes the extension settings...

AlecHaring commented 1 year ago

It doesn't seem like it.

I found out where the settings are stored on macOS: ~/Library/Preferences/burp.extensions._awesome tls.plist

Screen Shot 2022-10-28 at 4 03 48 PM

BUT... the settings must be stored somewhere else as well because after closing Burp, deleting the file, and then reopening Burp, the settings are still set. I even tried Help > Clean Burp from computer > Remove saved configuration files and then deleting the plist file.

I also noticed after closing Burp, it saves settings to ~/.BurpSuite/UserConfigCommunity.json (UserConfig.json for Burp Pro?), but it doesn't seem to contain extension-specific settings

r3l1c7 commented 1 year ago

Same issue with Windows 11 JAVA 8.0.3330.2

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 burp.ni1.c(Unknown Source) at burp.c59.j(Unknown Source) at burp.c5q.lambda$initialiseOnNewThread$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)

nicoandmee commented 1 year ago

Same issue. Arch linux

openjdk 20.0.1 2023-04-18
OpenJDK Runtime Environment (build 20.0.1+9)
OpenJDK 64-Bit Server VM (build 20.0.1+9, mixed mode, sharing
ndl1302732 commented 1 year ago

C:\Users\xxxx>java --version java 17.0.6 2023-01-17 LTS Java(TM) SE Runtime Environment (build 17.0.6+9-LTS-190) Java HotSpot(TM) 64-Bit Server VM (build 17.0.6+9-LTS-190, mixed mode, sharing)

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.Zob6.ZB(Unknown Source) at burp.Zilc.Zy(Unknown Source) at burp.Zilx.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)

sleeyax commented 1 year ago

For those who are still experiencing this issue: just ignore it and reload the extension. It should work afterwards.

I won't fix this until https://github.com/sleeyax/burp-awesome-tls/issues/25 is finished.