Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

TheHive4 mailer responder issue #197

Open
viszsec opened this issue Oct 21, 2020 · 5 comments
Open

TheHive4 mailer responder issue #197

viszsec opened this issue Oct 21, 2020 · 5 comments

Comments

@viszsec
Copy link

viszsec commented Oct 21, 2020

Hi guys,

I had issues getting the mailer responder work as intended. The phish feedback v1.0 also do not work as designed. Anyone have had similar issues and get it fixed and mind share the solutions ? Much appreciated with the help! Thanks

@kwouffe
Copy link

kwouffe commented Oct 22, 2020

Hello,

the issue for us on a modified version of the mailer responder was due to the way TheHive4 automatically transform case tags.
from mail:recipient@domain.com to mail="recipient@domain.com".

Because of that the responder was not able to find the mail address

https://github.com/TheHive-Project/Cortex-Analyzers/blob/master/responders/Mailer/mailer.py

  • Line 43 : mail_tags = [t[5:] for t in tags if t.startswith("mail:")]

Has to be replaced by:

  • mail_tags = [t[5:].strip('"') for t in tags if t.startswith('mail:') or t.startswith('mail=')]

regards,

Emilien

@viszsec
Copy link
Author

viszsec commented Oct 28, 2020

Hi Emilien,

With this replacement, mail_tags = [t[5:].strip('"') for t in tags if t.startswith('mail:') or t.startswith('mail=')]

You got it work on your end?

@kwouffe
Copy link

kwouffe commented Oct 28, 2020

Yes, it worked for us. but as I said it is a modified version of the responder. Can you put here the full error msg from Cortex ?

@viszsec
Copy link
Author

viszsec commented Oct 30, 2020

I modified as what you advised and got this error:.. in my case i use gmail account to send an email to the recipient which is already been set.

Traceback (most recent call last): File "/opt/Cortex-Analyzers/responders/Mailer/mailer.py", line 82, in Mailer().run() File "/opt/Cortex-Analyzers/responders/Mailer/mailer.py", line 61, in run s = smtplib.SMTP(self.smtp_host, self.smtp_port) File "/usr/lib/python3.8/smtplib.py", line 253, in init (code, msg) = self.connect(host, port) File "/usr/lib/python3.8/smtplib.py", line 341, in connect (code, msg) = self.getreply() File "/usr/lib/python3.8/smtplib.py", line 398, in getreply raise SMTPServerDisconnected("Connection unexpectedly closed")smtplib.SMTPServerDisconnected: Connection unexpectedly closed

@viszsec
Copy link
Author

viszsec commented Nov 9, 2020

Yes, it worked for us. but as I said it is a modified version of the responder. Can you put here the full error msg from Cortex ?

Another one , this one is pretty odd.. i setup everything in the config as it supposed to be and got this error:

Missing auth pass

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

No branches or pull requests

2 participants