Arachni / arachni

Web Application Security Scanner Framework
http://www.arachni-scanner.com
Other
3.76k stars 761 forks source link

Scanning stop with error on Ubuntu 20.04 server #1058

Closed easycloudcompany closed 2 years ago

easycloudcompany commented 2 years ago

Hi Installed on Ubuntu 20.04 server when lounh the scanning does not work with this log:

[2022-02-08 14:53:59 +0000] Please ensure that chromedriver and Chrome are the same version and in your PATH.
[2022-02-08 14:53:59 +0000] [Selenium::WebDriver::Error::WebDriverError] unable to connect to /home/arachni/APP/arachni-2.0dev-1.0dev/bin/../system/usr/bin/chromedriver 127.0.0.1:9515
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/gems/selenium-webdriver-4.1.0/lib/selenium/webdriver/common/service_manager.rb:139:in `connect_until_stable'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/gems/selenium-webdriver-4.1.0/lib/selenium/webdriver/common/service_manager.rb:57:in `block in start'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/gems/selenium-webdriver-4.1.0/lib/selenium/webdriver/common/socket_lock.rb:41:in `locked'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/gems/selenium-webdriver-4.1.0/lib/selenium/webdriver/common/service_manager.rb:54:in `start'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/gems/selenium-webdriver-4.1.0/lib/selenium/webdriver/common/service.rb:84:in `launch'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/gems/selenium-webdriver-4.1.0/lib/selenium/webdriver/common/driver.rb:374:in `service_url'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/gems/selenium-webdriver-4.1.0/lib/selenium/webdriver/common/driver.rb:311:in `create_bridge'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/gems/selenium-webdriver-4.1.0/lib/selenium/webdriver/common/driver.rb:74:in `initialize'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/gems/selenium-webdriver-4.1.0/lib/selenium/webdriver/common/driver.rb:47:in `new'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/gems/selenium-webdriver-4.1.0/lib/selenium/webdriver/common/driver.rb:47:in `for'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/gems/selenium-webdriver-4.1.0/lib/selenium/webdriver.rb:88:in `for'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/bundler/gems/arachni-906ac80d3a68/lib/arachni/browser.rb:1100:in `selenium'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/bundler/gems/arachni-906ac80d3a68/lib/arachni/browser.rb:1273:in `start_webdriver'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/bundler/gems/arachni-906ac80d3a68/lib/arachni/browser.rb:192:in `initialize'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/bundler/gems/arachni-906ac80d3a68/lib/arachni/browser_cluster/worker.rb:51:in `initialize'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/bundler/gems/arachni-906ac80d3a68/lib/arachni/browser_cluster.rb:495:in `new'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/bundler/gems/arachni-906ac80d3a68/lib/arachni/browser_cluster.rb:495:in `block in initialize_workers'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/bundler/gems/arachni-906ac80d3a68/lib/arachni/browser_cluster.rb:494:in `times'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/bundler/gems/arachni-906ac80d3a68/lib/arachni/browser_cluster.rb:494:in `initialize_workers'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/bundler/gems/arachni-906ac80d3a68/lib/arachni/browser_cluster.rb:112:in `initialize'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/bundler/gems/arachni-906ac80d3a68/lib/arachni/framework/parts/browser.rb:33:in `new'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/bundler/gems/arachni-906ac80d3a68/lib/arachni/framework/parts/browser.rb:33:in `block in browser_cluster'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/usr/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/bundler/gems/arachni-906ac80d3a68/lib/arachni/framework/parts/browser.rb:28:in `browser_cluster'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/bundler/gems/arachni-906ac80d3a68/lib/arachni/framework/parts/audit.rb:173:in `audit'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/bundler/gems/arachni-906ac80d3a68/lib/arachni/framework.rb:117:in `block in run'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/bundler/gems/arachni-906ac80d3a68/lib/arachni/utilities.rb:425:in `exception_jail'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/bundler/gems/arachni-906ac80d3a68/lib/arachni/framework.rb:117:in `run'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/bundler/gems/arachni-906ac80d3a68/lib/arachni/rpc/server/framework.rb:156:in `block in run'
[2022-02-08 14:53:59 +0000] 
[2022-02-08 14:53:59 +0000] Parent:
[2022-02-08 14:53:59 +0000] Arachni::RPC::Server::Framework
[2022-02-08 14:53:59 +0000] 
[2022-02-08 14:53:59 +0000] Block:
[2022-02-08 14:53:59 +0000] #<Proc:0x0000563510c5b9a8@/home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/bundler/gems/arachni-906ac80d3a68/lib/arachni/framework.rb:117>
[2022-02-08 14:53:59 +0000] 
[2022-02-08 14:53:59 +0000] Caller:
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/bundler/gems/arachni-906ac80d3a68/lib/arachni/utilities.rb:424:in `exception_jail'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/bundler/gems/arachni-906ac80d3a68/lib/arachni/framework.rb:117:in `run'
[2022-02-08 14:53:59 +0000] /home/arachni/APP/arachni-2.0dev-1.0dev/system/gems/bundler/gems/arachni-906ac80d3a68/lib/arachni/rpc/server/framework.rb:156:in `block in run'
[2022-02-08 14:53:59 +0000] --------------------------------------------------------------------------------
Zapotek commented 2 years ago

Hello,

Is chromedriver and Chrome installed on the machine?

easycloudcompany commented 2 years ago

Hi before your answer no thanks!! But I've still an error [2022-02-08 15:53:23 +0000] Please ensure that chromedriver and Chrome are the same version and in your PATH. [2022-02-08 15:53:23 +0000] [Selenium::WebDriver::Error::UnknownError] unknown error: Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

Zapotek commented 2 years ago

Can you please run this in the terminal and post the result:

$ whereis chromedriver
easycloudcompany commented 2 years ago

arachni@arachni:~/APP/arachni-2.0dev-1.0dev/bin$ $whereis chromedriver Starting ChromeDriver 94.0.4606.61 (418b78f5838ed0b1c69bb4e51ea0252171854915-refs/branch-heads/4606@{#1204}) on port 9515 Only local connections are allowed. Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe. ChromeDriver was started successfully.

Zapotek commented 2 years ago

Unless you've placed the package's bin directory in your path it wont work, Copy chromedriver to /usr/bin/chromedriver (for example) and try again please.

easycloudcompany commented 2 years ago

Thanks for your patience and your very great support I've understood that the problem comes from Chrome driver, now the directory path is correct but the problem persist

Last login: Tue Feb 8 15:56:31 2022 from 1xxxxxxx arachni@arachni:~$ whereis chromedriver chromedriver: /usr/bin/chromedriver

Zapotek commented 2 years ago

Please show me the output of:

chromedriver --version
google-chrome --version
easycloudcompany commented 2 years ago

arachni@arachni:/usr/bin$ chromedriver --version ChromeDriver 94.0.4606.61 (418b78f5838ed0b1c69bb4e51ea0252171854915-refs/branch-heads/4606@{#1204})

arachni@arachni:/usr/bin$ google-chrome --version Google Chrome 98.0.4758.80

Zapotek commented 2 years ago

You need version 98: https://chromedriver.storage.googleapis.com/index.html?path=98.0.4758.80/

Let me know how it works.

easycloudcompany commented 2 years ago

Now the version seems to be ok arachni@arachni:~/APP/arachni-2.0dev-1.0dev/bin$ chromedriver --version ChromeDriver 98.0.4758.80 (7f0488e8ba0d8e019187c6325a16c29d9b7f4989-refs/branch-heads/4758@{#972}) but still the same problem

[2022-02-08 16:58:58 +0000] Please ensure that chromedriver and Chrome are the same version and in your PATH. [2022-02-08 16:58:58 +0000] [Selenium::WebDriver::Error::UnknownError] unknown error: Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

Zapotek commented 2 years ago

Are you running as root?

easycloudcompany commented 2 years ago

Sorry a made a lot of test reinstalling Chrome and running all as root but the problem is still the same. I've used the following guide https://tecadmin.net/setup-selenium-chromedriver-on-ubuntu/ that use Selenium Server could be this the problem?

Zapotek commented 2 years ago

You didn't have to use that guide, it looks pretty old and has nothing to do with Arachni. It could have lead to a broken environment.

I'm not sure how to help you.

easycloudcompany commented 2 years ago

Thanks too much for your precius support, at last can you suggest a complete guide to install correctly arachni on Ubuntu server so that i can follow the step by step installation guide starting from zero? Thanks a lot

Zapotek commented 2 years ago
  1. First off, please start with a clean environment.
  2. Install Chrome from its official site.
  3. Download a chromdedriver version that is identical to Chrome.
  4. Place the chromedriver executable in /usr/bin/

Then download the nightlies and simply extract to a directory when you have write privileges. Test it with bin/arachni http://testhtml5.vulnweb.com

easycloudcompany commented 2 years ago

Thanks too much

Zapotek commented 2 years ago

The new nightlies bundle Chrome and chromedriver so they should just work.

venuszhuliguo commented 2 years ago

Hi, everyone, has this problem been solved? Now I have the same problem. The platform is AARCH64, I wonder if arachni of ARM architecture can be used directly.