### NOTE: THIS REPO IS IN AN ALPHA STATE
-ThreatKB is a knowledge base workflow management dashboard for Yara rules and C2 artifacts. Rules are categorized and used to denote intent, severity, and confidence on accumulated artifacts.
+ThreatKB is a knowledge base workflow management dashboard for YARA rules and C2 artifacts. Rules are categorized and used to denote intent, severity, and confidence in accumulated artifacts.
-To start using ThreatKB, follow our [guide](wiki/setup.md).
+To start using ThreatKB, check out our [wiki](https://github.com/InQuest/ThreatKB/wiki).
- ---
+---
Installing by Docker is the currently recommended way of setting up ThreatKB, directions are included as the first link in the wiki. Installation by source is included in the wiki as well.
-
## Table of Contents
* [Docker Installation](wiki/docker.md)
@@ -29,13 +27,9 @@ Installing by Docker is the currently recommended way of setting up ThreatKB, di
* [Documentation](wiki/documentation.md)
* [FAQ](wiki/faq.md)
-
-
## Thank You
-ThreatKB utilizes Plyara to parse yara rules into python dictionaries. A huge thank you to the Plyara team! Links to the project are below:
+ThreatKB utilizes Plyara to parse YARA rules into Python dictionaries. A huge thank you to the Plyara team! Links to the project are below:
-https://github.com/8u1a/plyara
-https://github.com/8u1a/plyara/blob/master/LICENSE
+- [Plyara](https://github.com/8u1a/plyara) ([LICENSE](https://github.com/8u1a/plyara/blob/master/LICENSE))
When a release is created, the system first pulls all signatures that are in the release state. Then, it gathers all signatures that are in the staging state and checks their revision history for the most recently released revision that is in the release state. If it finds it, it will include it in the release. If it does not find any previously released revisions, it will skip the signature.
-
diff --git a/wiki/README.md b/wiki/README.md
deleted file mode 100644
index 8ca2866c..00000000
--- a/wiki/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# Table of Contents
-
-* [Setup ThreatKB](setup.md)
- + [Pre-requisites](setup.md#pre-requisites)
- + [System Prep](setup.md#system-prep)
-* [Getting Started](getting-started.md)
- + [Application Install](getting-started.md#application-install)
- + [Running ThreatKB](getting-started.md#running-threatkb)
- + [Admin User Creation](getting-started.md#admin-user-creation)
-* [Docker Installation](docker.md)
-* [Databases](db-struct.md)
-* [Documentation](documentation.md)
-* [FAQ](faq.md)
diff --git a/wiki/db-struct.md b/wiki/db-struct.md
deleted file mode 100644
index 6d455e5e..00000000
--- a/wiki/db-struct.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# Database Structure
-
-
-
-
diff --git a/wiki/docker.md b/wiki/docker.md
deleted file mode 100644
index 7e3a0e89..00000000
--- a/wiki/docker.md
+++ /dev/null
@@ -1,18 +0,0 @@
-## Docker Installation
-1. Edit docker-compose.yml if you change to change defaults such as ports or credentials
-2. Build the Docker image: `docker build -t threatkb .`
-3. Execute docker-compuse: `docker-compose up`
-4. Open your browser to http://127.0.0.1:5000/#!/login
-
-**Example output:**
-```
-$ docker-compose up
--Starting inquestkb_db_1 ...
--Starting inquestkb_db_1 ... done
--Recreating inquestkb_threatkb_1 ...
--Recreating inquestkb_threatkb_1 ... done
--Attaching to inquestkb_db_1, inquestkb_threatkb_1
--....snip...
--threatkb_1 | * Debugger is active!
--threatkb_1 | * Debugger PIN: 212-674-856
-```
diff --git a/wiki/documentation.md b/wiki/documentation.md
deleted file mode 100644
index ef273714..00000000
--- a/wiki/documentation.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# Documentation
-
-
-
-### Release Logic
-
-Releases are controlled by artifact states. States are configurable in the States admin section. There are 4 kinds of states:
-1. **Release state** - This is the state artifacts go into when you want to release them.
-2. **Staging state** - This is the state artifacts go into when they are being prepped for release. Any signature that is in the release state and is modified automatically get put into the staging state by the system. Only relevant for signatures.
-3. **Retired state** - This excludes a previously released artifact from future releases. Only relevant for signatures.
-4. **Any other state** - Any other state has no significance on releases. These will not be included in releases.
-
-The Release, Staging, and Retired states must be configured in the admin section *before* you can generate a release. If they are not, the system will error out.
-
-When a release is created, the system first pulls all signatures that are in the release state. Then, it gathers all signatures that are in the staging state and checks their revision history for the most recently released revision that is in the release state. If it finds it, it will include it in the release. If it does not find any previously released revisions, it will skip the signature.
diff --git a/wiki/faq.md b/wiki/faq.md
deleted file mode 100644
index d3a1e62a..00000000
--- a/wiki/faq.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# Frequently Asked Questions
-
-
-
-#### What is ThreatKB?
-
-ThreatKB is a knowledge base workflow management system for Yara rules and C2 artifacts (IP, DNS, SSL)
diff --git a/wiki/getting-started.md b/wiki/getting-started.md
deleted file mode 100644
index 581947ea..00000000
--- a/wiki/getting-started.md
+++ /dev/null
@@ -1,34 +0,0 @@
-# Getting Started
-
-### Running ThreatKB
-
-It's best to run the application and it's Python virtualenv within a screen session to ensure ThreatKB continues to run.
-
-**Note:** Within screen, Ctrl+a+d will dettach your session and return you to your normal shell. To return to the screen session, run `screen -r threatkb`
-
-1. Start a screen session for the application to run within:
- - `cd /opt/ThreatKB && screen -dmS threatkb InQuest_ThreatKB`
-2. Inside of screen, start the virtualenv:
- - `source env/bin/activate`
-3. Start the celery workers:
- - `celery -A app.celeryapp.celery work -E`
- - This is required in order for testing against your clean corpus of files
-4. Build the database tables and columns:
- - `env/bin/python3 manage.py db upgrade`
-4. Run the application:
- - `env/bin/python3 run.py`
- - Follow the instructions below on creating your first Admin user before continuing to next step
-5. Open your browser to http://127.0.0.1:5000/#!/login and get started using ThreatKB!
-
-
-### Admin User Creation
-1. Hash your password for MySQL kb_users table:
- - `env/bin/python3 hash_pass.py yourSecretPassword`
-2. Connect to MySQL instance and insert your admin user (replace values below as needed):
- - `INSERT INTO kb_users (email, password, admin, active) VALUES ('user@domain.com', '', 1, 1);`
-
-
-----
-#### Installation Complete
-
-ThreatKB is now running. To learn more about this project, explore the [wiki](README.md).
diff --git a/wiki/licensing.md b/wiki/licensing.md
deleted file mode 100644
index e87bef8b..00000000
--- a/wiki/licensing.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# Licensing
-
-**TODO**
diff --git a/wiki/setup.md b/wiki/setup.md
deleted file mode 100644
index df7bbe9e..00000000
--- a/wiki/setup.md
+++ /dev/null
@@ -1,46 +0,0 @@
-### Pre-requisites
-
-Tested on Ubuntu Linux 14.04 -> 18.10
-
-1. Install system dependencies and libraries:
- - `sudo apt-get install git screen libffi-dev libssl-dev libsqlite3-dev libmysqlclient-dev`
-2. Install Python and associated packages:
- - `sudo apt-get install python2.7 python-pip python-dev libpython-dev`
-3. Install Python virtualenv library:
- - `pip install virtualenv`
-3. Install databases:
- - `sudo apt-get install mysql-server redis-server`
-4. Install front-end packages:
- - `sudo apt-get install nodejs npm && npm install -g bower`
- - On some systems, nodejs is installed as either `/usr/bin/node` or `/usr/bin/nodejs`, if it is installed as `/usr/bin/nodejs` simply run the command `sudo cp /usr/bin/nodejs /usr/bin/node` for the npm install command to work properly
-
-**Note:** If you are running on CentOS, install these dependencies:
-`yum install MySQL-python libffi-devel mysql mysql-devel mysql-lib`
-
-### System Prep
-1. Create system user: `sudo useradd -d /opt/ThreatKB -s /bin/bash -m -U threatkb`
-2. Clone repo: `sudo git clone -b master https://github.com/InQuest/ThreatKB.git /opt/ThreatKB/install`
-3. Fix permissions of /opt/ThreatKB if needed: `sudo chown -R threatkb:threatkb /opt/ThreatKB`
-4. In MySQL shell as root user:
- - Create MySQL database: `CREATE DATABASE threatkb;`
- - Create MySQL user: `CREATE USER 'threatkb'@'localhost' IDENTIFIED BY 'password';`
- - Allow permissions: `GRANT ALL PRIVILEGES ON threatkb . * TO 'threatkb'@'localhost';`
- - Flush privileges: `FLUSH PRIVILEGES;`
-5. Update SQL config in /opt/ThreatKB/config.py parameters:
- - SQL_HOST
- - SQL_USERNAME
- - SQL_PASSWORD
-
-### Application Install
-**Note:** These steps and the execution of ThreatKB should be ran under the `threatkb` local user you created earlier
-
-1. Run `./install.sh`
- - Setups a Python virtual environment in the directory `/opt/ThreatKB/flask`
- - Installs required node libraries for front-end
-
-By default Flask will listen on 127.0.0.1:5000, if you want to change this modify the `app.run()` command inside `/opt/ThreatKB/run.py`
-
-----
-#### Setup Complete
-
-Now that you are finished with setup, head to [Getting Started](getting-started.md).
From 2a568efbb90b3fd1e6e1a8e2b5835a92308c0653 Mon Sep 17 00:00:00 2001
From: azazelm3dj3d <56496067+azazelm3dj3d@users.noreply.github.com>
Date: Tue, 1 Aug 2023 15:09:05 -0500
Subject: [PATCH 03/19] Update README.md
---
README.md | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/README.md b/README.md
index 068f2231..81d06a2d 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,7 @@
-
+
-
### NOTE: THIS REPO IS IN AN ALPHA STATE
ThreatKB is a knowledge base workflow management dashboard for YARA rules and C2 artifacts. Rules are categorized and used to denote intent, severity, and confidence in accumulated artifacts.
@@ -15,21 +14,22 @@ Installing by Docker is the currently recommended way of setting up ThreatKB, di
## Table of Contents
-* [Docker Installation](wiki/docker.md)
-* [Setup ThreatKB](wiki/setup.md)
- + [Pre-requisites](wiki/setup.md#pre-requisites)
- + [System Prep](wiki/setup.md#system-prep)
-* [Getting Started](wiki/getting-started.md)
- + [Application Install](wiki/getting-started.md#application-install)
- + [Running ThreatKB](wiki/getting-started.md#running-threatkb)
- + [Admin User Creation](wiki/getting-started.md#admin-user-creation)
-* [Databases](wiki/db-struct.md)
-* [Documentation](wiki/documentation.md)
-* [FAQ](wiki/faq.md)
+* [Home](https://github.com/InQuest/ThreatKB/wiki)
+* [Setup ThreatKB](https://github.com/InQuest/ThreatKB/wiki/Setup#pre-requisites)
+ + [Pre-requisites](https://github.com/InQuest/ThreatKB/wiki/Setup#pre-requisites)
+ + [System Prep](https://github.com/InQuest/ThreatKB/wiki/Setup#system-prep)
+ + [Application Install](https://github.com/InQuest/ThreatKB/wiki/Setup#application-install)
+* [Getting Started](https://github.com/InQuest/ThreatKB/wiki/Getting-Started)
+ + [Running ThreatKB](https://github.com/InQuest/ThreatKB/wiki/Getting-Started#running-threatkb)
+ + [Admin User Creation](https://github.com/InQuest/ThreatKB/wiki/Getting-Started#running-threatkb)
+* [Docker Installation](https://github.com/InQuest/ThreatKB/wiki/Docker)
+* [Database Structure](https://github.com/InQuest/ThreatKB/wiki/Database-Structure)
+* [Documentation](https://github.com/InQuest/ThreatKB/wiki/Documentation)
+* [FAQ](https://github.com/InQuest/ThreatKB/wiki/Frequently-Asked-Questions)
## Thank You
ThreatKB utilizes Plyara to parse YARA rules into Python dictionaries. A huge thank you to the Plyara team! Links to the project are below:
-- [Plyara](https://github.com/8u1a/plyara) ([LICENSE](https://github.com/8u1a/plyara/blob/master/LICENSE))
+- [Plyara](https://github.com/plyara/plyara) ([LICENSE](https://github.com/plyara/plyara/blob/master/LICENSE))
When a release is created, the system first pulls all signatures that are in the release state. Then, it gathers all signatures that are in the staging state and checks their revision history for the most recently released revision that is in the release state. If it finds it, it will include it in the release. If it does not find any previously released revisions, it will skip the signature.
From 035c8b9b6db47ddf64656581c1d463c01a9cea35 Mon Sep 17 00:00:00 2001
From: azazelm3dj3d <56496067+azazelm3dj3d@users.noreply.github.com>
Date: Tue, 1 Aug 2023 15:12:01 -0500
Subject: [PATCH 04/19] Update README.md
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 81d06a2d..b6503226 100644
--- a/README.md
+++ b/README.md
@@ -15,13 +15,13 @@ Installing by Docker is the currently recommended way of setting up ThreatKB, di
## Table of Contents
* [Home](https://github.com/InQuest/ThreatKB/wiki)
-* [Setup ThreatKB](https://github.com/InQuest/ThreatKB/wiki/Setup#pre-requisites)
+* [Setup ThreatKB](https://github.com/InQuest/ThreatKB/wiki/Setup)
+ [Pre-requisites](https://github.com/InQuest/ThreatKB/wiki/Setup#pre-requisites)
+ [System Prep](https://github.com/InQuest/ThreatKB/wiki/Setup#system-prep)
+ [Application Install](https://github.com/InQuest/ThreatKB/wiki/Setup#application-install)
* [Getting Started](https://github.com/InQuest/ThreatKB/wiki/Getting-Started)
+ [Running ThreatKB](https://github.com/InQuest/ThreatKB/wiki/Getting-Started#running-threatkb)
- + [Admin User Creation](https://github.com/InQuest/ThreatKB/wiki/Getting-Started#running-threatkb)
+ + [Admin User Creation](https://github.com/InQuest/ThreatKB/wiki/Getting-Started#admin-user-creation)
* [Docker Installation](https://github.com/InQuest/ThreatKB/wiki/Docker)
* [Database Structure](https://github.com/InQuest/ThreatKB/wiki/Database-Structure)
* [Documentation](https://github.com/InQuest/ThreatKB/wiki/Documentation)
From 102163deaf05dcec6d3ff922a1858f36f9bad3e4 Mon Sep 17 00:00:00 2001
From: azazelm3dj3d <56496067+azazelm3dj3d@users.noreply.github.com>
Date: Tue, 1 Aug 2023 15:21:24 -0500
Subject: [PATCH 05/19] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index b6503226..9fedcb21 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@