nuclei icon indicating copy to clipboard operation
nuclei copied to clipboard

[FTL] Could not create runner: Can't find a browser binary for your OS

Open MadMowgli opened this issue 2 years ago • 3 comments

Issue Description

nuclei -validate returns with the error shown below. Most importantly: [FTL] Could not create runner: Can't find a browser binary for your OS, the doc might help https://go-rod.github.io/#/compatibility?id=os

└─$ nuclei -validate           

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   2.7.2

                projectdiscovery.io

[WRN] Use with caution. You are responsible for your actions.
[WRN] Developers assume no liability and are not responsible for any misuse or damage.
[launcher.Browser]2022/06/13 15:16:37 try to find the fastest host to download the browser binary
[launcher.Browser]2022/06/13 15:16:37 check https://storage.googleapis.com/chromium-browser-snapshots//1003583/
[launcher.Browser]2022/06/13 15:16:37 check https://registry.npmmirror.com/-/binary/chromium-browser-snapshots//1003583/
[launcher.Browser]2022/06/13 15:16:37 check https://playwright.azureedge.net/builds/chromium/1003583/chromium-linux-arm64.zip
[FTL] Could not create runner: Can't find a browser binary for your OS, the doc might help https://go-rod.github.io/#/compatibility?id=os

OS Description

└─$ uname -a
Linux kali 5.15.0-kali3-amd64 projectdiscovery/nuclei-templates#1 SMP Debian 5.15.15-2kali1 (2022-01-31) x86_64 GNU/Linux

*Note: I am running my Kali on an Oracle VBox.

What I've tried

  1. Visiting https://go-rod.github.io/#/compatibility?id=os
  2. Running wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb followed by apt install ./google-chrome-stable_current_amd64.deb

MadMowgli avatar Jun 13 '22 19:06 MadMowgli

Update

  • Since this is somewhat of a different issue now, let me know if I should split this into 2 separate tickets.

TLDR

  • The alias associated with the nuclei binary seemed to be the problem.
  • I could solve the original issue by running nuclei with the in-directory, direct ./nuclei -validate command
  • However, the validation command worked exactly for 1 time.
    • Regardless of using the nuclei -validate command with or without alias, it now returns with a different error, coming directly from GO: panic: unaligned 64-bit atomic operation
  • How do I solve this?

Detailed Info

  • The thought that it might be the alias associated with nuclei crossed my mind.

  • As stated in my original post, nuclei seemed to fail while launching / downloading a suitable browser binary.

  • I ran the command (nuclei -validate) from a random directory, having my ~/.zshrc equipped with the following alias: alias nuclei='/usr/local/bin/nuclei'

  • However, when I cd /usr/local/bin/nuclei and ran the validate-command from there - without using the alias - it seemed to work:

─$ ./nuclei -validate  

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   2.7.2

                projectdiscovery.io

[WRN] Use with caution. You are responsible for your actions.
[WRN] Developers assume no liability and are not responsible for any misuse or damage.
[launcher.Browser]2022/06/14 04:54:55 try to find the fastest host to download the browser binary
[launcher.Browser]2022/06/14 04:54:55 check https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/1003583/chrome-linux.zip
[launcher.Browser]2022/06/14 04:54:55 check https://registry.npmmirror.com/-/binary/chromium-browser-snapshots/Linux_x64/1003583/chrome-linux.zip
[launcher.Browser]2022/06/14 04:54:55 check https://playwright.azureedge.net/builds/chromium/1003583/chromium-linux-arm64.zip
[launcher.Browser]2022/06/14 04:54:55 check result: Get "https://playwright.azureedge.net/builds/chromium/1003583/chromium-linux-arm64.zip": context canceled
[launcher.Browser]2022/06/14 04:54:55 check result: Get "https://registry.npmmirror.com/-/binary/chromium-browser-snapshots/Linux_x64/1003583/chrome-linux.zip": context canceled
[launcher.Browser]2022/06/14 04:54:55 Download: https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/1003583/chrome-linux.zip
[launcher.Browser]2022/06/14 04:54:56 Progress:
[launcher.Browser]2022/06/14 04:54:56 00%
...
[launcher.Browser]2022/06/14 04:55:08 100%
[launcher.Browser]2022/06/14 04:55:08 Unzip to: /home/kali/.cache/rod/browser/chromium-1003583
[launcher.Browser]2022/06/14 04:55:08 Progress:
[launcher.Browser]2022/06/14 04:55:08 00%
...
[launcher.Browser]2022/06/14 04:55:12 100%
  • So it seemed to download the required browser binary.
  • Running the validation-command using the "direct call" ./nuclei -validate ~~works~~. Great feature btw!
    • Update: Yeah... it worked - but just for once. :-) I'm now returning the error described below, no matter if I use the alias or the direct ./nuclei command. Still a great feature though, fr!

