|
1 |
| -# []() |
2 |
| - |
3 |
| -ShoMon is a shodan alert feeder for theHive written in GoLang. Takes advantage of Golang's goroutines with deferred recover to continuously monitor alerts from shodan and feed them into theHive as alerts. |
| 1 | +<p align="center"> |
| 2 | + <img src="images/logo.png" /> |
| 3 | +</p> |
| 4 | +<p align="center"> |
| 5 | +ShoMon is a Shodan alert feeder for TheHive written in GoLang. With version 2.0, it is more powerful than ever! |
| 6 | +</p> |
| 7 | + |
| 8 | + |
| 9 | +# Functionalities |
| 10 | +* Can be used as Webhook OR Stream listener |
| 11 | + * Webhook listener opens a restful API endpoint for Shodan to send alerts. This means you need to make this endpoint available to public net |
| 12 | + * Stream listener connects to Shodan and fetches/parses the alert stream |
| 13 | +* Utilizes [shadowscatcher/shodan](https://github.com/shadowscatcher/shodan) (fantastic work) for Shodan interaction. |
| 14 | +* Alert specifics can be adjusted via conf.yaml or environment variables |
| 15 | +* Console logs are in JSON format and can be ingested by any other further log management tools |
| 16 | +* CI/CD via Github Actions ensures that a proper Release with changelogs, artifacts, images on ghcr and dockerhub will be provided |
| 17 | +* Provides a working [docker-compose file](docker-compose.yml) file for TheHive, dependencies |
| 18 | +* Super fast and Super mini in size |
| 19 | +* Complete code refactoring in v2.0 resulted in more modular, maintainable code |
4 | 20 |
|
5 | 21 | # Usage
|
6 |
| - []() |
| 22 | +* Parameters should be provided via ```conf.yaml``` or environment variables. Please see [config file](conf.yaml) and [docker-compose file](docker-compose.yml) |
| 23 | +* After conf or environment variables are set simply issue command: |
| 24 | + |
| 25 | + `./shomon` |
7 | 26 |
|
8 | 27 | ## Notes
|
9 |
| -* Logs can be found in shodanmonitor.log under the same folder |
10 |
| -* Alert reference is md5("ip:port") |
11 |
| -* Default logging level is DEBUG. Can be changed via editing logwrapper |
| 28 | +* Alert reference is first 6 chars of md5("ip:port") |
| 29 | +* Only 1 mod can be active at a time. Webhook and Stream listener can not be activated together. |
12 | 30 |
|
13 | 31 | # Setup & Compile Instructions
|
14 | 32 | ## Get latest compiled binary from releases
|
15 |
| -1. Check [Releases] section. |
| 33 | +1. Check [Releases](https://github.com/KaanSK/shomon/releases/latest) section. |
16 | 34 |
|
17 | 35 | ## Compile from source code
|
18 | 36 | 1. Make sure that you have a working Golang workspace.
|
19 | 37 | 2. `go build .`
|
20 | 38 | * `go build -ldflags="-s -w" .` could be used to customize compilation and produce smaller binary.
|
21 | 39 |
|
22 |
| -## Using Dockerfile |
23 |
| -1. `docker build -t shomon .` |
24 |
| -2. `docker run -it shomon -s {SHODANKEY} -t {THEHIVEKEY}` |
| 40 | +## Using [Dockerfile](Dockerfile) |
| 41 | +1. Edit [config file](conf.yaml) or provide environment variables to commands bellow |
| 42 | +2. `docker build -t shomon .` |
| 43 | +3. `docker run -it shomon` |
| 44 | + |
| 45 | +## Using [docker-compose file](docker-compose.yml) |
| 46 | +1. Edit environment variables and configurations in [docker-compose file](docker-compose.yml) |
| 47 | +2. `docker-compose run -d` |
25 | 48 |
|
26 | 49 | # Credits
|
27 | 50 | * Logo Made via LogoMakr.com
|
28 |
| -* `go-shodan` : https://github.com/ns3777k/go-shodan |
29 |
| -* logwrapper package : https://www.datadoghq.com/blog/go-logging/ |
30 |
| -* Dockerfile : https://www.cloudreach.com/en/resources/blog/cts-build-golang-dockerfiles/ |
31 |
| - |
32 |
| -[Releases]: https://github.com/KaanSK/shomon/releases/latest |
| 51 | +* [shadowscatcher/shodan](https://github.com/shadowscatcher/shodan) |
| 52 | +* [Dockerfile Reference](https://www.cloudreach.com/en/resources/blog/cts-build-golang-dockerfiles/) |
| 53 | +* Release management with [GoReleaser](https://goreleaser.com) |
0 commit comments