Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Only process PCAPs with httpreplay when tlsdump.log exists #2315

Merged

Conversation

josh-feather
Copy link
Contributor

@josh-feather josh-feather commented Sep 10, 2024

These changes prevent PCAPs from being processed by httpreplay (Pcap2 processing module) when there are no TLS keys available. This is because httpreplay processing is very time intensive due to its pure-python implementation.

Httpreplay's core use is to decrypt TLS traffic so it can be processed by Suricata. If there are no TLS keys available, there is no requirement to use it for processing.

For context, when CAPE attempted to process a ~250MB PCAP with httpreplay, it took ~960 seconds. Without httpreplay, it took ~16 seconds.

Related to #2314

These changes prevent PCAPs from being processed by httpreplay (Pcap2 processing module) when there are not TLS keys available. This is because httpreplay processing is very time intensive due to its pure-python implementation.

Httpreplay's core use is to decrypt TLS traffic so it can be processed by Suricata. If there are no TLS keys available, there is no requirement to use it for processing.

For context, when CAPE attempted to process a ~250MB PCAP with httpreplay, it took ~960 seconds. Without httpreplay, it took ~16 seconds.
@doomedraven doomedraven merged commit ebfefd9 into kevoreilly:master Sep 10, 2024
5 checks passed
gitworkflows pushed a commit to threatcode/CAPEv2 that referenced this pull request Sep 10, 2024
* Update callback.py

* Update callback.py

* Package summary/description in UI (kevoreilly#2313)

- Following on from kevoreilly#2220 now we display the package summary and description in the UI
- In views.py:
  - Added code to parse the python analysis package modules, pulling out summary and description
  - Updated `get_form_data()` to return list of dicts, not list of strings
  - When sorting the package names, no longer be case sensitive
- Updated the `submission/index.html` template to expect a dict per package
- Added some tests
- Tweak to `web/settings.py` so it can find the templates, even during test execution

* Update cape2.sh

* Add SslKeyLogFile aux module and PcapNg processing module (kevoreilly#2312)

* Add SslKeyLogFile aux module and PcapNg processing module
SslKeyLogFile sets the SSLKEYLOGFILE environment var on the guest and collects the resulting log file. This is especially useful when detonating inside of browsers.

PcapNg takes SSL/TLS keys from tlsdump.log and SslKeyLogFile and injects them into the detonation PCAP using the `editcap` binary. The file is made available to download via the UI.

* Update views.py

* style: Automatic code formatting

* Monitor update: Add capability to dynamically unhook previously hooked functions (unhook-apis option takes colon-separated list e.g. unhook-apis=NtSetInformationThread:NtDelayExecution)

* Themida detonation shim

* Update index.html

* Update submit.rst

* Only process PCAPs with httpreplay when tlsdump.log exists (kevoreilly#2315)

These changes prevent PCAPs from being processed by httpreplay (Pcap2 processing module) when there are not TLS keys available. This is because httpreplay processing is very time intensive due to its pure-python implementation.

Httpreplay's core use is to decrypt TLS traffic so it can be processed by Suricata. If there are no TLS keys available, there is no requirement to use it for processing.

For context, when CAPE attempted to process a ~250MB PCAP with httpreplay, it took ~960 seconds. Without httpreplay, it took ~16 seconds.

* style: Automatic code formatting

* Stealc detection: loosen yara pattern slightly

---------

Co-authored-by: doomedraven <[email protected]>
Co-authored-by: Robin Koumis (SecureWorks) <[email protected]>
Co-authored-by: Josh Feather <[email protected]>
Co-authored-by: GitHub Actions <[email protected]>
Co-authored-by: Kevin O'Reilly <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants