Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Has anyone been able to get Slack or Telegram notifications to work? #262

Open
Sab0tag3d opened this issue Sep 14, 2023 · 3 comments
Open

Comments

@Sab0tag3d
Copy link

I did everything for telegram following instruction: https://docs.osmedeus.org/installation/notification/
I receive test notification from step 3, but cant receive them with Osmedius.
The same problem for Slack webhooks.

How I run it:

# osmedeus scan -m ~/osmedeus-base/workflow/test/noti.yaml -t example.com --debug
[2023-09-14T10:24:31] DEBUG Append $PATH with: /root/osmedeus-base/binaries
[2023-09-14T10:24:31] DEBUG Loading all environment variables from: /root/osmedeus-base/token/osm-var.yaml
[2023-09-14T10:24:31] DEBUG Adding 4 tokens to the environment variables
[2023-09-14T10:24:31] DEBUG Setting environment variable: TELEGRAM_API_TOKEN -- 58***BE
[2023-09-14T10:24:31] DEBUG Getting all the config that need to be set manually
[+] Osmedeus v4.6.0 by @j3ssiejjj
[2023-09-14T10:24:31]  INFO Storing the log file to: /tmp/osm-log/osmedeus-1536123093.log
[2023-09-14T10:24:31] DEBUG Parsing module at: /root/osmedeus-base/workflow/test/noti.yaml
[2023-09-14T10:24:31]  INFO Running default tactic with baseline threads hold as 10
[2023-09-14T10:24:31]  INFO Running the routine /root/osmedeus-base/workflow/test/noti.yaml on example.com
[2023-09-14T10:24:31]  INFO Detailed runtime file can be found on /root/workspaces-osmedeus/example.com/runtime
[Module-Started] test-noti - test notification
[2023-09-14T10:24:32] DEBUG Updating 0 report records
[2023-09-14T10:24:32]  INFO Running prepare scripts for module test-noti
[2023-09-14T10:24:32] DEBUG Run-Scripts: CreateFolder("/tmp/test-osm-noti/")
[2023-09-14T10:24:32] DEBUG Run-Scripts: StartNoti()
[2023-09-14T10:24:32] DEBUG Run-Scripts: ExecCmd("echo 'sample text here' > /tmp/test-osm-noti/dirb.txt")
[2023-09-14T10:24:32] DEBUG Execute: echo 'sample text here' > /tmp/test-osm-noti/dirb.txt
[2023-09-14T10:24:32] DEBUG Run-Scripts: TeleMessByFile("#dirb", "/tmp/test-osm-noti/dirb.txt")
[2023-09-14T10:24:32] DEBUG Run-Scripts: TeleMess("#mics", "Sample message --> example.com")
[2023-09-14T10:24:32] DEBUG Run-Scripts: TeleMessByFile("#report", "/tmp/test-osm-noti/dirb.txt")
[2023-09-14T10:24:32] DEBUG Run-Scripts: TeleMessByFile("#sensitive", "/tmp/test-osm-noti/dirb.txt")
[2023-09-14T10:24:32] DEBUG Run-Scripts: WebHookNoti("test string")
[2023-09-14T10:24:32]  INFO Running conclude scripts for module test-noti
[2023-09-14T10:24:32] DEBUG Run-Scripts: DoneNoti()
----------------------------------------
[Report] List of reports generated by the test-noti module
[Module-Ended] Elapsed Time for the module test-noti in 0.00479161s
----------------------------------------
[2023-09-14T10:24:32] DEBUG DB: Finished 1/1 steps in the test-noti module
[2023-09-14T10:24:32] DEBUG DB: The scan has been completed: example.com -- noti.yaml
[Finished] The scan for example.com was completed within 0s

My notification config:
image

noti.yaml also a standart one, I just add sting for Slack:

name: test-noti
desc: test notification

# osmedeus scan -m ~/osmedeus-base/workflow/tests/noti.yaml -t sample.com

pre_run:
  - CreateFolder("/tmp/test-osm-noti/")
  - StartNoti()

steps:
  - scripts:
      - ExecCmd("echo 'sample text here' > /tmp/test-osm-noti/dirb.txt")
      - TeleMessByFile("#dirb", "/tmp/test-osm-noti/dirb.txt")
      - TeleMess("#mics", "Sample message --> {{Target}}")
      # these channels usually use for vulnscan
      - TeleMessByFile("#report", "/tmp/test-osm-noti/dirb.txt")
      - TeleMessByFile("#sensitive", "/tmp/test-osm-noti/dirb.txt")
      - WebHookNoti("test string")

post_run:
  - DoneNoti()

I retest the same tokens and webhooks with Rengine(https://rengine.wiki/usage/notification/) and it works well.

Where could the problem be?

@patrickhener
Copy link

Yeah second that. I did create a bot which works with curl just fine. Entering channel id and api key to the config file otherwise will not send messages to that channel using the test run or productive runs.

@atastycookie
Copy link

+1

@4riful
Copy link

4riful commented Mar 15, 2024

Not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants