Giter Site home page Giter Site logo

[BUG]Documentation about thephish HOT 15 CLOSED

mclancy10006 avatar mclancy10006 commented on July 28, 2024
[BUG]Documentation

from thephish.

Comments (15)

emalderson avatar emalderson commented on July 28, 2024 1

The version is the right one, so it seems it was a problem of RBAC, right? As explained in the documentation, the TheHive user must have the OrgAdmin role.

from thephish.

mgrant0 avatar mgrant0 commented on July 28, 2024 1

It does seem to be an RBAC as you say. I see why we didn't read that page. We installed it straight on an instance. We haven't used the docker image yet. But we did create an OrgAdmin, we just did not initially use the OrgAdmin user in ThePhish config, only the real Admin.

I definitely think it's worth mentioning in your instructions to use a user with OrgAdmin.

from thephish.

emalderson avatar emalderson commented on July 28, 2024

Hello, I know. However, the case_from_email module should automatically create a case template named "ThePhish" if it does not exist yet, as you can see in the following lines of code:

# Create the case on TheHive and add the observables to it
def create_case(subject_field, observables_header, observables_body, attachments, hashes_attachments, eml_file_tuple, wsl):
# Create the case template first if it does not exist
if(len(api_thehive.find_case_templates(query = thehive4py.query.Eq("name", 'ThePhish')).json())) == 0:
task_notification = thehive4py.models.CaseTask(title = 'ThePhish notification')
task_analysis = thehive4py.models.CaseTask(title = 'ThePhish analysis')
task_result = thehive4py.models.CaseTask(title = 'ThePhish result')
case_template = thehive4py.models.CaseTemplate(name = 'ThePhish',
titlePrefix = '[ThePhish] ',
tasks = [task_notification, task_analysis, task_result])
response = api_thehive.create_case_template(case_template)
if response.status_code == 201:
log.info('Template ThePhish created successfully')
wsl.emit_info('Template ThePhish created successfully')
else:
log.error('Cannot create template: {0} ({1})'.format(response.status_code, response.text))
wsl.emit_error('Cannot create template: {0} ({1})'.format(response.status_code, response.text))
return

from thephish.

mgrant0 avatar mgrant0 commented on July 28, 2024

Any suggestions on how to proceed?

from thephish.

emalderson avatar emalderson commented on July 28, 2024

As I said earlier, ThePhish automatically creates a case template named "ThePhish" if it does not exist yet. Check if the problem is on your side, maybe due to your configuration or work environment. Don't forget to specify your work environment following this Issue Template when opening issues related to possible bugs.

from thephish.

janjaom avatar janjaom commented on July 28, 2024

About this problem is not having created the template, but I create the template manually with 3 tasks and it works fine!

from thephish.

emalderson avatar emalderson commented on July 28, 2024

This is odd, the tool should create the template on its own. What version of TheHive4py do you have installed?

from thephish.

mgrant0 avatar mgrant0 commented on July 28, 2024
# apt policy thehive4
thehive4:
  Installed: 4.1.11-1
  Candidate: 4.1.11-1
  Version table:
 *** 4.1.11-1 500
        500 https://deb.thehive-project.org release/main amd64 Packages
        100 /var/lib/dpkg/status

from thephish.

mgrant0 avatar mgrant0 commented on July 28, 2024

One thing we discovered is that the Cortex user needs to have OrgAdmin permissions. Then it'll create the template.

from thephish.

emalderson avatar emalderson commented on July 28, 2024

The version on which ThePhish has been tested is TheHive 4.1.9.
Anyway, I was asking for the version of TheHive4py, which is the Python API module used to interact with TheHive.

from thephish.

mgrant0 avatar mgrant0 commented on July 28, 2024

Seems to be thehive4py-1.8.1

from thephish.

emalderson avatar emalderson commented on July 28, 2024

One thing we discovered is that the Cortex user needs to have OrgAdmin permissions. Then it'll create the template.

Maybe you mean the TheHive user, since the template is created on TheHive and it has nothing to do with Cortex. The fact that it must have the OrgAdmin permission is explained here.

from thephish.

mgrant0 avatar mgrant0 commented on July 28, 2024

sorry, yes

from thephish.

emalderson avatar emalderson commented on July 28, 2024

I will highlight this fact in the documentation for sure in the next commit, thanks for the suggestion!

from thephish.

emalderson avatar emalderson commented on July 28, 2024

This problem has been fixed in the documentation, closed.

from thephish.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.