Skip to content

Commit 2c105d9

Browse files
committed
Update in the manual
1 parent 1ac4d63 commit 2c105d9

File tree

8 files changed

+473
-43
lines changed

8 files changed

+473
-43
lines changed

doc/advanced_usage/tls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ openssl req -x509 -newkey rsa:2048 -keyout nginx.key -out nginx.crt -days 365 -n
2121

2222
## Setting up docker-compose and env.example
2323

24-
Please see the [Install](../install.md) page on how to download those settings file.
24+
Please see the [Install](../installation_guidelines/basic_install.md) page on how to download those settings file.
2525

2626
1. Edit docker-compose.yaml
2727

doc/index.md

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,65 @@
22

33
> [!CAUTION]
44
> This is the new documentation of Hashtopolis. It is work in progress, so use with care!
5+
>
6+
> You can find the old documentation still inside this folder, please check the [Hashtopolis Communication Protocol (V2)](protocol.pdf) docs. The user api documentation can be found here: [Hashtopolis User API (V1)](user-api/user-api.pdf).
57
6-
You can find the old documentation still inside this folder, please check the [Hashtopolis Communication Protocol (V2)](protocol.pdf) docs. The user api documentation can be found here: [Hashtopolis User API (V1)](user-api/user-api.pdf).
8+
Hashtopolis is a multi-platform client-server tool for distributing hashcat tasks to multiple computers. The main goals for Hashtopolis's development are portability, robustness, multi-user support, and multiple groups management. The application has two parts:
9+
10+
- Agent Python client, easily customizable to suit any need.
11+
- Server several PHP/CSS files operating on two endpoints: an Admin GUI and an Agent Connection Point
12+
13+
Aiming for high usability even on restricted networks, Hashtopolis communicates over HTTP(S) using a human-readable, hashing-specific dialect of JSON.
14+
15+
The server part runs on PHP using MySQL as the database back end. It is vital that your MySQL server is configured with performance in mind. Queries can be very expensive and proper configuration makes the difference between a few milliseconds of waiting and disastrous multi-second lags. The database schema heavily profits from indexing. Therefore, if you see a hint about pre-sorting your hashlist, please do so.
16+
17+
The web admin interface is the single point of access for all client agents. New agent deployments require a one-time password generated in the New Agent tab. This reduces the risk of leaking hashes or files to rogue or fake agents.
18+
19+
There are parts of the documentation and wiki which are not up-to-date. If you see anything wrong or have questions on understanding descriptions, join our Discord server at https://discord.gg/S2NTxbz.
20+
21+
To report a bug, please create an issue and try to describe the problem as accurately as possible. This helps us to identify the bug and see if it is reproducible.
22+
23+
In an effort to make the Hashtopussy project conform to a more politically neutral name it was rebranded to "Hashtopolis" in March 2018.
24+
25+
# Features
26+
- Easy and comfortable to use
27+
- Dark and light theme
28+
- Accessible from anywhere via web interface or user API
29+
- Server component highly compatible with common web hosting setups
30+
- Unattended agents
31+
- File management for word lists, rules, ...
32+
- Self-updating of both Hashtopolis and Hashcat
33+
- Cracking multiple hashlists of the same hash type as though they were a single hashlist
34+
- Running the same client on Windows, Linux and macOS
35+
- Files and hashes marked as "secret" are only distributed to agents marked as "trusted"
36+
- Many data import and export options
37+
- Rich statistics on hashes and running tasks
38+
- Visual representation of chunk distribution
39+
- Multi-user support
40+
- User permission levels
41+
- Various notification types
42+
- Small and/or CPU-only tasks
43+
- Group assignment for agents and users for fine-grained access-control
44+
- Compatible with crackers supporting certain flags
45+
- Report generation for executed attacks and agent status
46+
- Multiple file distribution variants
47+
48+
# Contribution Guidelines
49+
We are open to all kinds of contributions. If it's a bug fix or a new feature, feel free to create a pull request. Please consider some points:
50+
51+
Just include one feature or one bugfix in one pull request. In case you have two new features please also create two pull requests.
52+
Try to stick with the code style used (especially in the PHP parts). IntelliJ/PHPStorm users can get a code style XML here.
53+
54+
The pull request will then be reviewed by at least one member and merged after approval. Don't be discouraged just because the first review is not approved, often these are just small changes.
55+
56+
# Thanks
57+
- winxp5421 for testing, writing help texts and a lot of input ideas
58+
- blazer for working on the csharp agent and hops for working on the python agent
59+
- Cynosure Prime for testing
60+
- atom for hashcat
61+
- curlyboi for the original Hashtopus code
62+
63+
# Do we keep this ?
64+
65+
7zip binaries are compiled from here
66+
uftp binaries are compiled from here
Lines changed: 257 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,257 @@
1+
# Advanced installation
2+
- Installation of TLS X.509 certificate (***Done in advanced usage***)
3+
- Agent configuration file and command line arguments
4+
- (Boot from PXE) and run HtP as a service (voucher, local disk,...)
5+
- Misc.
6+
7+
8+
## Installation in an airgapped/offline/oil-gapped system (**make a note about the binary**)
9+
If you are running Hashtopolis in an offline network or an air-gapped network, you will need to use a machine with internet access to either pull the images directly from the docker hub or build it yourself.
10+
11+
Here are the commands to pull the images from Docker hub. To build the images from source, follow the instructions in the section related to building images.
12+
```
13+
docker pull hashtopolis/backend:latest
14+
docker pull hashtopolis/frontend:latest
15+
```
16+
17+
The images can then be saved as .tar archives:
18+
```
19+
docker save hashtopolis/backend:latest --output hashtopolis-backend.tar
20+
docker save hashtopolis/frontend:latest --output hashtopolis-frontend.tar
21+
```
22+
23+
Next, transfer both file to your Hashtopolis server and import them using the following commands
24+
```
25+
docker load --input hashtopolis-backend.tar
26+
docker load --input hashtopolis-frontend.tar
27+
```
28+
29+
Continue with the normal docker installation described in ***link to the basic install***
30+
31+
## Build Hashtopolis images yourself
32+
The Docker images can be built from source following these steps.
33+
34+
### Build frontend image
35+
1. Clone the Hashtopolis web-ui repository and cd into it.
36+
```
37+
git clone https://github.com/hashtopolis/web-ui.git
38+
cd web-ui
39+
```
40+
41+
2. Build the web-ui repo and tag it
42+
```
43+
docker build -t hashtopolis/frontend:latest --target hashtopolis-web-ui-prod .
44+
```
45+
46+
### Build backend image
47+
1. Move one directory back, clone the Hashtopolis server repository and cd into it:
48+
```
49+
cd ..
50+
git clone https://github.com/hashtopolis/server.git
51+
cd server
52+
```
53+
54+
2. *(Optional)* Check the output of ```file docker-entrypoint.sh```. If it mentions *'with CRLF line terminators'*, your git checkout is converting line-ending on checkout. This is causing issues for files within the docker container. This is common behaviour for example within Windows (WSL) instances. To fix this:
55+
```
56+
git config core.eol lf
57+
git config core.autocrlf input
58+
git rm -rf --cached .
59+
git reset --hard HEAD
60+
```
61+
62+
Check that ```file docker-entrypoint.sh``` correctly outputs: *'docker-entrypoint.sh: Bourne-Again shell script, ASCII text executable'*.
63+
64+
3. Copy the env.example and edit the values to your likings
65+
```
66+
cp env.example .env
67+
nano .env
68+
```
69+
70+
4. (Optional) If you want to test a preview of the version 2 of the UI, consult the New user interface technical preview section. (***Internal LINK***)
71+
72+
5. Build the server docker image
73+
```
74+
docker build . -t hashtopolis/backend:latest --target hashtopolis-server-prod
75+
```
76+
77+
## Using Local Folders outside of the Docker Volumes
78+
79+
By default (when you use the default docker-compose) the Hashtopolis folder (import, files and binaries) are in a Docker volume.
80+
81+
You can list this volume via docker volume ls. You can also access the volume directly in the backend, because it is mounted at: ```/usr/local/share/hashtopolis``` inside the container.
82+
83+
However, if you do not want the use the volume but want to use folders of the host OS you can change the mount points in the docker compose file:
84+
```
85+
version: '3.7'
86+
services:
87+
hashtopolis-backend:
88+
container_name: hashtopolis-backend
89+
image: hashtopolis/backend:latest
90+
restart: always
91+
volumes:
92+
# Where /opt/hashtopolis/<folder> are folders on you host OS.
93+
- /opt/hashtopolis/config:/usr/local/share/hashtopolis/config:Z
94+
- /opt/hashtopolis/log:/usr/local/share/hashtopolis/log:Z
95+
- /opt/hashtopolis/import:/usr/local/share/hashtopolis/import:Z
96+
- /opt/hashtopolis/binaries:/usr/local/share/hashtopolis/binaries:Z
97+
- /opt/hashtopolis/files:/usr/local/share/hashtopolis/files:Z
98+
environment:
99+
HASHTOPOLIS_DB_USER: $MYSQL_USER
100+
HASHTOPOLIS_DB_PASS: $MYSQL_PASSWORD
101+
HASHTOPOLIS_DB_HOST: $HASHTOPOLIS_DB_HOST
102+
HASHTOPOLIS_DB_DATABASE: $MYSQL_DATABASE
103+
HASHTOPOLIS_ADMIN_USER: $HASHTOPOLIS_ADMIN_USER
104+
HASHTOPOLIS_ADMIN_PASSWORD: $HASHTOPOLIS_ADMIN_PASSWORD
105+
HASHTOPOLIS_APIV2_ENABLE: $HASHTOPOLIS_APIV2_ENABLE
106+
depends_on:
107+
- db
108+
ports:
109+
- 8080:80
110+
db:
111+
container_name: db
112+
image: mysql:8.0
113+
restart: always
114+
volumes:
115+
- db:/var/lib/mysql
116+
environment:
117+
MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASS
118+
MYSQL_DATABASE: $MYSQL_DATABASE
119+
MYSQL_USER: $MYSQL_USER
120+
MYSQL_PASSWORD: $MYSQL_PASSWORD
121+
hashtopolis-frontend:
122+
container_name: hashtopolis-frontend
123+
image: hashtopolis/frontend:latest
124+
environment:
125+
HASHTOPOLIS_BACKEND_URL: $HASHTOPOLIS_BACKEND_URL
126+
restart: always
127+
depends_on:
128+
- hashtopolis-backend
129+
ports:
130+
- 4200:80
131+
volumes:
132+
db:
133+
hashtopolis:
134+
```
135+
136+
Make sure to copy everything out of the docker volume, you can do that using:
137+
```
138+
docker cp hashtopolis-backend:/usr/local/share/hashtopolis <directory>
139+
```
140+
141+
Next, recreate the containers:
142+
```
143+
docker compose down
144+
docker compose up
145+
```
146+
147+
Remember to copy the contents back into the folders.
148+
149+
## Upgrading to 0.14.0 (from non-Docker to Docker)
150+
There are multiple ways to migrate the data from your non-docker setup to docker. You can of course completely start fresh; but if you want to migrate your data there are multiple ways to do this.
151+
152+
### Existing database (**formerly called New database**)
153+
You can reuse your old database server or also migrate the database to a docker container.
154+
155+
1. Install docker to your system (https://docs.docker.com/engine/install/ubuntu/)
156+
2. Create a database backup mysqldump <database-name> > hashtopolis-backup.sql
157+
3. Make copies of the following folders, can be found in the hashtopolis folder along side the index.php:
158+
- files
159+
- import
160+
- log
161+
4. Download the docker compose file: wget https://raw.githubusercontent.com/hashtopolis/server/master/docker-compose.yml
162+
5. Edit the docker compose file
163+
```
164+
[...]
165+
hashtopolis-server:
166+
[...]
167+
volumes:
168+
- <path to where you want to store your hashtopolis files>:/usr/local/share/hashtopolis:Z
169+
[...]
170+
```
171+
172+
6. Download the env file
173+
```
174+
wget https://raw.githubusercontent.com/hashtopolis/server/master/env.example -O .env
175+
```
176+
177+
7. Edit the .env file and change the settings to your likings nano .env
178+
- Optional: if you want to test the new API and new UI, set the HASHTOPOLIS_APIV2_ENABLE to 1 inside the .env file. NOTE: The APIv2 and UIv2 are a technical preview. Currently when enable everyone through the new API will be fully admin!
179+
- The HASHTOPOLIS_ADMIN_USER is only used during setup time and once you import the database backup will be replaced with your old data.
180+
8. Create the folder which to referred to in the docker-compose, in our example we will use /usr/local/share/hashtopolis
181+
```
182+
sudo mkdir -p /usr/local/share/hashtopolis
183+
```
184+
185+
9. Copy the files, import, and log to the new location you refered to in the docker-compose file.
186+
```
187+
sudo cp -r files/ import/ log/ /usr/local/share/hashtopolis
188+
```
189+
190+
10. In the same folder create a config folder:
191+
```
192+
mkdir /usr/local/share/hashtopolis/config
193+
```
194+
195+
11. Start the docker container docker compose up
196+
12. Stop the backend container so that agents don't mess up the database mid migration docker
197+
```
198+
stop hashtopolis-backend
199+
```
200+
201+
13. To migrate the data, first copy the database backup towards the db container:
202+
```
203+
docker cp hashtopolis-backup.sql db:.
204+
```
205+
206+
14. Login on the container:
207+
```
208+
docker exec -it db /bin/bash
209+
```
210+
211+
15. Import the data:
212+
```
213+
mysql -Dhashtopolis -p < hashtopolis-backup.sql
214+
```
215+
216+
16. Exit the container
217+
17. Copy the content of the PEPPER from the *inc/conf.php* file and place them into *config/config*.json`
218+
Example */var/www/hashtopolis/inc/conf.php*:
219+
```
220+
[...]
221+
$PEPPER = [..., ..., ..., ...];
222+
[...]
223+
```
224+
Becomes */usr/local/share/hashtopolis/config/config.json*:
225+
```
226+
{
227+
"PEPPER": [..., ..., ..., ...],
228+
}
229+
```
230+
231+
18. Restart the compose docker compose down && docker compose up
232+
233+
### New database (**formerly called Existing database**)
234+
235+
Repeat all the steps above, but you don't need to export/import the database. Only make sure that you point the settings inside the .env file to your database server and that the database server is reachable from your container.
236+
237+
## Upgrading from docker to docker (version 0.14.0 and up)
238+
1. Stop your docker compose docker compose down
239+
2. docker compose pull
240+
3. docker compose up
241+
242+
## Upgrading from docker to docker (version 0.14.0 and up) - Offline System(s)
243+
244+
***To be done***
245+
246+
## New user interface technical preview (**also present in basic install**)
247+
> [!NOTE]:
248+
> The APIv2 and UIv2 are a technical preview. Currently, when enabled, everyone through the new API will be fully admin!
249+
250+
To enable 'version 2' of the API:
251+
252+
1. Stop your containers
253+
2. set the *HASHTOPOLIS_APIV2_ENABLE* to 1 inside the *.env* file.
254+
3. ```docker compose up --detach```
255+
4. Access the technical preview via: http://127.0.0.1:4200 using the credentials below (unless modified in the *.env* file)
256+
- user: admin
257+
- password: hashtopolis

0 commit comments

Comments
 (0)