Giter Club home page Giter Club logo

estreamer's Introduction

eStreamer

SourceFire eStreamer python client library

Usage

See the examples/ directory for an example client

You need the following:

  • Configure SourceFire for the client authentication using this guide
    • You will need the cert and private key for the client
  • Get the SourceFire server certificate (for TLS verification)

eStreamer has two types of streams: Event Stream Requests and Extended Requests. You can use either or both types of streams.

Click here for more information on Stream Requests

Note

To use the extended requests you must set bit 30 (extended_request=1) in the flags

Event Stream Request Flags

You must set bits in here to use either or both stream requests (Requests vs Extended Requests)

The following are valid stream request flags:

  • packets
  • metadata
  • ids
  • discovery
  • correlation
  • impact
  • ids_1
  • discovery_v2
  • connection
  • correlation_v2
  • discovery_v3
  • disable_events
  • connection_v3
  • correlation_v3
  • metadata_v2
  • metadata_v3
  • reserved
  • discovery_v4
  • connection_v4
  • correlation_v4
  • metadata_v4
  • user
  • correlation_v5
  • timestamp
  • discovery_v5
  • discovery_v6
  • connection_v5
  • extra_data
  • discovery_v7
  • correlation_v6
  • extended_request

Extended Requests

Note

TO use extended requests you must set the extended_request bit in the event stream request flags

The following are valid extended requests:

  • INTRUSION_EVENTS
  • METADATA
  • CORRELATION
  • DISCOVERY
  • CONNECTION
  • USER
  • MALWARE
  • FILE
  • IMPACT
  • TERMINATE (this is to end a session, so shouldn't be used as a request)

The stream flags need to be a list of 'extended request event flags', and the stream request must be a dictionary of flags that have a key of the stream name and a value of 1 or 0 (1=on, 0=off)

Example Config file:

[settings]
event_types=INTRUSION_EVENTS, MALWARE, USER, FILE, IMPACT
[flags]
packets=1
metadata=0
ids=0
discovery=0
correlation=0
impact=0
ids_1=0
discovery_v2=0
connection=0
correlation_v2=0
discovery_v3=0
disable_events=0
connection_v3=0
correlation_v3=0
metadata_v2=0
metadata_v3=0
reserved=0
discovery_v4=0
connection_v4=0
correlation_v4=0
metadata_v4=0
user=0
correlation_v5=0
timestamp=1
discovery_v5=0
discovery_v6=0
connection_v5=0
extra_data=0
discovery_v7=0
correlation_v6=0
extended_request=1

Example code to read a config file

cfg = ConfigParser.ConfigParser()
cfg.read('estreamer.config')
STREAM_FLAGS = [x.lstrip(' ') for x in cfg.get('settings', 'event_types').split(',')]
REQUEST_FLAGS = { k: v for k, v in cfg.items('flags') }

Plugins

The plugin system uses an autoload and auto-unload mechanism in order to add or remove plugins without needing to restart. Simply drop a plugin into the plugins/ directory and it will pick it up and register (and use it). Conversely, remove the plugin from the directory and it will unregister the plugin (and not use it)

To create plugins, you will need to inherit the Plugin class. In addition, you will need to create a class variable (dictionary) named __info__ that contains:

  • description: description of the plugin
  • author: name of the author (and optionally contact, etc.)
  • version: version of the plugin
  • callback: the string name of the callback method (the function to be called in your plugin to do its thing)

The callback function will receive each record (alert that is processed)

Example:

from estreamer import plugin

class YourPlugin(plugin.Plugin):
    __info__ = {
        'description': 'my plugin',
        'author'     : 'my name',
        'version'    : '0.1',
        'callback'   : 'my_function',
    }

    def my_function(self, record):
        print(record)

estreamer's People

Contributors

spohara79 avatar teepaps avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

estreamer's Issues

Connection failed : SSL verify callback

Hi
I try to connect your example code with estreamer, but I've an issue with SSL connection :

+---------------+-----------+-------------------+----------------+
| name          | version   | author            | description    |
+---------------+-----------+-------------------+----------------+
| MSSQLPlugin   | 0.1       | Ted Papaioannou   | MSSQL writer   |
| PcapPlugin    | 0.1       | Sean O'Hara       | pcap writer    |
+---------------+-----------+-------------------+----------------+

Traceback (most recent call last):
  File "client.py", line 79, in <module>
    sys.exit(main())
  File "client.py", line 49, in main
    basedir + "client.crt", basedir + "priv.key") as ec:
  File "/home/ofrancai/dev/estreamer/local/lib/python2.7/site-packages/estreamer-0.1.1-py2.7.egg/estreamer/streamer.py", line 55, in __enter__
    self.ctx.set_verify(SSL.VERIFY_PEER, self.verify)
  File "/home/ofrancai/dev/estreamer/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 969, in set_verify
    raise TypeError("callback must be callable")
