Run Hashtopolis agent in macOS Catalina

Introduction

hashcat is the world’s fastest password cracker and first and only in-kernel rule engine. It relies on the CPU or GPU power to test the passwords based on either pattern (rules) or by brute-force attacks. Yet one computer cannot have adequate computing power to crack passwords in a reasonable time, therefore we need a tool like Hashtopolis to help distribute the password cracking workload to other computers.

Hashtopolis is a multi-platform client-server tool for distributing hashcat tasks, which aim to crack passwords, to multiple computers. The main goals for Hashtopolis’s development are portability, robustness, multi-user support, and multiple groups management.

So what’s the problem?

The Hashtopolis agent can run on Windows or Linux machines without problems. But when it comes to macOS Catalina, the agent cannot be run due to a chain of problems.

Problem 1: The hashcat binary downloaded via agent does not support macOS architecture

The agent will automatically download a hashcat binary to the client machine. However, the hashcat is not compiled against macOS; it is for Linux (/crackers/1/hashcat.bin) and Windows (/crackers/1/hashcat.exe) only.

Problem 2: If the official hashcat distribution is downloaded and replaced the hashcat that comes along the agent, the hashcat cannot be compiled

Even if we downloaded an official hashcat from their download page, and rename the executable to hashcat.osx (as required by Hashtopolis agent), and copy it to /crackers/1/ folder, the executable still cannot be compiled, due to unsupported architecture in the module files. I tried to replace the files in the agent’s /modules folder by the ones in the official /modules folder, the compile task still cannot be completed successfully.

The Solution, with s

After a week’s investigation, there are two solutions available for macOS users.

Option 1 (Preferred): Use Homebrew hashcat along with Hashtopolis agent

Advantages:

  • Use all available GPU computation power to run the agent, hence much better performance

Disadvantages:

  • Difficult to setup
  • Need to install quite a lot of software
  1. Install Homebrew, the missing package manager in macOS, in Terminal:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  2. Install the required software via Homebrew:
    brew install wget hashcat python3
  3. Install the required Python 3 packages:
    pip3 install requests psutil
  4. Create a new folder, download the Hashtopolis agent:
    wget -O hashtopolis.zip https://hashtopolis.example.com/agents.php?download=1
    Replace the URL above with the agent download URL from Hashtopolis server > Agents > New agent page
  5. Create a folder:
    mkdir -p crackers/1/ && cd crackers/1/
  6. Create a symlink for hashcat:
    ln -s /usr/local/bin/hashcat hashcat.osx
  7. Back to Hashtopolis agent folder:
    cd ../../
  8. Launch the Hashtopolis agent:
    python3 hashtopolis.zip
  9. Follow the on-screen instructions to supply Hashtopolis URL and Voucher code, which can be found in Hashtopolis server > Agents > New agent page.
  10. Done!

Option 2 (Backup Plan): Docker is your friend

Advantages:

  • Stable, no interference by other software installed in the machine

Disadvantages:

  • (macOS only) Can only use CPU to compute (GPU is not available); thus low computation power
  1. Install Docker software (download from https://www.docker.com); requires admin rights to install software
  2. Fetch Docker’s Ubuntu image, using the Docker CLI in Terminal:
    docker pull ubuntu
  3. Run the Ubuntu image:
    docker run -ti ubuntu /bin/bash
  4. Install the required packages (python3, python3-pip) in Ubuntu via apt:
    apt-get update && apt-get install python3 python3-pip
  5. Install the Python packages via pip3:
    pip install requests psutil
  6. Create a new folder, download the Hashtopolis agent:
    wget -O hashtopolis.zip https://hashtopolis.example.com/agents.php?download=1
    Replace the URL above with the agent download URL from Hashtopolis server > Agents > New agent page
  7. Launch the Hashtopolis agent:
    python3 hashtopolis.zip
  8. Follow the on-screen instructions to supply Hashtopolis URL and Voucher code, which can be found in Hashtopolis server > Agents > New agent page.
  9. Done!

Have fun with cracking passwords!

If you encounter any problems, please leave a comment, and I will try to help.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store