Skip to content
New issue

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

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

Already on GitHub? # to your account

Add datadog client token #196

Merged
merged 4 commits into from
Oct 9, 2021
Merged

Conversation

gruebel
Copy link
Contributor

@gruebel gruebel commented Oct 9, 2021

⚠ Pull Requests not made with this template will be automatically closed πŸ”₯

Prerequisites

Why do we need this pull request?

  • With the client token you can send events and logs pf a web and mobile application to Datadog.

What GitHub issues does this fix?

  • no issue realted to it

Copy / paste of output

Please copy and paste the output of PyWhat with your new addition using an example that tests this addition below:

$ poetry run pywhat pub85abf45b82e2f86f25003d559bca07d9
Matched on: pub85abf45b82e2f86f25003d559bca07d9
Name: Datadog Client Token
Description: Client tokens are used to send events and logs from web and mobile applications.

Matched on: b85abf45b82e2f86f25003d5
Name: ObjectID

@codecov-commenter
Copy link

codecov-commenter commented Oct 9, 2021

Codecov Report

Merging #196 (86268bc) into main (ac3b4d5) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #196      +/-   ##
==========================================
+ Coverage   92.11%   92.14%   +0.02%     
==========================================
  Files          13       13              
  Lines        1611     1617       +6     
==========================================
+ Hits         1484     1490       +6     
  Misses        127      127              
Impacted Files Coverage Ξ”
tests/test_regex_identifier.py 98.54% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data
Powered by Codecov. Last update ac3b4d5...86268bc. Read the comment docs.

"Regex": "^(pub[a-f0-9]{32})$",
"plural_name": false,
"Description": "Client tokens are used to send events and logs from web and mobile applications.",
"Exploit": null,
Copy link
Owner

Choose a reason for hiding this comment

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

πŸ‘€ Looks like there's a way to validate a Data dog API key:
https://docs.datadoghq.com/api/latest/authentication/

Mind adding this in? Search for "Curl" in the database and copy / paste it. There should also be info in the docs on how to make it right :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, will give it a try

@bee-san
Copy link
Owner

bee-san commented Oct 9, 2021

Thanks so much for the PR!!!! :)

@gruebel
Copy link
Contributor Author

gruebel commented Oct 9, 2021

Datadog API Key

$ poetry run pywhat acb6d73d95a10d30aef9894603e90963                                                                                           
Matched on: acb6d73d95a10d30aef9894603e90963
Name: Datadog API Key
Exploit: Use the command below to verify that the API key is valid:
  $ curl -X GET https://api.datadoghq.com/api/v1/validate -H "Content-Type: application/json" -H "DD-API-KEY: acb6d73d95a10d30aef9894603e90963"


Matched on: e90963
Name: Latitude & Longitude Coordinates
Link:  https://www.google.com/maps/place/e90963

Matched on: acb6d73d95a10d30aef98946
Name: ObjectID

@gruebel gruebel requested a review from bee-san October 9, 2021 16:49
@bee-san
Copy link
Owner

bee-san commented Oct 9, 2021

Can you run poetry run pywhat --version for me please? ObjectID shouldn't match :(

This is because objectid is rarity 0.1

https://github.com/bee-san/pyWhat/blob/main/pywhat/Data/regex.json#L1733-L1743

which by default doesn't appear in the output. Are you rebased off main branch? :D

@gruebel
Copy link
Contributor Author

gruebel commented Oct 9, 2021

$ poetry run pywhat --version
PyWhat version 4.3.0

@bee-san
Copy link
Owner

bee-san commented Oct 9, 2021

Ahh it's set to 0, not 0.1 my bad :) Everything ranked as 0 is ignored!

@bee-san bee-san merged commit e36b83a into bee-san:main Oct 9, 2021
@gruebel gruebel deleted the add-datadog-client-token branch October 9, 2021 16:54
@bee-san
Copy link
Owner

bee-san commented Oct 9, 2021

Thanks so much!! Data dog is a cool company, appreciate it πŸ‘πŸ» And this exploit feature is very cool for people who want to see if the API key works or not πŸ‘€

Exploit: Use the command below to verify that the API key is valid:
  $ curl -X GET https://api.datadoghq.com/api/v1/validate -H "Content-Type: application/json" -H "DD-API-KEY: acb6d73d95a10d30aef9894603e90963"

@gruebel
Copy link
Contributor Author

gruebel commented Oct 9, 2021

yeah, definitely πŸ™‚

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

Successfully merging this pull request may close these issues.

3 participants