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

[BUG] Error while trying to connect to IMAP server #32

Closed
gru3zi opened this issue Jan 28, 2023 · 2 comments
Closed

[BUG] Error while trying to connect to IMAP server #32

gru3zi opened this issue Jan 28, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@gru3zi
Copy link

gru3zi commented Jan 28, 2023

Describe the bug

After setting it up all up and despite using a virtual environment I still am unable to get the gmail authentication to work. I have tried two different app passwords with gmail resulting in the same issue.

Work environment

Question Answer
OS version (server) Ubuntu
OS version (client) 20.04.5 LTS
Python version 3.8.10
Type of email address used Gmail
Mail client type & version Gmail
Browser type & version Chrome
Virtualized Env. True
Dedicated RAM 4 GB
vCPU 6
ThePhish version Where do I find this info? latest git clone
TheHive version 5.0.18-1
Cortex version cortex0 - 3.1.7-1
MISP version MISP - 2.4.164
Installed using Docker and Docker Compose False

image

To Reproduce

Steps to reproduce the behavior:

  1. Go to the Phish URL'
  2. Click on List emails'
  3. An error is produced

Expected behavior

Expect a valid connection to gmail

Screenshots

Dependencies met

image

App password configured

image

Config file

image

image

Error

image

image

Additional context

My Hive, Cortex and MISP is hosted on another container within my proxmox server.

The only thing I cant seem to get working is the "Add the run_responder()". Is it still relevant for my case? Do I run the command on my ThePhish container or my other container holding thehive?

@gru3zi gru3zi added the bug Something isn't working label Jan 28, 2023
@emalderson
Copy link
Owner

emalderson commented Feb 6, 2023

I see from your environment that you're using TheHive 5. ThePhish has not been tested on TheHive 5. This is the reason why your "add_run_responder()" will never work.
However, this issue seems to be unrelated to TheHive or ThePhish itself, it is likely more of a configuration problem either in your configuration file or with your Google App password.
I suggest you switch to TheHive 4 to try ThePhish, maybe you can use the docker-compose available in the repo.

@gabyavra
Copy link

I have the same error, the credentials are fine
"imap" : {
"host" : "imap.gmail.com",
"port" : "993",
"user" : "email@gmail.com",
"password" : "password",
"folder" : "inbox"
},

Error

thephish | [ERROR]_[list_emails]: Error while trying to connect to IMAP server: Traceback (most recent call last):
thephish | File "/root/thephish/list_emails.py", line 243, in main
thephish | connection = connect_to_IMAP_server()
thephish | File "/root/thephish/list_emails.py", line 21, in connect_to_IMAP_server
thephish | connection.login(config['imapUser'], config['imapPassword'])
thephish | File "/usr/lib/python3.8/imaplib.py", line 601, in login
thephish | typ, dat = self._simple_command('LOGIN', user, self._quote(password))
thephish | File "/usr/lib/python3.8/imaplib.py", line 1205, in _simple_command
thephish | return self._command_complete(name, self._command(name, *args))
thephish | File "/usr/lib/python3.8/imaplib.py", line 1030, in _command_complete
thephish | raise self.error('%s command error: %s %s' % (name, typ, data))
thephish | imaplib.IMAP4.error: LOGIN command error: BAD [b'Not enough arguments provided h10mb16417107edv']

Any advice? Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants