Git Product home page Git Product logo

cve-analysis's People

Contributors

joshbressers avatar larbibaraka avatar p4rs3r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cve-analysis's Issues

Problem with importing saved object

Hi,

As per subject, I am having problem importing cve-kibana.ndjson
I have tried Elasticsearch/Kibana 7.3.1 and 7.0.1, after clicking Import I get

Sorry, there was an error
The file could not be processed.

I came across this article, claiming that warning is triggered by JSON parser
https://discuss.elastic.co/t/kibana-dashboard-import-failed-this-file-could-not-be-processed/91181

when I tried to validate cve-kibana.ndjson using https://jsonformatter.org/ I got following:
Parse error on line 1:
...rsion":"WzEyLDNd"}
{"attributes":{"desc
----------------------^
Expecting 'EOF', '}', ',', ']', got '{'

Has anybody experienced similar issue ??

Thanks

json-parse not working properly

Traceback (most recent call last):
File "./json-parse.py", line 31, in
main()
File "./json-parse.py", line 28, in main
:cve, 'doc_as_upsert': True})
File "/usr/local/lib/python3.6/dist-packages/elasticsearch/client/utils.py", line 84, in _wrapped
return func(*args, params=params, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/elasticsearch/client/init.py", line 661, in update
"POST", _make_path(index, doc_type, id, "_update"), params=params, body=body
File "/usr/local/lib/python3.6/dist-packages/elasticsearch/transport.py", line 318, in perform_request
status, headers_response, data = connection.perform_request(method, url, params, body, headers=headers, ignore=ignore, timeout=timeout)
File "/usr/local/lib/python3.6/dist-packages/elasticsearch/connection/http_urllib3.py", line 239, in perform_request
self._raise_error(response.status, raw_data)
File "/usr/local/lib/python3.6/dist-packages/elasticsearch/connection/base.py", line 131, in _raise_error
raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
elasticsearch.exceptions.RequestError: RequestError(400, 'mapper_parsing_exception', 'failed to parse field [description] of type [text]')

mapper_parsing_exception using the curl command to create the cve-index

I get the following error when trying to use the curl command from the "Quick start guide". Not being an expert on elasticsearch I thought you might be able to tell me if I am doing something wrong or if it's a compatability issue with elasticsearch 7x? :

sudo curl -XPUT 'localhost:9200/cve-index?pretty' -H 'Content-Type: application/json' -d @cve-index.json

{ "error" : { "root_cause" : [ { "type" : "mapper_parsing_exception", "reason" : "Root mapping definition has unsupported parameters: [doc : {properties={fromNVD={type=long}, cvss:confidentiality-impact={type=text, fields={keyword={type=keyword}}}, product={type=text, fields={keyword={type=keyword}}}, cvss:generated-on-datetime={type=date}, year={type=long}, cvss:source={type=text, fields={keyword={type=keyword}}}, cvss:score={type=long}, description={fielddata=true, analyzer=english, type=text, fields={shingle={fielddata=true, analyzer=analyzer_shingle, type=text}, keyword={type=keyword}}}, cvss:authentication={type=text, fields={keyword={type=keyword}}}, cvss:access-vector={type=text, fields={keyword={type=keyword}}}, cwe={type=text, fields={keyword={type=keyword}}}, cvss:integrity-impact={type=text, fields={keyword={type=keyword}}}, fromCVE={type=long}, id={type=long}, cvss:availability-impact={type=text, fields={keyword={type=keyword}}}, cvss:access-complexity={type=text, fields={keyword={type=keyword}}}}}]" } ], "type" : "mapper_parsing_exception", "reason" : "Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters: [doc : {properties={fromNVD={type=long}, cvss:confidentiality-impact={type=text, fields={keyword={type=keyword}}}, product={type=text, fields={keyword={type=keyword}}}, cvss:generated-on-datetime={type=date}, year={type=long}, cvss:source={type=text, fields={keyword={type=keyword}}}, cvss:score={type=long}, description={fielddata=true, analyzer=english, type=text, fields={shingle={fielddata=true, analyzer=analyzer_shingle, type=text}, keyword={type=keyword}}}, cvss:authentication={type=text, fields={keyword={type=keyword}}}, cvss:access-vector={type=text, fields={keyword={type=keyword}}}, cwe={type=text, fields={keyword={type=keyword}}}, cvss:integrity-impact={type=text, fields={keyword={type=keyword}}}, fromCVE={type=long}, id={type=long}, cvss:availability-impact={type=text, fields={keyword={type=keyword}}}, cvss:access-complexity={type=text, fields={keyword={type=keyword}}}}}]", "caused_by" : { "type" : "mapper_parsing_exception", "reason" : "Root mapping definition has unsupported parameters: [doc : {properties={fromNVD={type=long}, cvss:confidentiality-impact={type=text, fields={keyword={type=keyword}}}, product={type=text, fields={keyword={type=keyword}}}, cvss:generated-on-datetime={type=date}, year={type=long}, cvss:source={type=text, fields={keyword={type=keyword}}}, cvss:score={type=long}, description={fielddata=true, analyzer=english, type=text, fields={shingle={fielddata=true, analyzer=analyzer_shingle, type=text}, keyword={type=keyword}}}, cvss:authentication={type=text, fields={keyword={type=keyword}}}, cvss:access-vector={type=text, fields={keyword={type=keyword}}}, cwe={type=text, fields={keyword={type=keyword}}}, cvss:integrity-impact={type=text, fields={keyword={type=keyword}}}, fromCVE={type=long}, id={type=long}, cvss:availability-impact={type=text, fields={keyword={type=keyword}}}, cvss:access-complexity={type=text, fields={keyword={type=keyword}}}}}]" } }, "status" : 400 }

Dashboard errors

Description tagcloud, CVSSv3 Histogram and CVSSv2 Histogram display error

when you hover over Description tagcloud you get the follow pop up [esaggs]> Saved field "description.description_value" of index pattern "cve-index" is invalid for use with the "Terms" aggregation. Please select a new field.

when you hover over CVSSv3 Histogram you get the follow pop up [esagg]> Unable to retrieve max and min values to auto-scale histogram buckets. This may lead to poor visualization performance.

when you hover over CVSSv2 Histogram you get the follow pop up Unable to retrieve max and min values to auto-scale histogram buckets. This may lead to poor visualization performance.

Any idea what is going on with this?

Thanks

Json related mapping issue in elasticsearch while importing json file.

Loading JSON data/nvdcve-1.0-2017.json
POST http://localhost:9200/cve-index/doc/CVE-2017-0001/_update [status:400 request:0.016s]
Traceback (most recent call last):
File "./json-parse.py", line 30, in
main()
File "./json-parse.py", line 27, in main
es.update(id=cve_id, index="cve-index", doc_type='doc', body={'doc':cve, 'doc_as_upsert': True})
File "/usr/local/lib/python3.6/dist-packages/elasticsearch/client/utils.py", line 76, in _wrapped
return func(*args, params=params, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/elasticsearch/client/init.py", line 547, in update
doc_type, id, '_update'), params=params, body=body)
File "/usr/local/lib/python3.6/dist-packages/elasticsearch/transport.py", line 318, in perform_request
status, headers_response, data = connection.perform_request(method, url, params, body, headers=headers, ignore=ignore, timeout=timeout)
File "/usr/local/lib/python3.6/dist-packages/elasticsearch/connection/http_urllib3.py", line 186, in perform_request
self._raise_error(response.status, raw_data)
File "/usr/local/lib/python3.6/dist-packages/elasticsearch/connection/base.py", line 125, in _raise_error
raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
elasticsearch.exceptions.RequestError: RequestError(400, 'mapper_parsing_exception', 'failed to parse field [description] of type [text]')

Configurations for the mapping

Hi, I want to include the configurations part in the mapping in order to have also the information about the cpe fram the CVE. Furthermore, something goes wrong and once I load the CVEs on Elastic, they have not those fields.

Elastic Stack has SSL enabled

in json-parse.py you specify the server as
if 'ESURL' not in os.environ:
es_url = "http://localhost:9200"

What would be the correct syntax for https? with a self signed certificate?
I have tried
es_url = "https://localhost:9200", ca_certs="/path/to/http_ca.crt"

But all this does is fail saying that it is looking for a list of hosts.

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.