Skip to content

Commit

Permalink
Merge pull request #13 from azazelm3dj3d/v0.6
Browse files Browse the repository at this point in the history
v0.6
  • Loading branch information
battleoverflow authored Oct 9, 2023
2 parents 12bb51e + 78a46e2 commit 636c88d
Show file tree
Hide file tree
Showing 60 changed files with 2,578 additions and 519 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Catherine

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

env:
CARGO_TERM_COLOR: always

jobs:
workflow:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Configuring
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libsoup2.4-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev
- name: Checking
run: cargo check --verbose

- name: Testing
run: cargo test --verbose

- name: Building
run: cargo build --verbose
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Cargo.lock
build/
__MACOSX/
__pycache__/
.DS_Store
.DS_Store
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ git checkout -b BRANCH_NAME

2. A pull request will need to be created and no merge conflicts should be present.

For anyone looking to contribute, please do not hesitate to fix or improve anything in the repository.
For anyone looking to contribute, please do not hesitate to fix or improve anything in the repository.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "catherine"
description = "The Catherine Framework is a general-purpose cybersecurity framework built to aggregate, validate, decode, decrypt, and maintain data."
version = "0.5.0"
description = "The Catherine Framework is a general-purpose cybersecurity framework built to provide extended support for defense operations."
version = "0.6.0"
authors = ["azazelm3dj3d"]
license = "BSD-2-Clause"
categories = ["cryptography", "command-line-utilities", "encoding"]
Expand All @@ -20,7 +20,7 @@ serde = "1.0"
serde_json = "1.0"
libloading = "0.7"
prettytable-rs = "0.10.0"
mercy = "1.2.22"
mercy = "2.0.1"
rand = "0.7.2"
tauri = { version = "1.2.4", features = [] }

Expand All @@ -29,4 +29,4 @@ ipconfig = "0.3.0"

