Giter Club home page Giter Club logo

hashview-agent's Introduction

!!! THIS PROJECT IS DEPRICATED !!!

It will no longer be maintained. If you wish to use the latest version of hashview, please checkout https://github.com/hashview/hashview

Hashview Agent

This is the headless agent that connects to the master instance of Hashview to support distributed cracking.

Warning! distributed support is very ALPHA. This agent only works with dev instances of Hashview!

More information about distributed support can be found here: Hashview Wiki - Distributed Cracking

Prerequisites

We strongly suggest using RVM: \curl -sSL https://get.rvm.io | bash -s stable --ruby

Networking Requirements

Agents heartbeat to the master server where your full install of Hashview is located. You'll need inbound port 4567/tcp traffic for agents to communicate.

Install

  1. Clone the hashview-agent repo

    git clone https://github.com/hashview/hashview-agent

  2. Install gems

    gem install bundler
    bundle install

  3. Provision the agent

    RACK_ENV=production rake provision_remote_agent

    A new configuration file will be generated at config/agent_config.json. Note the UUID for the agent is generated at this time. This UUID should be treated similar to an API key.

  4. Define your master server by IP (where the full install of Hashview is located) and path to your hashcat binary. Example config below:

{
  "master_ip": "192.168.1.1",
  "port": "4567",
  "uuid": "31c4ec48-e7b1-1af9-b1b0-7e1d77c57928",
  "hc_binary_path": "/home/meatball/hashcat-3.30/hashcat64.bin"
}
  1. Start the agent

    RACK_ENV=production ruby agent.rb

  2. Verify you see the hearbeats on your master instance under the "Agents" menu. A status of 'Pending' will exist until you've authorized the agent to join the cluster. Once Authorized, the agent will take tasks off the queue and hearbeat with its hashcat status.

Happy Cracking!

hashview-agent's People

Contributors

ccammilleri avatar i128 avatar mike198300 avatar nicbrink avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

hashview-agent's Issues

distributing don't work

I have a "cluster" of 4 maschines and everytime the Hashview Head will assign work to one of the remote agents I get following error on the agent

Normal Logout:
{"status"=>200, "type"=>"message", "msg"=>"OK"}
HEARTBEETING

{"status"=>200, "type"=>"message", "msg"=>"START", "task_id"=>"13"}
HEARTBEETING
you need to download Smart Wordlist = e3b0c4.....52b855 //shortened
Downloading...
Unpacking....
Calculating checksum

Then the Error:
/opt/hashview-agent/background_worker.rb:364:in block in sync_wordlists': undefined local variable or method checksum' for main:Object (NameError) from /opt/hashview-agent/background_worker.rb:325:in each'
from /opt/hashview-agent/background_worker.rb:325:in sync_wordlists' from /opt/hashview-agent/background_worker.rb:445:in <top (required)>'
from agent.rb:18:in require_relative' from agent.rb:18:in

'`

I synced rules and wordlists manualy but it didn't help.
Hashview master Version: 0.7.1
Hashview-agent Verson: latest commit
OS: Ubuntu 16.04.3 LTS

Hashview Agent on Windows

This may not be the right place for this, but I was able to get the Hashview-agent to run on Windows with surprisingly little effort.

Here are the directions I put together:

Install Intel CL Drivers:
https://software.intel.com/en-us/articles/opencl-drivers#latest_CPU_runtime

Install AMD Catalyst Drivers:
http://support.amd.com/en-us/kb-articles/Pages/latest-catalyst-windows-beta.aspx

Install HashCat:
https://hashcat.net/hashcat/
#Note: I installed it to d:\opt\hashcat

Test Hashcat:
hashcat64.exe -m 1000 -b

Install Git:
#Note this is for two reasons, one to pull the agent, but more importantly it comes with mingw64
#Use Option 3, Git and optional Unix tools from the windows command prompt

Download Hash-view Agent:
git clone https://github.com/hashview/hashview-agent.git

Download and install Ruby:
https://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.2.2-x64.exe
#Note check the add ruby to the system path option

#Update the Certificate using this link - There is an issue with ruby and windows regarding SSL certificates, I had to manually update the cert to install gems
http://guides.rubygems.org/ssl-certificate-update/#manual-solution-to-ssl-issue

Install Bundler:
gem install bundler

#Change directory to hashview
bundle install
#Ignore the JSON error, or remove the JSON entry from the Gemfile since ruby has the JSON gem already

#Note: if git did not add its linux tools to the path, do so now
PATH=%path%;d:\opt\git\usr\bin\

Provision:
set RACK_ENV=production
rake provision_remote_agent

Edit the config file:
{
"master_ip": "10.1.1.1",
"port": "4567",
"uuid": "26f8f90f-0776-44e3-85f5-27b74fd890eb",
"hc_binary_path": "d:\opt\hashcat\hashcat64.exe",
"type": "slave"
}

Running:
set RACK_ENV=production
ruby agent.rb

I get this error the first time I run it, but it seems fine after that

D:/opt/Ruby22-x64/lib/ruby/2.2.0/json/common.rb:155:in `parse': 757: unexpected token at '"#<Sinatra::Response:0x007f36e4d62de8>"' (JSON::ParserError)
        from D:/opt/Ruby22-x64/lib/ruby/2.2.0/json/common.rb:155:in `parse'
        from D:/opt/hashview/background_worker.rb:327:in `<top (required)>'
        from agent.rb:17:in `require_relative'
        from agent.rb:17:in `<main>'
agent has 2 CPUs
agent has 1 GPUs
agent max cracking speed (single NTLM hash):
  2595.1 MH/s (50.91ms)
HEARTBEETING

Realtime upload of Hashes

I think I have figured out how to upload cracked hashes in near realtime instead of having to wait until a job ends. Take a look at commit: 1a59f48 which I think is included with my pull request (I still dont have the hang of github). In the main loop I added logic to copy out the new lines that have been added to the cracked file into a new file in the tmp folder and then upload that.

Im not sure if there are any repercussions from this change, but so far in my tests it seems to be working well. Let me know what you think.

Background_worker.rb wordlist transfer

So this took me a bit to track down. Using the latest agent code I could no longer get the agent to work on windows. Everytime it would download a worldist it will error out saying the gz file is corrupt. I tracked it back to the way ruby handles on file transfers. On windows binary mode make a difference where on osx and linux it does not make a difference.

Here is the error you get:
gunzip: control\wordlists\password.gz: invalid compressed data--crc error
Calculating checksum
sha256sum: control/wordlists/password: No such file or directory

Here is the fix:
Line 331: File.open('control/tmp/' + filename + '.gz', 'w') {|f|
to
File.open('control/tmp/' + filename + '.gz', 'wbโ€™) {|f|

I have tested this fix on both Linux and Windows and it downloads wordlists correctly.

My reference site:
https://www.rubytapas.com/2016/12/14/ruby-code-on-windows/

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.