TypeError: callback must be callable

From the documentation of PyOpenSSL set_verify want a callback in second parameter and not a pem file path.

I'm doing something obviously wrong ?

Endianess flip on EventData parse for uint8[16]

It seems that the endianess of struct fields with type uint8[16] get their endian flipped when they are parsed.

For example, initiator_ip is of that type. When I manually check the buffer, I get:
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xac\x10\x0a\xca
Which is an IP address in the form: ::ffff:172.16.10.202

But the value in the parsed event data field is an integer with this hex representation:
\xca\x0a\x10\xac\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00

For other types, like uint32, this problem does not occur.

Add an explanation on how to get the estreamer.cer file

After a few hours I finally found out that the following command needs to be executed in order to get the estreamer.cer file:

openssl s_client -showcerts -connect <host ip>:8302 > estreamer.cer

Maybe nice to add this to the README file!

Doesn't work in CentOS7, works on Windows 10?

I am running the example code in both CentOS7 and Windows 10. It works in Windows 10, but gives this error in CentOS7:

Traceback (most recent call last):
File "/home/fsodev/PycharmProjects/estreamer/init.py", line 131, in main
print result
File "/home/fsodev/PycharmProjects/estreamer/venv/lib/python2.7/site-packages/estreamer/streamer.py", line 64, in exit
self.close()
File "/home/fsodev/PycharmProjects/estreamer/venv/lib/python2.7/site-packages/estreamer/streamer.py", line 75, in close
self.sock.shutdown()
File "/home/fsodev/PycharmProjects/estreamer/venv/lib/python2.7/site-packages/OpenSSL/SSL.py", line 2001, in shutdown
self._raise_ssl_error(self._ssl, result)
File "/home/fsodev/PycharmProjects/estreamer/venv/lib/python2.7/site-packages/OpenSSL/SSL.py", line 1647, in _raise_ssl_error
_raise_current_error()
File "/home/fsodev/PycharmProjects/estreamer/venv/lib/python2.7/site-packages/OpenSSL/_util.py", line 54, in exception_from_error_queue
raise exception_type(errors)
Error: [('SSL routines', 'SSL_shutdown', 'shutdown while in init')]

This on it's face seems like a Cert issue, but upon running this code in CentOS7 and Windows 10:

try:
    with streamer.eStreamerConnection(hostname, 8302, basedir + 'cacerts.cer',
                         basedir + "clientcert.cer", basedir + "clientcert.key") as ec:
        re = eventrequest.RequestEvent(getLastStamp() if getLastStamp() else 1, **REQUEST_FLAGS)
        resp = ec.request(re.record)
        if config.test_bit(re.flags.from_bytes, 30):
            ser = eventrequest.StreamEventRequest(STREAM_FLAGS)
            resp = ec.request(ser.record)
        print resp
except:
    print traceback.format_exc()
    sys.exit()

it successful in Windows 10 but gives this error in CentOS7:

Traceback (most recent call last):
File "/home/fsodev/PycharmProjects/estreamer/init.py", line 44, in main
re = eventrequest.RequestEvent(5, **REQUEST_FLAGS)
File "/home/fsodev/PycharmProjects/estreamer/venv/lib/python2.7/site-packages/estreamer/eventrequest.py", line 143, in init
self.message_header = MessageHeader(type=2, data=self.event_request.pack())
File "/home/fsodev/PycharmProjects/estreamer/venv/lib/python2.7/site-packages/estreamer/base.py", line 236, in pack
return str(self)
File "/home/fsodev/PycharmProjects/estreamer/venv/lib/python2.7/site-packages/estreamer/base.py", line 240, in str
return str(self.pack()) + str(self.data) if hasattr(self, 'data') and len(self.data) else str(self.pack())
File "/home/fsodev/PycharmProjects/estreamer/venv/lib/python2.7/site-packages/estreamer/base.py", line 231, in pack
return struct.pack(fmt, *value_list)
TypeError: Struct() argument 1 must be string, not unicode

Not sure why fmt is coming out as unicode, or why that is even a problem, but forcing it to ascii doesn't seem to work.

Non-ARCHIVAL_RCD_TYPE events have 'reserved' and 'timestamp' fields