[features]
default = [ "custom-protocol" ]
custom-protocol = [ "tauri/custom-protocol" ]
custom-protocol = [ "tauri/custom-protocol" ]
34 changes: 34 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Project: Catherine Framework (https://github.com/azazelm3dj3d/catherine)
# Author: azazelm3dj3d (https://github.com/azazelm3dj3d)
# License: BSD 2-Clause

NAME=catherine
PROJ_VERSION=0.6.0

run:
@echo "Building $(NAME) v$(PROJ_VERSION)"
make setup_env
make build
make modules

setup_env:
sudo mkdir -p /opt/catherine/modules
sudo mkdir -p /opt/catherine/modules/db
sudo mkdir -p /opt/catherine/modules/formats/exe
sudo mkdir -p /opt/catherine/modules/formats/hex
sudo mkdir -p /opt/catherine/modules/mercy
sudo mkdir -p /opt/catherine/modules/net/netscan
sudo mkdir -p /opt/catherine/modules/web/parsers
pip3 install -r requirements.txt

build:
cargo check && cargo build

modules:
chmod +x build_modules.sh && sudo ./build_modules.sh

@echo "[+] Configuring Hex 'C' module..."
sudo cc src/modules/formats/hex/c_hex_dump.c -Wall -shared -o /opt/catherine/modules/formats/hex/hex.so

# Cleanup spec files from pyinstaller
sudo rm *.spec
27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
<div align="center">
<img src="https://raw.githubusercontent.com/azazelm3dj3d/catherine/main/assets/catherine_icon.png" width="40%" />
<img src="assets/catherine_banner.png" />
</div>

<h1 align="center">
Catherine
</h1>
[![Catherine](https://github.com/azazelm3dj3d/catherine/actions/workflows/workflow.yml/badge.svg)](https://github.com/azazelm3dj3d/catherine/actions/workflows/workflow.yml)

The Catherine Framework is a general-purpose cybersecurity framework built to aggregate, validate, decode, decrypt, and maintain data. Catherine currently collects information from dumping hexadecimal content from files, validates malicious domains & IP addresses, attempts to crack unknown hashes, handles real-time database analysis, various types of decoding, and much more. Thanks to Catherine being built in an easily packaged executable, you can quickly download the tool by running `cargo install catherine` via the `Cargo` ecosystem. Catherine can also be quickly compiled by pulling down the source code from `git` and simply running `cargo build`.
The Catherine Framework is a general-purpose cybersecurity framework built to provide extended support for defense operations. Catherine currently collects information from dumping hexadecimal content from files, validates malicious domains & IP addresses, attempts to crack unknown hashes, handles real-time database analysis, various types of decoding, and much more in a quick CLI utility. Thanks to Catherine being built in an easily packaged executable, you can quickly download the tool by running `cargo install catherine` via the `Cargo` ecosystem. Catherine can also be quickly compiled by pulling down the source code from `git` and simply running `cargo build` or `make` to build alongside modules.

NOTE: Modules do require Go, Python, and C build utilities to be installed.

Catherine provides a Command Line Interface (CLI) and Graphical User Interface (GUI) built into the executable. This means whether you install from source or `Cargo`, you can choose your method of use.

This project will most likely be in an experimental state for a long time. This project is a personal endeavor to explore different ways to control or manipulate data utilizing Rust. A more stable and production-oriented crate is available here: [Mercy](https://github.com/azazelm3dj3d/mercy). Mercy is an open-source Rust crate and CLI designed for building cybersecurity utilities and projects.

## Installation

You can easily install via the `Cargo` CLI:
Expand All @@ -26,24 +28,21 @@ First, clone the repository using `git`:
git clone https://github.com/azazelm3dj3d/catherine.git
```

Once you've cloned the repository and you're in the correct directory, simply run the following command:
Once you've cloned the repository, and you're in the correct directory, simply run the following command:

```bash
cargo build
```

Now you'll have a local debug build available for testing under `target/debug/catherine`.

Catherine also offers custom modules for Linux operating systems. You can access these modules by installing Catherine via the `catherine_install` script.

You can review the script [here](https://github.com/azazelm3dj3d/catherine/blob/main/catherine_install).
If you're interested in working with the Catherine modules, you can use the `make` build ecosystem to create executables for Catherine:

```bash
# The script requires sudo privileges to build a directory under `/opt/catherine/`
sudo ./catherine_install
make
```

NOTE: I am working on converting all external [modules](https://github.com/azazelm3dj3d/catherine-modules) (Python, C, Go) into native modules (Rust) to offer everything in a built-in executable via `Cargo` without any extra steps, but for now, I've made sure to keep them accessible (excluding the GUI) for extended functionality.
I am working on converting all external [modules](https://github.com/azazelm3dj3d/catherine-modules) (Python, C, Go) into native modules (Rust) to offer everything in a built-in executable via `Cargo` without any extra steps, but for now, I've made sure to keep them accessible (excluding the GUI) for extended functionality.

## Usage

Expand All @@ -59,6 +58,6 @@ If a GUI is more your style, there is a simple version available with the majori
🦀 Catherine [v0.x.x] (None) ☀️ 〉launch
```

NOTE: I am still working on making the GUI a little nicer looking, but a basic version is currently available for testing.
If a bug or issue is found, please report it [here](https://github.com/azazelm3dj3d/catherine/issues).

If a bug or issue is found, please report it [here](https://github.com/azazelm3dj3d/catherine/issues).
*GUI logo provided by Freepik w/ modification from azazelm3dj3d.
Binary file added assets/catherine_banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/catherine_icon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/catherine_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

fn main() {
tauri_build::build()
}
}
90 changes: 90 additions & 0 deletions build_modules.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#!/bin/bash

# Project: Catherine Framework (https://github.com/azazelm3dj3d/catherine)
# Author: azazelm3dj3d (https://github.com/azazelm3dj3d)
# License: BSD 2-Clause

# NetScan
# TODO: Test this function to verify it works, Go is the odd man out
function netscan() {
cd src/modules/net/netscan/src
echo "[+] Configuring NetScan module..."

go build src/modules/net/netscan/src/main.go -o /opt/catherine/modules/net/netscan

if [ -f "/opt/catherine/modules/net/netscan" ]
then
echo "[+] NetScan module successfully built"
else
echo "[-] NetScan module was not built properly"
fi

echo ""
}

# Web parsers
function parsers() {
# Link parser
echo "[+] Configuring Link Parser module..."
pyinstaller src/modules/web/parsers/links.py --onefile --clean -n links --distpath /opt/catherine/modules/web/parsers/ 2>/dev/null

if [ -f "/opt/catherine/modules/web/parsers/links" ]
then
echo "[+] Link Parser module successfully built"
else
echo "[-] Link Parser module was not built properly"
fi

echo ""
}

# Exec Dump
function exec_dump() {
echo "[+] Configuring Windows Exe Dump module..."
pyinstaller src/modules/formats/exe/win_exe_dump.py --onefile --clean -n win_exe_dump --distpath /opt/catherine/modules/formats/exe/ 2>/dev/null

if [ -f "/opt/catherine/modules/formats/exe/win_exe_dump" ]
then
echo "[+] Windows Exe Dump module successfully built"
else
echo "[-] Windows Exe Dump module was not built properly"
fi

echo ""
}

# Redis
function db_redis() {
echo "[+] Configuring Redis Database module..."
pyinstaller src/modules/db/redis.py --onefile --clean -n redis --distpath /opt/catherine/modules/db/ 2>/dev/null

if [ -f "/opt/catherine/modules/db/redis" ]
then
echo "[+] Redis Database module successfully built"
else
echo "[-] Redis Database module was not built properly"
fi

echo ""
}

# Mercy Extension
function mercy_ext() {
echo "[+] Configuring Mercy Extension module..."
pyinstaller src/modules/mercy/extension.py --onefile --clean -n extension --distpath /opt/catherine/modules/mercy/ 2>/dev/null

if [ -f "/opt/catherine/modules/mercy/extension" ]
then
echo "[+] Mercy Extension module successfully built"
else
echo "[-] Mercy Extension module was not built properly"
fi

echo ""
}

# netscan
parsers
exec_dump
db_redis
mercy_ext
53 changes: 0 additions & 53 deletions catherine_install

This file was deleted.

Binary file added icons/icon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 55 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"author": "azazelm3dj3d",
"version": "0.1.26",
"numOfModules": "6",
"ModulesList": [
{
"id": 1,
"name": "NetScan",
"description": "Collects publicly available network information about a host",
"version": "1.0.9",
"source_path": "net/netscan/src/*",
"dist_path": "net/netscan/dist/netscan"
},
{
"id": 2,
"name": "links",
"description": "Parses web content, extracting external and internal links",
"version": "0.2.14",
"source_path": "web/parsers/links.py",
"dist_path": "web/parsers/dist/links"
},
{
"id": 3,
"name": "Mercy Extension",
"description": "Suite of methods for decryption and decoding data, extends the Mercy Rust crate",
"version": "1.4.15",
"source_path": "mercy/extenstion.py",
"dist_path": "mercy/dist/extenstion"
},
{
"id": 4,
"name": ["c_hex_dump", "rust_hex_dump"],
"description": "Dumps hexadecimal information for most file types (.exe, .toml, .c, etc.)",
"version": "0.1.11",
"source_path": ["data/hex/c/c_hex_dump.c", "data/hex/rust/rust_hex_dump.rs"],
"dist_path": ["data/hex/c/dist/hex.so", "data/hex/rust/rust_hex_dump.rs"]
},
{
"id": 5,
"name": "redis_analysis",
"description": "Real-time Redis database analysis and monitoring",
"version": "1.3.36",
"source_path": "db/redis/redis_analysis.py",
"dist_path": "db/redis/dist/redis_analysis"
},
{
"id": 6,
"name": "exec_dump_win",
"description": "Multi-format parser built to extract various data points from Windows executables, object binaries, DLLs and more (32-bit & 64-bit)",
"version": "0.1.10",
"source_path": "data/exe/exec_dump_win.py",
"dist_path": "data/exe/dist/exec_dump_win"
}
]
}
Binary file added public/catherine_icon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/catherine_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 636c88d

Please sign in to comment.