Further errors

  • After running the ./nuclei -validate command successfully once, it now fails regardless of which option I use.
  • The alias as well as the direct command now return with a GO-error:
└─$ nuclei -validate

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   2.7.2

                projectdiscovery.io

[WRN] Use with caution. You are responsible for your actions.
[WRN] Developers assume no liability and are not responsible for any misuse or damage.
panic: unaligned 64-bit atomic operation

goroutine 1 [running]:
runtime/internal/atomic.panicUnaligned()
        runtime/internal/atomic/unaligned.go:8 +0x2d
runtime/internal/atomic.Xadd64(0xc154124, 0x1)
        runtime/internal/atomic/atomic_386.s:125 +0x11
github.com/go-rod/rod/lib/cdp.(*Client).Call(0xc154100, {0x95479ec, 0xc0240c0}, {0x0, 0x0}, {0x8f71f12, 0x19}, {0x8e35240, 0xc2d80c0})
        github.com/go-rod/[email protected]/lib/cdp/client.go:89 +0x8c
github.com/go-rod/rod.(*Browser).Call(0xce80090, {0x95479ec, 0xc0240c0}, {0x0, 0x0}, {0x8f71f12, 0x19}, {0x8e35240, 0xc2d80c0})
        github.com/go-rod/[email protected]/browser.go:235 +0x6e
github.com/go-rod/rod/lib/proto.call({0x8f71f12, 0x19}, {0x8e35240, 0xc2d80c0}, {0x0, 0x0}, {0x95426d8, 0xce80090})
        github.com/go-rod/[email protected]/lib/proto/a_interface.go:63 +0xf9
github.com/go-rod/rod/lib/proto.TargetSetDiscoverTargets.Call(...)
        github.com/go-rod/[email protected]/lib/proto/target.go:455
github.com/go-rod/rod.(*Browser).Connect(0xce80090)
        github.com/go-rod/[email protected]/browser.go:168 +0x184
github.com/projectdiscovery/nuclei/v2/pkg/protocols/headless/engine.New(0x9ded7e0)
        github.com/projectdiscovery/nuclei/v2/pkg/protocols/headless/engine/engine.go:86 +0xaf4
github.com/projectdiscovery/nuclei/v2/internal/runner.New(0x9ded7e0)
        github.com/projectdiscovery/nuclei/v2/internal/runner/runner.go:93 +0x339
main.main()
        ./main.go:42 +0x1c2

MadMowgli avatar Jun 14 '22 09:06 MadMowgli

Are you running a 32 bits nuclei copy by any chance, @MadMowgli?

        runtime/internal/atomic/atomic_386.s:125 +0x11

Could you please share your environment variables (with any sensitive info redacted, ofc), the output of $ uname -m and the $ file /usr/local/bin/nuclei output? It should look like this:

nuclei: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=ZyroPqMVqft5vgU_sjp4/TLPuW6Wm3PrTTdGc4Unt/mGPBhngWb9s86xXhiiwn/NzBaS132-M68Oq954P9t, stripped

Thanks!

jimen0 avatar Jul 13 '22 13:07 jimen0

@MadMowgli I just downloaded a fresh copy of Kali Linux from https://www.kali.org/get-kali/#kali-virtual-machines:

$ uname -a
Linux kali 5.16.0-kali7-amd64 #1 SMP PREEMPT Debian 5.16.18-1kali1 (2022-04-01) x86_64 GNU/Linux

Using nuclei from Kali repositories or installed via go install work:

$ sudo apt install golang
$ go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest
$ sudo apt install nuclei
$ /home/kali/go/bin/nuclei -validate
[INF] All templates validated successfully
$ nuclei -validate
[INF] All templates validated successfully

Everything seems to work correctly. Did you install nuclei via apt from the official Kali repositories?

Mzack9999 avatar Jul 25 '22 05:07 Mzack9999