guezone / secmon Goto Github PK
View Code? Open in Web Editor NEWSECMON is a web-based tool for the automation of infosec watching and vulnerability management with a web interface.
License: Other
SECMON is a web-based tool for the automation of infosec watching and vulnerability management with a web interface.
License: Other
I can't import csv with cpe and keywords
Hello,
does it possible to commuicate with secmon to another website ?
Best regards,
Hey there!
I belong to an open source security research community, and a member (@ktg9) has found an issue, but doesn’t know the best way to disclose it.
If not a hassle, might you kindly add a SECURITY.md
file with an email, or another contact method? GitHub recommends this best practice to ensure security issues are responsibly disclosed, and it would serve as a simple instruction for security researchers in the future.
Thank you for your consideration, and I look forward to hearing from you!
(cc @huntr-helper)
RSS news database recording in progress...
Successful build database.
CVE database recording in progress...This operation can take a few minutes to a few hours. Take a coffee! :D
ERROR
################## NEW SCRIPT ERROR AT 11/06/2021, 00:34:31 ##################
Traceback (most recent call last):
File "/var/www/secmon/secmon_lib.py", line 564, in registerNewCve
nvd_data = nvd_response.json()
File "/usr/local/lib/python3.7/dist-packages/requests/models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3.7/json/init.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
None
################## PLEASE REPORT THIS ON GITHUB ##################
I was able to identify that at times, 403 errors were returned by the NVD/NIST API. It seems that this is due to the large number of requests made by SECMON.
-> In discussion with NIST about the cause of the problem (no documentation about rate limit).
Hi,
When i would like to add https tls 1.3 on my webserver, and when i would like to consult your web app i access on httpd default pages.
Conf : http://pastebin.fr/101659
ERROR when SECMON would to register this CVE : CVE-2021-31959
################## NEW SCRIPT ERROR AT 16/12/2021, 16:24:31 ##################
Traceback with variables (most recent call last):
File "/var/www/secmon/secmon_lib.py", line 582, in registerNewCve
nvd_response = requests.get(url=nvd_query)
cve_id = 'CVE-2021-31959'
reason = 'Setup'
product = 'cpe:2.3:o:microsoft:windows_10:1909:::::::*'
now_date = ['2021', '12', '16']
idx_date = '16/12/2021'
con = <sqlite3.Connection object at 0x7f8ec2875d50>
cur = <sqlite3.Cursor object at 0x7f8ec2813f80>
db_result_tuple = <sqlite3.Row object at 0x7f8ec2a78370>
value = 'fr'
language = 'fr'
db_result_list = []
db_result_str = ''
nvd_base_url = 'https://services.nvd.nist.gov/rest/json/cve/1.0/'
nvd_query = 'https://services.nvd.nist.gov/rest/json/cve/1.0/CVE-2021-31959'
e = ConnectionError(MaxRetryError("HTTPSConnectionPool(host='services.nvd.nist.gov', port=443): Max retries exceeded with url: /rest/json/cve/1.0/CVE-2021-31959 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f8ec294b850>: Failed to establish a new connection: [Errno 101] Network is unreachable'))"))
File "/usr/lib/python3/dist-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
url = 'https://services.nvd.nist.gov/rest/json/cve/1.0/CVE-2021-31959'
params = None
kwargs = {'allow_redirects': True}
File "/usr/lib/python3/dist-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
method = 'get'
url = 'https://services.nvd.nist.gov/rest/json/cve/1.0/CVE-2021-31959'
kwargs = {'params': None, 'allow_redirects': True}
session = <requests.sessions.Session object at 0x7f8ec5665fa0>
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
self = <requests.sessions.Session object at 0x7f8ec5665fa0>
method = 'get'
url = 'https://services.nvd.nist.gov/rest/json/cve/1.0/CVE-2021-31959'
params = None
data = None
headers = None
cookies = None
files = None
auth = None
timeout = None
allow_redirects = True
proxies = {}
hooks = None
stream = None
verify = None
cert = None
json = None
req = <Request [GET]>
prep = <PreparedRequest [GET]>
settings = {'verify': True, 'proxies': OrderedDict(), 'stream': False, 'cert': None}
send_kwargs = {'timeout': None, 'allow_redirects': True, 'verify': True, 'proxies': OrderedDict(), 'stream': False, 'cert': None}
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
self = <requests.sessions.Session object at 0x7f8ec5665fa0>
request = <PreparedRequest [GET]>
kwargs = {'timeout': None, 'verify': True, 'proxies': OrderedDict(), 'stream': False, 'cert': None}
allow_redirects = True
stream = False
hooks = {'response': []}
adapter = <requests.adapters.HTTPAdapter object at 0x7f8ec2a73b50>
start = 1639671741.9093134
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
self = <requests.adapters.HTTPAdapter object at 0x7f8ec2a73b50>
request = <PreparedRequest [GET]>
stream = False
timeout = <urllib3.util.timeout.Timeout object at 0x7f8ec27cc040>
verify = True
cert = None
proxies = OrderedDict()
conn = <urllib3.connectionpool.HTTPSConnectionPool object at 0x7f8ec27ccee0>
url = '/rest/json/cve/1.0/CVE-2021-31959'
chunked = False
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='services.nvd.nist.gov', port=443): Max retries exceeded with url: /rest/json/cve/1.0/CVE-2021-31959 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f8ec294b850>: Failed to establish a new connection: [Errno 101] Network is unreachable'))
None
################## PLEASE REPORT THIS ON GITHUB ##################
[Mon Jul 12 20:55:43.590675 2021] [ssl:info] [pid 17445:tid 140365319313152] [client 10.4.4.254:56464] AH01964: Connection to child 83 established (server secmon-01.gueznet.local:443)
[Mon Jul 12 20:55:47.880870 2021] [wsgi:error] [pid 17443:tid 140365478409984] [remote 10.4.4.254:56464] ################## NEW GUI ERROR AT 12/07/2021, 20:55:47 ##################
[Mon Jul 12 20:55:47.881075 2021] [wsgi:error] [pid 17443:tid 140365478409984] [remote 10.4.4.254:56464] ######## URL : https://secmon.gueznet.local/cve/CVE-2021-24013 ##########
[Mon Jul 12 20:55:47.881183 2021] [wsgi:error] [pid 17443:tid 140365478409984] [remote 10.4.4.254:56464] Traceback (most recent call last):
[Mon Jul 12 20:55:47.881217 2021] [wsgi:error] [pid 17443:tid 140365478409984] [remote 10.4.4.254:56464] File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1950, in full_dispatch_request
[Mon Jul 12 20:55:47.881224 2021] [wsgi:error] [pid 17443:tid 140365478409984] [remote 10.4.4.254:56464] rv = self.dispatch_request()
[Mon Jul 12 20:55:47.881251 2021] [wsgi:error] [pid 17443:tid 140365478409984] [remote 10.4.4.254:56464] File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1936, in dispatch_request
[Mon Jul 12 20:55:47.881257 2021] [wsgi:error] [pid 17443:tid 140365478409984] [remote 10.4.4.254:56464] return self.view_functionsrule.endpoint
[Mon Jul 12 20:55:47.881263 2021] [wsgi:error] [pid 17443:tid 140365478409984] [remote 10.4.4.254:56464] File "/usr/local/lib/python3.7/dist-packages/flask_simplelogin/init.py", line 117, in simple_decorator
[Mon Jul 12 20:55:47.881268 2021] [wsgi:error] [pid 17443:tid 140365478409984] [remote 10.4.4.254:56464] return dispatch(function, *args, **kwargs)
[Mon Jul 12 20:55:47.881274 2021] [wsgi:error] [pid 17443:tid 140365478409984] [remote 10.4.4.254:56464] File "/usr/local/lib/python3.7/dist-packages/flask_simplelogin/init.py", line 98, in dispatch
[Mon Jul 12 20:55:47.881279 2021] [wsgi:error] [pid 17443:tid 140365478409984] [remote 10.4.4.254:56464] return check(must) or fun(*args, **kwargs)
[Mon Jul 12 20:55:47.881285 2021] [wsgi:error] [pid 17443:tid 140365478409984] [remote 10.4.4.254:56464] File "/var/www/secmon/secmon_web.py", line 578, in cveInfos
[Mon Jul 12 20:55:47.881290 2021] [wsgi:error] [pid 17443:tid 140365478409984] [remote 10.4.4.254:56464] return render_template('result.html',back_path="../../vuln-mgmt",cve_id=infos['cve_id'] ,cve_summary=infos['cve_description'],cve_dbs=infos['cve_dbs'],cve_date=infos['cve_date'],cve_score=infos['cve_score'],cve_status=infos['cve_status'],cve_cpe=infos['cve_cpe'],cve_sources=infos['cve_sources'],cve_av=infos['cve_av'],cve_ac=infos['cve_ac'],cve_pr=infos['cve_pr'],cve_ui=infos['cve_ui'],cve_scope=infos['cve_scope'],cve_confid=infos['cve_confid'],cve_integrity=infos['cve_integrity'],cve_avail=infos['cve_avail'],cve_expa=infos['cve_expa'],cve_weakness=infos['cve_weakness'],weakness_nb=weakness_nb,back="../../")
[Mon Jul 12 20:55:47.881306 2021] [wsgi:error] [pid 17443:tid 140365478409984] [remote 10.4.4.254:56464] UnboundLocalError: local variable 'weakness_nb' referenced before assignment
[Mon Jul 12 20:55:47.881318 2021] [wsgi:error] [pid 17443:tid 140365478409984] [remote 10.4.4.254:56464] None
[Mon Jul 12 20:55:47.881325 2021] [wsgi:error] [pid 17443:tid 140365478409984] [remote 10.4.4.254:56464] ################## PLEASE REPORT THIS ON GITHUB ##################
[Mon Jul 12 20:55:47.922428 2021] [ssl:info] [pid 17445:tid 140365344491264] [client 10.4.4.254:56476] AH01964: Connection to child 80 established (server secmon-01.gueznet.local:443)
[Mon Jul 12 20:55:47.930005 2021] [ssl:info] [pid 17445:tid 140365369669376] [client 10.4.4.254:56478] AH01964: Connection to child 77 established (server secmon-01.gueznet.local:443)
[Mon Jul 12 20:55:47.948359 2021] [ssl:info] [pid 17445:tid 140365386454784] [client 10.4.4.254:56484] AH01964: Connection to child 75 established (server secmon-01.gueznet.local:443)
[Mon Jul 12 20:55:47.953303 2021] [ssl:info] [pid 17445:tid 140365394847488] [client 10.4.4.254:56482] AH01964: Connection to child 74 established (server secmon-01.gueznet.local:443)
[Mon Jul 12 20:55:47.959746 2021] [ssl:info] [pid 17444:tid 140365319313152] [client 10.4.4.254:56480] AH01964: Connection to child 19 established (server secmon-01.gueznet.local:443)
[Mon Jul 12 20:55:48.135307 2021] [wsgi:error] [pid 17443:tid 140365428004608] [remote 10.4.4.254:56476] ################## NEW GUI ERROR AT 12/07/2021, 20:55:48 ##################
[Mon Jul 12 20:55:48.135482 2021] [wsgi:error] [pid 17443:tid 140365428004608] [remote 10.4.4.254:56476] ######## URL : https://secmon.gueznet.local/cve/img/logo.png ##########
[Mon Jul 12 20:55:48.135601 2021] [wsgi:error] [pid 17443:tid 140365428004608] [remote 10.4.4.254:56476] Traceback (most recent call last):
[Mon Jul 12 20:55:48.135632 2021] [wsgi:error] [pid 17443:tid 140365428004608] [remote 10.4.4.254:56476] File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1950, in full_dispatch_request
[Mon Jul 12 20:55:48.135652 2021] [wsgi:error] [pid 17443:tid 140365428004608] [remote 10.4.4.254:56476] rv = self.dispatch_request()
[Mon Jul 12 20:55:48.135660 2021] [wsgi:error] [pid 17443:tid 140365428004608] [remote 10.4.4.254:56476] File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1936, in dispatch_request
[Mon Jul 12 20:55:48.135665 2021] [wsgi:error] [pid 17443:tid 140365428004608] [remote 10.4.4.254:56476] return self.view_functionsrule.endpoint
[Mon Jul 12 20:55:48.135672 2021] [wsgi:error] [pid 17443:tid 140365428004608] [remote 10.4.4.254:56476] File "/var/www/secmon/secmon_web.py", line 726, in serveStaticResource
[Mon Jul 12 20:55:48.135677 2021] [wsgi:error] [pid 17443:tid 140365428004608] [remote 10.4.4.254:56476] return send_from_directory('static/', resource)
[Mon Jul 12 20:55:48.135683 2021] [wsgi:error] [pid 17443:tid 140365428004608] [remote 10.4.4.254:56476] File "/usr/local/lib/python3.7/dist-packages/flask/helpers.py", line 767, in send_from_directory
[Mon Jul 12 20:55:48.135688 2021] [wsgi:error] [pid 17443:tid 140365428004608] [remote 10.4.4.254:56476] raise NotFound()
[Mon Jul 12 20:55:48.135701 2021] [wsgi:error] [pid 17443:tid 140365428004608] [remote 10.4.4.254:56476] werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
[Mon Jul 12 20:55:48.135714 2021] [wsgi:error] [pid 17443:tid 140365428004608] [remote 10.4.4.254:56476] None
[Mon Jul 12 20:55:48.135722 2021] [wsgi:error] [pid 17443:tid 140365428004608] [remote 10.4.4.254:56476] ################## PLEASE REPORT THIS ON GITHUB ##################
Hi, on page https://xx.xx.xx.xx/by-product-vulns I get this error:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python3/dist-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "/usr/local/lib/python3.9/dist-packages/flask_simplelogin/init.py", line 117, in simple_decorator
return dispatch(function, *args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/flask_simplelogin/init.py", line 98, in dispatch
return check(must) or fun(*args, **kwargs)
File "/var/www/secmon/secmon_web.py", line 587, in byProductVulns
product = request.form['product_selection']
File "/usr/lib/python3/dist-packages/werkzeug/datastructures.py", line 442, in getitem
raise exceptions.BadRequestKeyError(key)
werkzeug.exceptions.BadRequestKeyError: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.
Any suggestion?
I got an error when trying to import from CSV:
Unexpected error
Oops. SECMON has encountered an error!
From apache.log:
[Fri Jul 23 13:34:59.745870 2021] [wsgi:error] [pid 9726:tid 140063431202560] [remote 192.168.28.224:52852] ################## NEW GUI ERROR AT 23/07/2021, 13:34:59 ##################
[Fri Jul 23 13:34:59.746239 2021] [wsgi:error] [pid 9726:tid 140063431202560] [remote 192.168.28.224:52852] ######## URL : https://10.5.6.133/product-mgmt ##########
[Fri Jul 23 13:34:59.747316 2021] [wsgi:error] [pid 9726:tid 140063431202560] [remote 192.168.28.224:52852] Traceback (most recent call last):
[Fri Jul 23 13:34:59.747363 2021] [wsgi:error] [pid 9726:tid 140063431202560] [remote 192.168.28.224:52852] File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1950, in full_dispatch_request
[Fri Jul 23 13:34:59.747368 2021] [wsgi:error] [pid 9726:tid 140063431202560] [remote 192.168.28.224:52852] rv = self.dispatch_request()
[Fri Jul 23 13:34:59.747373 2021] [wsgi:error] [pid 9726:tid 140063431202560] [remote 192.168.28.224:52852] File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1936, in dispatch_request
[Fri Jul 23 13:34:59.747377 2021] [wsgi:error] [pid 9726:tid 140063431202560] [remote 192.168.28.224:52852] return self.view_functionsrule.endpoint
[Fri Jul 23 13:34:59.747382 2021] [wsgi:error] [pid 9726:tid 140063431202560] [remote 192.168.28.224:52852] File "/usr/local/lib/python3.7/dist-packages/flask_simplelogin/init.py", line 117, in simple_decorator
[Fri Jul 23 13:34:59.747385 2021] [wsgi:error] [pid 9726:tid 140063431202560] [remote 192.168.28.224:52852] return dispatch(function, *args, **kwargs)
[Fri Jul 23 13:34:59.747389 2021] [wsgi:error] [pid 9726:tid 140063431202560] [remote 192.168.28.224:52852] File "/usr/local/lib/python3.7/dist-packages/flask_simplelogin/init.py", line 98, in dispatch
[Fri Jul 23 13:34:59.747393 2021] [wsgi:error] [pid 9726:tid 140063431202560] [remote 192.168.28.224:52852] return check(must) or fun(*args, **kwargs)
[Fri Jul 23 13:34:59.747397 2021] [wsgi:error] [pid 9726:tid 140063431202560] [remote 192.168.28.224:52852] File "/var/www/secmon/secmon_web.py", line 687, in psearch
[Fri Jul 23 13:34:59.747400 2021] [wsgi:error] [pid 9726:tid 140063431202560] [remote 192.168.28.224:52852] if filename.split(".")[1] == "csv" and len(filename.split(".")) == 2:
[Fri Jul 23 13:34:59.747419 2021] [wsgi:error] [pid 9726:tid 140063431202560] [remote 192.168.28.224:52852] IndexError: list index out of range
[Fri Jul 23 13:34:59.747431 2021] [wsgi:error] [pid 9726:tid 140063431202560] [remote 192.168.28.224:52852] None
[Fri Jul 23 13:34:59.747437 2021] [wsgi:error] [pid 9726:tid 140063431202560] [remote 192.168.28.224:52852] ################## PLEASE REPORT THIS ON GITHUB ##################
sudo docker build . -t secmon:latest
Fails. I cannot get past this step.
>>> RUN cd /tmp && pip3 install -r requirements.txt && rm -Rf /var/www/html
failed to solve: process "/bin/sh -c cd /tmp && pip3 install -r requirements.txt && rm -Rf /var/www/html" did not complete successfully: exit code: 1
CENTOS 8 / Python 3.6 (and 3.9) installed
Apache Httpd error log:
[Tue Nov 23 09:15:09.203769 2021] [wsgi:error] ################## NEW GUI ERROR AT 23/11/2021, 09:15:09 ##################
[Tue Nov 23 09:15:09.204160 2021] [wsgi:error] ######## URL : https://secmon.domain.com/tasks ##########
[Tue Nov 23 09:15:09.205417 2021] [wsgi:error] Traceback with variables (most recent call last):
[Tue Nov 23 09:15:09.205460 2021] [wsgi:error] File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request
[Tue Nov 23 09:15:09.205505 2021] [wsgi:error] rv = self.dispatch_request()
[Tue Nov 23 09:15:09.205551 2021] [wsgi:error] e = AttributeError("type object 'datetime.datetime' has no attribute 'fromisoformat'",)
[Tue Nov 23 09:15:09.205583 2021] [wsgi:error] rv = None
[Tue Nov 23 09:15:09.205621 2021] [wsgi:error] self = <Flask 'secmon_web'>
[Tue Nov 23 09:15:09.205653 2021] [wsgi:error] File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request
[Tue Nov 23 09:15:09.205690 2021] [wsgi:error] return self.view_functionsrule.endpoint
[Tue Nov 23 09:15:09.205760 2021] [wsgi:error] rule = <Rule '/tasks' (OPTIONS, HEAD, GET) -> tasks>
[Tue Nov 23 09:15:09.206069 2021] [wsgi:error] req = <Request 'https://secmon.domain.com/tasks' [GET]>
[Tue Nov 23 09:15:09.206119 2021] [wsgi:error] self = <Flask 'secmon_web'>
[Tue Nov 23 09:15:09.206151 2021] [wsgi:error] File "/usr/local/lib/python3.6/site-packages/flask_simplelogin/init.py", line 117, in simple_decorator
[Tue Nov 23 09:15:09.206192 2021] [wsgi:error] return dispatch(function, args, **kwargs)
[Tue Nov 23 09:15:09.206235 2021] [wsgi:error] kwargs = {}
[Tue Nov 23 09:15:09.206271 2021] [wsgi:error] args = ()
[Tue Nov 23 09:15:09.206308 2021] [wsgi:error] function = <function tasks at 0x7f85f618e8c8>
[Tue Nov 23 09:15:09.206342 2021] [wsgi:error] dispatch = <function login_required..dispatch at 0x7f85f618e9d8>
[Tue Nov 23 09:15:09.206374 2021] [wsgi:error] File "/usr/local/lib/python3.6/site-packages/flask_simplelogin/init.py", line 98, in dispatch
[Tue Nov 23 09:15:09.206413 2021] [wsgi:error] return check(must) or fun(args, **kwargs)
[Tue Nov 23 09:15:09.206454 2021] [wsgi:error] kwargs = {}
[Tue Nov 23 09:15:09.206485 2021] [wsgi:error] args = ()
[Tue Nov 23 09:15:09.206518 2021] [wsgi:error] fun = <function tasks at 0x7f85f618e8c8>
[Tue Nov 23 09:15:09.206548 2021] [wsgi:error] username = None
[Tue Nov 23 09:15:09.206578 2021] [wsgi:error] must = None
[Tue Nov 23 09:15:09.206610 2021] [wsgi:error] dispatch_basic_auth = <function login_required..dispatch_basic_auth at 0x7f85f618ea60>
[Tue Nov 23 09:15:09.206643 2021] [wsgi:error] check = <function login_required..check at 0x7f85f618e950>
[Tue Nov 23 09:15:09.206695 2021] [wsgi:error] basic = False
[Tue Nov 23 09:15:09.206744 2021] [wsgi:error] File "/var/www/secmon/secmon_web.py", line 620, in tasks
[Tue Nov 23 09:15:09.206786 2021] [wsgi:error] tasks = getTasks()
[Tue Nov 23 09:15:09.206820 2021] [wsgi:error] File "/var/www/secmon/secmon_lib.py", line 285, in getTasks
[Tue Nov 23 09:15:09.206864 2021] [wsgi:error] formatted_date = datetime.fromisoformat(timestamp)
[Tue Nov 23 09:15:09.206948 2021] [wsgi:error] timestamp = '2021-11-23T09:11:49.582856'
[Tue Nov 23 09:15:09.206981 2021] [wsgi:error] line = '2021-11-23T09:11:49.582856 source_script="secmon_web" server="192.168.1.254" task_id="40956" task_status="loaded" message="Adding the following product : cpe:2.3:o:microsoft:windows_server_2012:-:::::::*...." \n'
[Tue Nov 23 09:15:09.207014 2021] [wsgi:error] tid = []
[Tue Nov 23 09:15:09.207047 2021] [wsgi:error] count = 0
[Tue Nov 23 09:15:09.207080 2021] [wsgi:error] logfile = '/var/www/secmon/logs.txt'
[Tue Nov 23 09:15:09.207110 2021] [wsgi:error] dir_path = '/var/www/secmon/'
[Tue Nov 23 09:15:09.207140 2021] [wsgi:error] script_path = '/var/www/secmon/secmon_lib.py'
[Tue Nov 23 09:15:09.207172 2021] [wsgi:error] builtins.AttributeError: type object 'datetime.datetime' has no attribute 'fromisoformat'
[Tue Nov 23 09:15:09.207205 2021] [wsgi:error] None
[Tue Nov 23 09:15:09.207228 2021] [wsgi:error] ################## PLEASE REPORT THIS ON GITHUB ##################
Thank you ! Raph.
log cve_updater.py
Updating high risk product list....
Traceback (most recent call last):
File "cve_updater.py", line 53, in
plist = getFormatedProductList()
File "/var/www/secmon/secmon_lib.py", line 860, in getFormatedProductList
pvendor = disassmbled_cpe[3].replace("_"," ").title()
IndexError: list index out of range
log apache
[wsgi:error]
################## NEW GUI ERROR AT 27/09/2021, 10:16:53 ##################
######## URL : http://secmon.local/by-product-vulns ##########
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "/usr/local/lib/python3.6/site-packages/flask_simplelogin/init.py", line 117, in simple_decorator
return dispatch(function, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/flask_simplelogin/init.py", line 98, in dispatch
return check(must) or fun(*args, **kwargs)
File "/var/www/secmon/secmon_web.py", line 602, in byProductVulns
plist = getFormatedProductList()
File "/var/www/secmon/secmon_lib.py", line 860, in getFormatedProductList
pvendor = disassmbled_cpe[3].replace("_"," ").title()
IndexError: list index out of range
None
################## PLEASE REPORT THIS ON GITHUB ##################
I am currently trying to install the application with Docker, but according to the revisions I am doing, the problem is shown at the time of authenticating with the SMTP service.
The SMTP I am using is my own server. And I already verified that this one is not having problems, as I was able to send mails correctly from another container on the same server
[Tue Jun 08 15:49:24.473654 2021] [wsgi:error] [pid 56526:tid 140361087670016] [remote internalIP:2472] ################## NEW GUI ERROR AT 08/06/2021, 15:49:24 ##################
[Tue Jun 08 15:49:24.473846 2021] [wsgi:error] [pid 56526:tid 140361087670016] [remote internalIP:2472] ######## URL : https://secmon.companyname.com/reports ##########
[Tue Jun 08 15:49:24.473990 2021] [wsgi:error] [pid 56526:tid 140361087670016] [remote internalIP:2472] Traceback (most recent call last):
[Tue Jun 08 15:49:24.474028 2021] [wsgi:error] [pid 56526:tid 140361087670016] [remote internalIP:2472] File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1950, in full_dispatch_request
[Tue Jun 08 15:49:24.474035 2021] [wsgi:error] [pid 56526:tid 140361087670016] [remote internalIP:2472] rv = self.dispatch_request()
[Tue Jun 08 15:49:24.474042 2021] [wsgi:error] [pid 56526:tid 140361087670016] [remote internalIP:2472] File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1936, in dispatch_request
[Tue Jun 08 15:49:24.474046 2021] [wsgi:error] [pid 56526:tid 140361087670016] [remote internalIP:2472] return self.view_functionsrule.endpoint
[Tue Jun 08 15:49:24.474053 2021] [wsgi:error] [pid 56526:tid 140361087670016] [remote internalIP:2472] File "/usr/local/lib/python3.8/dist-packages/flask_simplelogin/init.py", line 117, in simple_decorator
[Tue Jun 08 15:49:24.474056 2021] [wsgi:error] [pid 56526:tid 140361087670016] [remote internalIP:2472] return dispatch(function, *args, **kwargs)
[Tue Jun 08 15:49:24.474062 2021] [wsgi:error] [pid 56526:tid 140361087670016] [remote internalIP:2472] File "/usr/local/lib/python3.8/dist-packages/flask_simplelogin/init.py", line 98, in dispatch
[Tue Jun 08 15:49:24.474067 2021] [wsgi:error] [pid 56526:tid 140361087670016] [remote internalIP:2472] return check(must) or fun(*args, **kwargs)
[Tue Jun 08 15:49:24.474076 2021] [wsgi:error] [pid 56526:tid 140361087670016] [remote internalIP:2472] File "/var/www/secmon/secmon_web.py", line 541, in reports
[Tue Jun 08 15:49:24.474081 2021] [wsgi:error] [pid 56526:tid 140361087670016] [remote internalIP:2472] generateCveReport(datetime.strptime("01/01/2020", "%d/%m/%Y"),datetime.strptime("01/01/2020", "%d/%m/%Y"),isFull=True)
[Tue Jun 08 15:49:24.474091 2021] [wsgi:error] [pid 56526:tid 140361087670016] [remote internalIP:2472] File "/var/www/secmon/secmon_lib.py", line 149, in generateCveReport
[Tue Jun 08 15:49:24.474097 2021] [wsgi:error] [pid 56526:tid 140361087670016] [remote internalIP:2472] sheet["{}1".format(letter)].font = bold_font
[Tue Jun 08 15:49:24.474115 2021] [wsgi:error] [pid 56526:tid 140361087670016] [remote internalIP:2472] UnboundLocalError: local variable 'letter' referenced before assignment
[Tue Jun 08 15:49:24.474133 2021] [wsgi:error] [pid 56526:tid 140361087670016] [remote internalIP:2472] None
[Tue Jun 08 15:49:24.474143 2021] [wsgi:error] [pid 56526:tid 140361087670016] [remote internalIP:2472] ################## PLEASE REPORT THIS ON GITHUB ##################
Error: Json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Source: secmon_lib.py
Parametrs: nvd_query and other link with cves/1.0
Info source: https://nvd.nist.gov/general/news/change-timeline
Troubleshooting:
You have an outdated version of the API for connecting to NIST/CVE. It is necessary to update all links in the code from cves API/1.0 to API/2.0
Dans secmon_lib.py, lors de l'attribution des criticités aux CVE (ligne 196), la borne basse est exclue (dans le cas du "critique" : 9 < CVSS <= 10 et "haute" : 7 < CVSS <= 8.9). Donc dans les CVSS à 9 sont noté comme "N/A" en criticité et même chose pour les autres criticités.
When I try to open thr page task I get an error, in apache2 log there are:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python3/dist-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "/usr/local/lib/python3.9/dist-packages/flask_simplelogin/init.py", line 117, in simple_decorator
return dispatch(function, *args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/flask_simplelogin/init.py", line 98, in dispatch
return check(must) or fun(*args, **kwargs)
File "/var/www/secmon/secmon_web.py", line 615, in tasks
tasks = getTasks()
File "/var/www/secmon/secmon_lib.py", line 265, in getTasks
for line in reversed(list(open(logfile))):
File "/usr/lib/python3.9/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1638: ordinal not in range(128)
None
Any suggestion?
builtins.NameError: name 'password' is not defined
[Sun Jun 06 11:41:17.411550 2021] [wsgi:error] [pid 16043:tid 139847434086144] [remote 192.168.244.140:44610] ################## NEW GUI ERROR AT 06/06/2021, 11:41:17 ##################
[Sun Jun 06 11:41:17.411729 2021] [wsgi:error] [pid 16043:tid 139847434086144] [remote 192.168.244.140:44610] ######## URL : http://192.168.244.140/tasks ##########
[Sun Jun 06 11:41:17.415130 2021] [wsgi:error] [pid 16043:tid 139847434086144] [remote 192.168.244.140:44610] Traceback (most recent call last):
[Sun Jun 06 11:41:17.415169 2021] [wsgi:error] [pid 16043:tid 139847434086144] [remote 192.168.244.140:44610] File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1950, in full_dispatch_request
[Sun Jun 06 11:41:17.415174 2021] [wsgi:error] [pid 16043:tid 139847434086144] [remote 192.168.244.140:44610] rv = self.dispatch_request()
[Sun Jun 06 11:41:17.415180 2021] [wsgi:error] [pid 16043:tid 139847434086144] [remote 192.168.244.140:44610] File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1936, in dispatch_request
[Sun Jun 06 11:41:17.415184 2021] [wsgi:error] [pid 16043:tid 139847434086144] [remote 192.168.244.140:44610] return self.view_functionsrule.endpoint
[Sun Jun 06 11:41:17.415189 2021] [wsgi:error] [pid 16043:tid 139847434086144] [remote 192.168.244.140:44610] File "/usr/local/lib/python3.8/dist-packages/flask_simplelogin/init.py", line 117, in simple_decorator
[Sun Jun 06 11:41:17.415193 2021] [wsgi:error] [pid 16043:tid 139847434086144] [remote 192.168.244.140:44610] return dispatch(function, *args, **kwargs)
[Sun Jun 06 11:41:17.415198 2021] [wsgi:error] [pid 16043:tid 139847434086144] [remote 192.168.244.140:44610] File "/usr/local/lib/python3.8/dist-packages/flask_simplelogin/init.py", line 98, in dispatch
[Sun Jun 06 11:41:17.415201 2021] [wsgi:error] [pid 16043:tid 139847434086144] [remote 192.168.244.140:44610] return check(must) or fun(*args, **kwargs)
[Sun Jun 06 11:41:17.415207 2021] [wsgi:error] [pid 16043:tid 139847434086144] [remote 192.168.244.140:44610] File "/var/www/secmon/secmon_web.py", line 612, in tasks
[Sun Jun 06 11:41:17.415210 2021] [wsgi:error] [pid 16043:tid 139847434086144] [remote 192.168.244.140:44610] tasks = getTasks()
[Sun Jun 06 11:41:17.415215 2021] [wsgi:error] [pid 16043:tid 139847434086144] [remote 192.168.244.140:44610] File "/var/www/secmon/secmon_lib.py", line 262, in getTasks
[Sun Jun 06 11:41:17.415218 2021] [wsgi:error] [pid 16043:tid 139847434086144] [remote 192.168.244.140:44610] for line in reversed(list(open(logfile))):
[Sun Jun 06 11:41:17.415224 2021] [wsgi:error] [pid 16043:tid 139847434086144] [remote 192.168.244.140:44610] File "/usr/lib/python3.8/encodings/ascii.py", line 26, in decode
[Sun Jun 06 11:41:17.415227 2021] [wsgi:error] [pid 16043:tid 139847434086144] [remote 192.168.244.140:44610] return codecs.ascii_decode(input, self.errors)[0]
[Sun Jun 06 11:41:17.415239 2021] [wsgi:error] [pid 16043:tid 139847434086144] [remote 192.168.244.140:44610] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1312: ordinal not in range(128)
[Sun Jun 06 11:41:17.415253 2021] [wsgi:error] [pid 16043:tid 139847434086144] [remote 192.168.244.140:44610] None
[Sun Jun 06 11:41:17.415262 2021] [wsgi:error] [pid 16043:tid 139847434086144] [remote 192.168.244.140:44610] ################## PLEASE REPORT THIS ON GITHUB ##################
Error when install in docker:
################## PLEASE REPORT THIS ON GITHUB ##################
ERROR
################## NEW SCRIPT ERROR AT 16/06/2021, 21:28:07 ##################
Traceback (most recent call last):
File "/var/www/secmon/secmon_lib.py", line 631, in registerNewCve
cur.execute("INSERT INTO CVE_DATA (CVE_ID,KEYWORD,STATUS,CVE_SCORE,CVE_DATE,CVE_DESCRIPTION,CVE_EVAL,CVE_CPE,CVE_SOURCES,EXPLOIT_FIND,INDEXING_DATE) VALUES (?,?,?,?,?,?,?,?,?,?,?);", (cve_id,key_match,status,str(cve_score),cve_date,cve_description,cve_status,cve_cpe,cve_sources,"False",idx_date))
UnboundLocalError: local variable 'cve_status' referenced before assignment
None
While installing i got this below error in Ubuntu 20.04.2 LTS.
Traceback (most recent call last):
File "/var/www/secmon/secmon_lib.py", line 627, in registerNewCve
cur.execute("INSERT INTO CVE_DATA (CVE_ID,KEYWORD,STATUS,CVE_SCORE,CVE_DATE,CVE_DESCRIPTION,CVE_EVAL,CVE_CPE,CVE_SOURCES,EXPLOIT_FIND,INDEXING_DATE) VALUES (?,?,?,?,?,?,?,?,?,?,?);", (cve_id,key_match,status,str(cve_score),cve_date,cve_description,cve_status,cve_cpe,cve_sources,"False",idx_date))
UnboundLocalError: local variable 'cve_description' referenced before assignment
None
[Tue Jun 08 15:51:00.890407 2021] [wsgi:error] [pid 56526:tid 140361054099200] [remote internalIP:3598] ################## NEW GUI ERROR AT 08/06/2021, 15:51:00 ##################
[Tue Jun 08 15:51:00.890587 2021] [wsgi:error] [pid 56526:tid 140361054099200] [remote internalIP:3598] ######## URL : https://secmon.companyname.com/by-product-vulns ##########
[Tue Jun 08 15:51:00.891434 2021] [wsgi:error] [pid 56526:tid 140361054099200] [remote internalIP:3598] Traceback (most recent call last):
[Tue Jun 08 15:51:00.891479 2021] [wsgi:error] [pid 56526:tid 140361054099200] [remote internalIP:3598] File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1950, in full_dispatch_request
[Tue Jun 08 15:51:00.891484 2021] [wsgi:error] [pid 56526:tid 140361054099200] [remote internalIP:3598] rv = self.dispatch_request()
[Tue Jun 08 15:51:00.891493 2021] [wsgi:error] [pid 56526:tid 140361054099200] [remote internalIP:3598] File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1936, in dispatch_request
[Tue Jun 08 15:51:00.891497 2021] [wsgi:error] [pid 56526:tid 140361054099200] [remote internalIP:3598] return self.view_functionsrule.endpoint
[Tue Jun 08 15:51:00.891504 2021] [wsgi:error] [pid 56526:tid 140361054099200] [remote internalIP:3598] File "/usr/local/lib/python3.8/dist-packages/flask_simplelogin/init.py", line 117, in simple_decorator
[Tue Jun 08 15:51:00.891523 2021] [wsgi:error] [pid 56526:tid 140361054099200] [remote internalIP:3598] return dispatch(function, *args, **kwargs)
[Tue Jun 08 15:51:00.891532 2021] [wsgi:error] [pid 56526:tid 140361054099200] [remote internalIP:3598] File "/usr/local/lib/python3.8/dist-packages/flask_simplelogin/init.py", line 98, in dispatch
[Tue Jun 08 15:51:00.891537 2021] [wsgi:error] [pid 56526:tid 140361054099200] [remote internalIP:3598] return check(must) or fun(*args, **kwargs)
[Tue Jun 08 15:51:00.891547 2021] [wsgi:error] [pid 56526:tid 140361054099200] [remote internalIP:3598] File "/var/www/secmon/secmon_web.py", line 584, in byProductVulns
[Tue Jun 08 15:51:00.891551 2021] [wsgi:error] [pid 56526:tid 140361054099200] [remote internalIP:3598] product = request.form['product_selection']
[Tue Jun 08 15:51:00.891562 2021] [wsgi:error] [pid 56526:tid 140361054099200] [remote internalIP:3598] File "/usr/local/lib/python3.8/dist-packages/werkzeug/datastructures.py", line 442, in getitem
[Tue Jun 08 15:51:00.891567 2021] [wsgi:error] [pid 56526:tid 140361054099200] [remote internalIP:3598] raise exceptions.BadRequestKeyError(key)
[Tue Jun 08 15:51:00.891588 2021] [wsgi:error] [pid 56526:tid 140361054099200] [remote internalIP:3598] werkzeug.exceptions.BadRequestKeyError: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.
[Tue Jun 08 15:51:00.891605 2021] [wsgi:error] [pid 56526:tid 140361054099200] [remote internalIP:3598] None
[Tue Jun 08 15:51:00.891614 2021] [wsgi:error] [pid 56526:tid 140361054099200] [remote internalIP:3598] ################## PLEASE REPORT THIS ON GITHUB ##################
UnboundLocalError: local variable 'cve_description' referenced before assignment
None
################## PLEASE REPORT THIS ON GITHUB ##################
ERROR
################## NEW SCRIPT ERROR AT 06/06/2021, 14:08:40 ##################
Traceback (most recent call last):
File "/var/www/secmon/secmon_lib.py", line 627, in registerNewCve
cur.execute("INSERT INTO CVE_DATA (CVE_ID,KEYWORD,STATUS,CVE_SCORE,CVE_DATE,CVE_DESCRIPTION,CVE_EVAL,CVE_CPE,CVE_SOURCES,EXPLOIT_FIND,INDEXING_DATE) VALUES (?,?,?,?,?,?,?,?,?,?,?);", (cve_id,key_match,status,str(cve_score),cve_date,cve_description,cve_status,cve_cpe,cve_sources,"False",idx_date))
UnboundLocalError: local variable 'cve_description' referenced before assignment
None
################## PLEASE REPORT THIS ON GITHUB ##################
Successful build database.
root@secmon:/# python3 /var/www/secmon/secmon.py
Traceback (most recent call last):
File "/var/www/secmon/secmon.py", line 12, in
import cve_poller
File "/var/www/secmon/cve_poller.py", line 12, in
import base64, os, smtplib, re, requests, time, sqlite3, feedparser, colorama, warnings
File "/usr/local/lib/python3.9/dist-packages/feedparser.py", line 93, in
_base64decode = getattr(base64, 'decodebytes', base64.decodestring)
AttributeError: module 'base64' has no attribute 'decodestring'
Hi everyone.
When I want to see the exploits available in the module, the following error is generated:
################## PLEASE REPORT THIS ON GITHUB ##################
################## NEW GUI ERROR AT 15/09/2021, 22:33:50 ##################
######## URL : https://localhost/cve-exploits/img/logo.png ##########
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint
File "/var/www/secmon/secmon_web.py", line 732, in serveStaticResource
return send_from_directory('static/', resource)
File "/usr/local/lib/python3.9/dist-packages/flask/helpers.py", line 767, in send_from_directory
raise NotFound()
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.