Skip to content

JonathanMar/cipher-scope

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” CipherScope

CipherScope is a distributed and concurrent hash cracking system written in Go.
It demonstrates practical concepts of parallel computing and distributed systems, combining:

  • Multi-core processing (goroutines)
  • Distributed execution across multiple machines (e.g., TV Boxes)
  • Task distribution via TCP sockets
  • Efficient worker coordination and early termination

πŸ“Œ Overview

CipherScope supports two main attack strategies:

1. Dictionary Attack

  • Reads passwords from a wordlist file
  • Hashes each entry and compares with the target

2. Brute Force Attack

  • Generates all possible combinations from a given charset and length
  • Uses recursion + streaming (no full memory allocation)

🧠 Architecture

πŸ”Ή Hybrid Parallelism

CipherScope combines:

  • Intra-node parallelism

    • Goroutines + channels
    • Utilizes all CPU cores
  • Inter-node parallelism

    • Multiple workers across devices
    • Master distributes workload

πŸ”Ή System Components

CipherScope/ β”œβ”€β”€ master/ # Task coordinator (distributes work) β”œβ”€β”€ worker/ # Executes tasks (runs on remote machines) β”œβ”€β”€ core/ # Engine, jobs, and task definitions β”œβ”€β”€ attacks/ # Dictionary and brute-force logic β”œβ”€β”€ crypto/ # Hashing algorithms β”œβ”€β”€ utils/ # Logging and helpers β”œβ”€β”€ main.go # Local (non-distributed) execution

βš™οΈ Requirements

  • Go 1.20+
  • Machines in the same network (for distributed mode)

πŸ”§ Installation

Clone the repository:

git clone https://github.com/your-username/cipherscope.git
cd cipherscope

πŸš€ Usage

πŸ–₯️ 1. Run Master

go run master/main.go

You will be prompted:

Enter hash: Enter hash type (md5, sha1, sha256):

πŸ“Ί 2. Configure Workers

Edit:

πŸ“ worker/main.go

Replace:

"net.Dial("tcp", "MASTER_IP:9000")

With your master IP:

"net.Dial("tcp", "192.168.0.10:9000")

▢️ 3. Run Workers

Option A: Local testing

go run worker/main.go

(Open multiple terminals)

Option B: TV Boxes / Remote Devices

Build for ARM:

GOOS=linux GOARCH=arm64 go build -o worker ./worker

Transfer:

scp worker user@DEVICE_IP:/home/user/

Run:

chmod +x worker
./worker

πŸ§ͺ Example

Generate a test hash:

echo -n "abcde" | md5sum

Run master and input:

Hash: <generated hash>
Type: md5

Expected output:

Password found: abcde
All workers stopped.

πŸ“Š Performance

Time Complexity

  • Dictionary Attack:

    O(n)
    
  • Brute Force:

    O(|charset|^length)
    

Distributed Speedup

T β‰ˆ N / (workers Γ— CPU cores)

Where:

  • N = total combinations
  • workers = number of machines

⚠️ Limitations

  • No support for salted hashes (e.g., bcrypt, argon2)
  • Brute force grows exponentially
  • No dynamic load balancing (static distribution)
  • No fault tolerance (worker failure not handled)

🧠 Future Improvements

  • πŸ”„ Dynamic task queue (work stealing)
  • πŸ“Š Real-time metrics (hashes/sec)
  • πŸ” Support for bcrypt / argon2
  • ⚑ GPU acceleration
  • 🌍 gRPC instead of raw TCP
  • πŸ–₯️ CLI interface (cobra)
  • πŸ“ˆ Benchmarking tools

πŸ§ͺ Testing Tips

Use small values for quick tests:

charset := "abc"
length := 3

πŸ“š Concepts Demonstrated

  • Goroutines and channels
  • Producer–consumer pattern
  • Context cancellation
  • TCP networking in Go
  • Distributed task scheduling
  • Parallel brute force search

πŸ“„ License

MIT License


πŸ‘¨β€πŸ’» Author

Developed for academic purposes in Parallel Computing.


⭐ Final Notes

CipherScope is a practical demonstration of distributed brute-force computation, showing how:

  • Workloads can be split across machines
  • CPU cores can be fully utilized
  • Systems can scale horizontally

About

πŸ” Distributed hash cracking system in Go β€’ Parallel brute-force & dictionary attacks β€’ Multi-core processing with goroutines β€’ Distributed workers via TCP β€’ Designed for Parallel Computing studies and scalable distributed execution

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors

Languages