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

add threatcrowd analyzer #244

Merged
merged 8 commits into from
Jun 4, 2018
Merged

Conversation

remiallain
Copy link

No description provided.

@nadouani
Copy link
Contributor

Hello @remiallain

Thanks for the PR. Could you use HTTPS when calling the APIs http://www.threatcrowd.org/searchApi/v2

@remiallain
Copy link
Author

Hello @nadouani , thanks for your comment, I've updated it .

@nadouani
Copy link
Contributor

Thanks, concerning the long report, what information do you think useful to display?

@remiallain
Copy link
Author

For all dataType :

  • votes (-1,0 or 1)
  • references (Array)
  • link to the full report on threatcrowd.org

For domain dataType :

  • emails associated to the domain (Array)
  • subdomains (Array)

For ip dataType :

  • hashes (Array)
  • resolutions (Array)

For email dataType :

  • domains (Array)

@3c7
Copy link
Contributor

3c7 commented May 29, 2018

Hey @remiallain, would you consider this analyzer as "completed"?

@3c7 3c7 added category:enhancement Issue is related to an existing feature to improve scope:analyzer Issue is analyzer related status:needs-review labels May 29, 2018
@3c7 3c7 added this to the 1.10.0 milestone May 29, 2018
@remiallain
Copy link
Author

Hello @3c7 , yes it's completed ;)

@3c7
Copy link
Contributor

3c7 commented May 29, 2018

@remiallain perfect. :)

@3c7 3c7 changed the base branch from master to release/1.10.0 May 29, 2018 11:39
@3c7 3c7 self-requested a review May 30, 2018 07:05
Copy link
Contributor

@3c7 3c7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found some things that need a change. Would it be possible for you to make them?

"version": "1.0",
"description": "Search for information on threatcrowd.org",
"dataTypeList": [
"email",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default e-mail data type is mail.


if (self.data_type == 'domain' or self.data_type == 'ip' or self.data_type == 'email'):
try:
response = requests.get("{}/{}/report/".format(self.URI, self.data_type), {self.data_type: self.get_data()})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above: default e-mail datatype is mail.

Something like self.data_type if self.data_type != 'mail' else 'email' would be possible. Requests to threat crowd contains then email as a datatype.


if 'votes' in raw:
r = raw.get('votes')
value = r
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r is None if ThreatCrowd doesn't know an email. That should be catched somehow.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(the level would be unspecified that way)

Threatcrowd analysis for
<strong>{{artifact.data}}</strong>
</div>
<div class="panel-body">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should catch an empty result, because currently there would be an empty table.

@3c7 3c7 merged commit 86bcbce into TheHive-Project:release/1.10.0 Jun 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:enhancement Issue is related to an existing feature to improve scope:analyzer Issue is analyzer related status:needs-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants