Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 12 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
output_*.xml
*.pyc
_log/*.log
*.db
*.cer
*.key
*.crt
*.ioc
*.ioc-select
ioc/
yara/
certs/
# general things to ignore
build/
dist/
*.egg-info/
*.egg
*.py[cod]
__pycache__/
*.so
*~

# VirtualEnv
bin/
include/
lib/
local/
pip-selfcheck.json
share/
Scripts/
Tcl/
src/
# due to using tox and pytest
.tox
.cache
6 changes: 6 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
include certitude/README.md
include certitude/LICENSE
include certitude/_log/*
include certitude/ssl/*
include certitude/utils/*
recursive-include certitude/components/ *.*
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions certitude/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
import os
sys.path.append(os.path.dirname(__file__))

import main
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file added certitude/_log/db.log
Empty file.
Empty file added certitude/_log/hashscanners.log
Empty file.
Empty file added certitude/_log/iocscanners.log
Empty file.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ def genCSRFToken():


CSRF_TOKEN_INDEX = '_csrft'
STATIC_ENDPOINT = 'static'

STATIC_ENDPOINT = os.path.join(os.path.dirname(__file__), 'static')
TEMPLATES_FOLDER = os.path.join(os.path.dirname(__file__), 'templates')

def getCSRFToken():
if not CSRF_TOKEN_INDEX in session:
Expand All @@ -96,7 +96,7 @@ def getCSRFToken():

''' APPLICATION CONFIGURATION '''

app = Flask(__name__, static_folder=STATIC_ENDPOINT)
app = Flask(__name__, static_folder=STATIC_ENDPOINT, template_folder=TEMPLATES_FOLDER)
app.secret_key = os.urandom(24)

app.jinja_env.globals['csrf_token'] = getCSRFToken
Expand Down Expand Up @@ -136,13 +136,14 @@ def decorated(*args, **kwargs):
# Preventing Flask from running Bokeh twice
# source : https://stackoverflow.com/questions/9449101/how-to-stop-flask-from-initialising-twice-in-debug-mode
if not DEBUG or os.environ.get('WERKZEUG_RUN_MAIN') == 'true':
bokeh_process = subprocess.Popen([
cmd = [
'bokeh',
'serve', 'crossbokeh.py',
'serve', "%s" % os.path.abspath(os.path.join(__file__, '../../../crossbokeh.py')),
'--address', BOKEH_LISTEN_ADDRESS,
'--port', str(BOKEH_LISTEN_PORT),
'--allow-websocket-origin', '%s:%d' % (BOKEH_LISTEN_ADDRESS, BOKEH_LISTEN_PORT),
], stdout=subprocess.PIPE)
]
bokeh_process = subprocess.Popen(cmd, stdout=subprocess.PIPE)

@atexit.register
def kill_server():
Expand Down
File renamed without changes.
Binary file not shown.
Empty file.
File renamed without changes.
6 changes: 3 additions & 3 deletions config.py → certitude/config.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@

# SSL configuration
USE_SSL = False
SSL_KEY_FILE = os.path.join('ssl','server.pem.key')
SSL_CERT_FILE = os.path.join('ssl','server.pem.cer')
SSL_KEY_FILE = os.path.join(os.path.dirname(__file__), 'ssl', 'server.pem.key')
SSL_CERT_FILE = os.path.join(os.path.dirname(__file__), 'ssl', 'server.pem.cer')


INTERFACE_HASH_SALT = '' # nocommit
SLEEP = 5 # second interval between database poll
MIN_SUBMIT_INTERVAL = 300 # min second interval between two submissions of same IP address
MIN_RESCAN_INTERVAL = 300 # min second interval between two consecutive scans on same IP address
CERTITUDE_DATABASE = "sqlite:///data.db"
CERTITUDE_DATABASE = "sqlite:///%s" % os.path.join(os.path.dirname(__file__), 'data.db')

# IOC Scanner
# ===========
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
0 main.py → certitude/main.py
100755 → 100644
File renamed without changes.
File renamed without changes.
Empty file added certitude/ssl/.empty
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file removed components/scanner/resources/localanalysis/pcre.so
Binary file not shown.
Binary file not shown.
Binary file removed components/scanner/resources/sql/pcre.so
Binary file not shown.
Binary file removed components/scanner/resources/sql/strings.so
Binary file not shown.
42 changes: 42 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from setuptools import setup, find_packages

setup(name='certitude',
version='1.0',
description='The Seeker of IOC',
long_description=open('certitude/README.md').read(),
url='https://github.com/CERT-W/certitude',
author='CERT-W',
author_email='[email protected]',
license='GPL',
classifiers=[
'Topic :: Security',
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Information Technology',
'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)',
],
keywords='cert-w certitude scan ioc seeker',
packages=find_packages(),
python_requires='<3',
install_requires=['plyara',
'bokeh',
'dnspython',
'flask',
'flask-login',
'impacket',
'lxml',
'netaddr',
'pandas',
'pbkdf2',
'ply',
'pyasn1',
'pycryptodome',
'pyopenssl',
'sqlalchemy'],
dependency_links=['git+https://github.com/8u1a/plyara.git#egg=plyara'],
entry_points = {
'console_scripts': ['certitude=certitude.main:main'],
},
include_package_data=True)