It seems that all EventData records parsed after the first ARCHIVAL_RCD_TYPE have 'reserved' and 'timestamp' fields, even though they should not, and thus don't get parsed properly.

I modified it to remove the 'reserved' and 'timestamp' fields, however it causes the Message Header to no longer have a timestamp, which client.py tries to access and fails.
I created a pull request here for the code (#6), but it doesn't work properly.

My way was not correct, trying to find a way to fix this.

Connection data does not get parsed

When I set the client up to get connection events, it doesn't seem to parse the data properly.
The estreamer.config file is configured like so:

[settings]
event_types=CONNECTION
[flags]
connection=1
extended_request=1

I also tried connection_v5=1 because I wasn't sure which one to use

When a Connection event comes in (type 70) I get a MessageHeader that look like this:

<MessageHeader(ver=1, type=4002, length=586, data=<MessageBundle(conn_id=1480621563, seq_num=1, data=[<EventData(type=71, length=554, data=bytearray(b
'X/PW\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\xeb\x00\x00\x00\x01\
x934/X\xad\x8d\xf6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9b\x00\x00\x01\xf2\x00\x00\x00\x05@\xae\xcd\xac\x9
a\xc8\x11\xe6\xa6\xa3\xaf\xeay\x96i"H\xea\x90F\x9a\xc8\x11\xe6\xa6\xa3\xaf\xeay\x96i"$\xc4\xec\x00\x8f\xb2\x11\xe6\xaf\x05\xf8\x03\xf9)\xde\xd9\x19p`\
xbe\x8f\xb2\x11\xe6\xaeK\xe3\xa7\x1b\t\x9b$\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xac\x14\xd2\xe6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf
f\xff\xc0\xa8\xd3\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00X/47\x10\x00\x08\x06\x00\x02\x00\x00\xe9\x90\x00\xa1\x00\x00\x11\x00\x00\x00\x00\
x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01~\xdbX/PV\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00V\x00\x00\x00\x00\x00\x00\x00\x00\x00\x98\x96\x7f\x00\x00\x03E\x00\x00\x00\x00\x00\x00\x00\x00w5\x97E\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\
x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb5c\xe6\x0b\xb9\xb1<q\x
c1\xc9W\xb3\xc6!\xaf8'))>])>)>

As opposed to say a Packet MessageHeader:

<MessageHeader(ver=1, type=4002, length=1494, data=<MessageBundle(conn_id=1480622076, seq_num=1, data=[<EventData(type=2, length=1462, timestamp=14794
95767, reserved=0, data=<Packet(device_id=1, event_id=131940, event_second=1479495766, packet_second=1479495766, packet_microsecond=550334, link_type=
1, length=1434, data=bytearray(b"\x00b\xec\x15\xfe$\x00$P\x1c\xf8\x00\x08\x00E\x00\x05\x8c;.@\x00\x7f\x06j\xae\xac\x10\x1akJ\xd9?;\xf8\'\x00P:\x07\x1b
>\xcd\xa9\x1f\xecP\x10\x01\x02\xd2\x12\x00\x00GET /pixel;r=1853297836;a=p-49lspY_sxMAyQ;fpan=0;fpa=P0-1033023347-1479493051336;ns=0;ce=1;cm=;je=0;sr=1
920x1080x24;enc=n;dst=1;et=1479495766516;tzo=300;ref=http%3A%2F%2Fabovethelaw.com%2F2016%2F11%2FXXXXn%2F%3Frf%3D1;url=http%3A%2F%2Fabovethelaw.com%2F2016%2F11%2FXXXX%2F%3Frf%3D1;ogl=site_name.Above%20the%20Law%2Clocale.en_US%2Cdescription.This%20is%20absolutely%20horrifying%252E%2Ctitle.The%20P
ink%20xxx%3A%20Reports%20Of%vvv%vvv%vvv%20In%vvv%vvv%vvv%vvv%20T%2Curl.http%3A%2F%vvv%252Ecom%2F2016%2F
11%2Fvvvvvvvvv%2Ctype.article%2Cimage.http%3A%2F%vvvvvv%aaaaaa%2Fwp-content%2Fuploads%2F2016%2F11%2FTr
ump-Grimace%252Ejpg HTTP/1.1\r\nHost: pixel.quantserve.com\r\nConnection: keep-alive\r\nUser-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebK
it/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36\r\nAccept: image/webp,image/*,*/*;q=0.8\r\nReferer: http://abovethelaw.com/2016/11/websiteurlasdfasd/?rf=1\r\nAccept-Encoding: gzip, deflate, sdch\r\nAccept-Language: en-U
S,en;q=0.8\r\nCookie: mc=57fbbc01-b3b24-ab148-05083; d=ELcB7QEBvhaB8Qgt-T0cLhvvg1qLIezUfIxMH"))>)>])>)>

I saw that eventdata.py did not have a class for the record type 71, which is "Connection Statatistics"
Cisco defines this type as so: Connection Statistics Data Block 5.4+

So I added the following to eventdata.py:

RCD_TYPE_Connection=71
class Connection(Struct):

    _fields_ = [
        ('block_type', 'uint32', 155),
        ('block_length', 'uint32', 0),
        ('device_id', 'uint32', 0),
        ('ingres_zone', 'uint8[16]', 0),
        ('egress_zone', 'uint8[16]', 0),
        ('ingress_interface', 'uint8[16]', 0),
        ('egress_interface', 'uint8[16]', 0),
        ('initiator_ip', 'uint8[16]', 0),
        ('responder_ip', 'uint8[16]', 0),
        ('policy_revision', 'uint8[16]', 0),
        ('rule_id', 'uint32', 0),
        ('rule_action', 'uint16', 0),
        ('rule_reason', 'uint16', 0),
        ('initiator_port', 'uint16', 0),
        ('responder_port', 'uint16', 0),
        ('tcp_flags', 'uint16', 0),
        ('protocol', 'uint8', 0),
        ('netflow_source', 'uint8[16]', 0),
        ('instance_id', 'uint16', 0),
        ('conn_counter', 'uint16', 0),
        ('first_pkt_time', 'uint32', 0),
        ('last_pkt_time', 'uint32', 0),
        ('initiator_tx_pkts', 'uint8[8]', 0),
        ('resp_tx_pkts', 'uint8[8]', 0),
        ('initiator_tx_bytes', 'uint8[8]', 0),
        ('resp_tx_bytes', 'uint8[8]', 0),
        ('user_id', 'uint32', 0),
        ('app_prot_id', 'uint32', 0),
        ('url_category', 'uint32', 0),
        ('url_reputation', 'uint32', 0),
        ('client_app_id', 'uint32', 0),
        ('web_app_id', 'uint32', 0),
        ('client_url', StringDataBlock, 0),
        ('netbios_name', StringDataBlock, 0),
        ('client_app_version', StringDataBlock, 0),
        ('monitor_rule_1', 'uint32', 0),
        ('monitor_rule_2', 'uint32', 0),
        ('monitor_rule_3', 'uint32', 0),
        ('monitor_rule_4', 'uint32', 0),
        ('monitor_rule_5', 'uint32', 0),
        ('monitor_rule_6', 'uint32', 0),
        ('monitor_rule_7', 'uint32', 0),
        ('monitor_rule_8', 'uint32', 0),
        ('sec_int_src_dst', 'uint8', 0),
        ('sec_int_layer', 'uint8', 0),
        ('file_event_count', 'uint16', 0),
        ('intrusion_event_count', 'uint16', 0),
        ('initiator_country', 'uint16', 0),
        ('resp_country', 'uint16', 0),
        ('ioc_num', 'uint16', 0),
        ('src_autonomous_sys', 'uint32', 0),
        ('dst_autonomous_sys', 'uint32', 0),
        ('snmp_in', 'uint16', 0),
        ('snmp_out', 'uint16', 0),
        ('src_tos', 'uint8', 0),
        ('dst_tos', 'uint8', 0),
        ('src_mask', 'uint8', 0),
        ('dst_mask', 'uint8', 0),
        ('sec_ctxt', 'uint8[16]', 0),
        ('vlan_id', 'uint16', 0),
        ('referenced_host', StringDataBlock, 0),
        ('user_agent', StringDataBlock, 0),
        ('http_referrer', StringDataBlock, 0),
        ('ssl_cert_fingerprint', 'uint8[16]', 0),
        ('ssl_pol_id', 'uint8[16]', 0),
        ('ssl_rule_id', 'uint32', 0),
        ('ssl_ciph_suite', 'uint16', 0),
        ('ssl_version', 'uint8', 0),
        ('ssl_srv_cert_stat', 'uint8', 0),
        ('ssl_srv_cert_stat', 'uint16', 0),
        ('ssl_actual_action', 'uint16', 0),
        ('ssl_flow_status', 'uint16', 0),
        ('ssl_flow_error', 'uint16', 0),
        ('ssl_flow_msgs', 'uint16', 0),
        ('ssl_flow_flags', 'uint32', 0),
        ('ssl_srv_name', StringDataBlock, 0),
        ('ssl_url_category', 'uint32', 0),
        ('ssl_session_id', 'uint8[32]', 0),
        ('ssl_session_id_len', 'uint8', 0),
        ('ssl_ticket_id', 'uint8[20]', 0),
        ('ssl_ticket_id_len', 'uint8', 0),
        ('net_analysis_policy_revision', 'uint8[16]', 0),
    ]

And I also added RCD_TYPE_Connection=71 to config.py

However, the data still shows as a byte array as shown above. Am I missing something?

OpenSSL.SSL.Error: []

I cloned the repo and installed dependancies. I'm using python 2.7. In client.py in the examples folder I set the following settings:

    with streamer.eStreamerConnection(
            host='https://my.firepower.url.com',
            port=8302,
            verify=basedir + 'estreamer.cer',
            cert_path=basedir + "firepower.crt",
            pkey_path=basedir + "firepower.pem",
            pkey_passphrase='passwordhere'
    ) as ec:

where estreamer.cer is a .pkcs12 file that the admin gui gave me.

firepower.crt is the output from running:

openssl pkcs12 -in estreamer.cer -clcerts -nokeys -out firepower.crt

firepower.pem is the output from running:

openssl pkcs12 -in estreamer.cer -nocerts -out firepower.pem

When I run python client.py I get the below outut/error:

+--------------+-----------+---------------+---------------+
| name         | version   | author        | description   |
+--------------+-----------+---------------+---------------+
| PcapPlugin   | 0.1       | Sean O'Hara   | pcap writer   |
+--------------+-----------+---------------+---------------+

Traceback (most recent call last):
  File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1580, in <module>
    globals = debugger.run(setup['file'], None, None, is_module)
  File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 964, in run
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "/some/path/here/estreamer/examples/client.py", line 85, in <module>
    sys.exit(main())
  File "/some/path/here/estreamer/examples/client.py", line 54, in main
    pkey_passphrase='passwordhere'
  File "/another/path/here/lib/python2.7/site-packages/estreamer/streamer.py", line 57, in __enter__
    self.ctx.load_verify_locations(self.verify)
  File "/another/path/here/lib/python2.7/site-packages/OpenSSL/SSL.py", line 525, in load_verify_locations
    _raise_current_error()
  File "/another/path/here/lib/python2.7/site-packages/OpenSSL/_util.py", line 48, in exception_from_error_queue
    raise exception_type(errors)
OpenSSL.SSL.Error: []

Any idea what I'm doing wrong?

'Error' object has no attribute 'timestamp'

I am attempting to use this application as a stepping stone to collect connection events. When I run the cilent.py script I get the error message below. Any help would be greatly appreciated.

Error Message

Traceback (most recent call last):
  File "./client.py", line 79, in <module>
    sys.exit(main())
  File "./client.py", line 73, in main
    setLastStamp(mh.data.timestamp)
AttributeError: 'Error' object has no attribute 'timestamp'

estreamer.config

event_types=INTRUSION_EVENTS, MALWARE, USER, FILE, IMPACT, CONNECTION
[flags]
packets=1
metadata=1
ids=0
discovery=0
correlation=0
impact=0
ids_1=0
discovery_v2=0
connection=1
correlation_v2=0
discovery_v3=0
disable_events=0
connection_v3=1
correlation_v3=0
metadata_v2=0
metadata_v3=0
reserved=0
discovery_v4=0
connection_v4=0
correlation_v4=0
metadata_v4=0
user=0
correlation_v5=0
timestamp=1
discovery_v5=0
discovery_v6=0
connection_v5=0
extra_data=1
discovery_v7=0
correlation_v6=0
extended_request=1

Unable to connect to client - SSL Error

I've been banging my head at this for a while and just wanted to see if you have any advice. My server has a self-signed certificate.

Here is the error that I was able to get after modifying the code to print this:

Traceback (most recent call last):
  File "client.py", line 79, in <module>
    sys.exit(main())
  File "client.py", line 53, in main
    resp = ec.request(re.record)
  File "/root/estreamer-client/estreamer_ted/streamer.py", line 90, in request
    raise exc
OpenSSL.SSL.Error: [('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')]

I followed the instructions to generate a certificate and private key and download the Sourcefire server certificate for server verification. I changed what needed to be in the client.py file:

    with streamer.eStreamerConnection('CHANGE_ME.SOURCEFIRE.DOMAIN', 8302, basedir + 'estreamer.cer',
                             basedir + "firepower.crt", basedir + "firepower.pem") as ec:

Just to get this straight, this would be the mapping:
estreamer.cer - TLS server certificate
Which I downloaded using openssl

I can't figure out why.

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.