Skip to content

Commit 842f91a

Browse files
committed
chg: [doc] Big doc revamp #680
1 parent ea14fb4 commit 842f91a

File tree

287 files changed

+5900
-4835
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

287 files changed

+5900
-4835
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ misp_modules.egg-info/
1010
docs/expansion*
1111
docs/import_mod*
1212
docs/export_mod*
13+
docs/action_mod*
1314
site*
1415

1516
#pycharm env

README.md

Lines changed: 179 additions & 127 deletions
Large diffs are not rendered by default.

docs/contribute.md

Lines changed: 41 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## How to add your own MISP modules?
22

3-
Create your module in [misp_modules/modules/expansion/](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/expansion/), [misp_modules/modules/export_mod/](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/export_mod/), or [misp_modules/modules/import_mod/](https://github.com/MISP/misp-modules/tree/master/misp_modules/modules/import_mod/). The module should have at minimum three functions:
3+
Create your module in [misp_modules/modules/expansion/](https://github.com/MISP/misp-modules/tree/main/misp_modules/modules/expansion/), [misp_modules/modules/export_mod/](https://github.com/MISP/misp-modules/tree/main/misp_modules/modules/export_mod/), or [misp_modules/modules/import_mod/](https://github.com/MISP/misp-modules/tree/main/misp_modules/modules/import_mod/). The module should have at minimum three functions:
44

55
* **introspection** function that returns a dict of the supported attributes (input and output) by your expansion module.
66
* **handler** function which accepts a JSON document to expand the values and return a dictionary of the expanded values.
@@ -309,22 +309,27 @@ Recommended Plugin.Import_ocr_enabled true Enable or disable the ocr
309309

310310
In this same menu set any other plugin settings that are required for testing.
311311

312+
## Install misp-module on an offline instance.
313+
First, you need to grab all necessary packages for example like this :
312314

315+
Use pip wheel to create an archive
316+
~~~
317+
mkdir misp-modules-offline
318+
pip3 wheel -r REQUIREMENTS shodan --wheel-dir=./misp-modules-offline
319+
tar -cjvf misp-module-bundeled.tar.bz2 ./misp-modules-offline/*
320+
~~~
321+
On offline machine :
322+
~~~
323+
mkdir misp-modules-bundle
324+
tar xvf misp-module-bundeled.tar.bz2 -C misp-modules-bundle
325+
cd misp-modules-bundle
326+
ls -1|while read line; do sudo pip3 install --force-reinstall --ignore-installed --upgrade --no-index --no-deps ${line};done
327+
~~~
328+
Next you can follow standard install procedure.
313329

314-
## Documentation
315-
316-
In order to provide documentation about some modules that require specific input / output / configuration, the [doc](https://github.com/MISP/misp-modules/tree/master/doc) directory contains detailed information about the general purpose, requirements, features, input and output of each of these modules:
317-
318-
- ***description** - quick description of the general purpose of the module, as the one given by the moduleinfo
319-
- **requirements** - special libraries needed to make the module work
320-
- **features** - description of the way to use the module, with the required MISP features to make the module give the intended result
321-
- **references** - link(s) giving additional information about the format concerned in the module
322-
- **input** - description of the format of data used in input
323-
- **output** - description of the format given as the result of the module execution
324-
325-
In addition to the module documentation please add your module to [docs/index.md](https://github.com/MISP/misp-modules/tree/master/docs/index.md).
330+
## How to contribute your own module?
326331

327-
There are also [complementary slides](https://www.misp-project.org/misp-training/3.1-misp-modules.pdf) for the creation of MISP modules.
332+
Fork the project, add your module, test it and make a pull-request. Modules can be also private as you can add a module in your own MISP installation.
328333

329334

330335
## Tips for developers creating modules
@@ -334,7 +339,7 @@ Download a pre-built virtual image from the [MISP training materials](https://ww
334339
- Create a Host-Only adapter in VirtualBox
335340
- Set your Misp OVA to that Host-Only adapter
336341
- Start the virtual machine
337-
- Get the IP address of the virutal machine
342+
- Get the IP address of the virtual machine
338343
- SSH into the machine (Login info on training page)
339344
- Go into the misp-modules directory
340345

@@ -352,16 +357,18 @@ sudo git checkout MyModBranch
352357

353358
Remove the contents of the build directory and re-install misp-modules.
354359

355-
~~~python
360+
~~~bash
356361
sudo rm -fr build/*
357-
sudo pip3 install --upgrade .
362+
sudo -u www-data /var/www/MISP/venv/bin/pip install --upgrade .
358363
~~~
359364

360365
SSH in with a different terminal and run `misp-modules` with debugging enabled.
361366

362-
~~~python
363-
sudo killall misp-modules
364-
misp-modules -d
367+
~~~bash
368+
# In case misp-modules is not a service do:
369+
# sudo killall misp-modules
370+
sudo systemctl disable --now misp-modules
371+
sudo -u www-data /var/www/MISP/venv/bin/misp-modules -d
365372
~~~
366373

367374

@@ -372,3 +379,17 @@ cd tests/
372379
curl -s http://127.0.0.1:6666/query -H "Content-Type: application/json" --data @MY_TEST_FILE.json -X POST
373380
cd ../
374381
~~~
382+
383+
## Documentation
384+
385+
In order to provide documentation about some modules that require specific input / output / configuration, the [index.md](docs/index.md) file within the [docs](docs) directory contains detailed information about the general purpose, requirements, features, input and ouput of each of these modules:
386+
387+
- ***description** - quick description of the general purpose of the module, as the one given by the moduleinfo
388+
- **requirements** - special libraries needed to make the module work
389+
- **features** - description of the way to use the module, with the required MISP features to make the module give the intended result
390+
- **references** - link(s) giving additional information about the format concerned in the module
391+
- **input** - description of the format of data used in input
392+
- **output** - description of the format given as the result of the module execution
393+
394+
## Licenses
395+
For further Information see also the [license file](license/).

0 commit comments

Comments
 (0)