Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Feature Request: Utility to dump offline stenographer sensor data to pcap #204

Open
charlesfair opened this issue Feb 25, 2019 · 4 comments

Comments

@charlesfair
Copy link

It would be quite helpful to have a simple command-line utility that would dump a stenographer repository to pcap. This would really help with training and prototyping scenarios. This is a common used case with RockNSM. It is used in a training scenario, where it is used to monitor for a limited time, then later on all saved stenographer data needs to be shared out for further training.

@aeppert
Copy link
Collaborator

aeppert commented Mar 6, 2019

@charlesfair please look at the following script an see if it, at least in the interim, fits your needs:

https://github.com/aeppert/shell_scripts/blob/master/dump_steno.sh

@charlesfair
Copy link
Author

Thank you @aeppert for the script! That will be much easier than doing it by hand.

One issue with using stenoread for the extraction is how when it is highly optimized to extract small, concise PCAP exactions. When I use it to export a large amount of PCAP, it basically takes over all the cores on the system where it is running. For instance on my test system, which was a quad-core I7 that was hyperthreading with 16GB RAM, stenoread was using around 700% of the CPU percentage, on all cores. I tried to do a full 24 hour PCAP export so as to not fill up the hard drive, but the stenoread process would effectively keep the Stenographer sensor, and Bro, from reliability capturing data during the export.

Basically it is a really really bad idea to export a large amount of Stenographer data as PCAP on a system that is actively collecting network data.

@dcode was interested if the author of Stenographer could create a utility to simply export massive amounts of PCAP without hammering the system during the export

Reference: issue #162
@gconnell
"In general, Steno is optimized to store lots of packets and return a small, targeted set. Note that if you're returning any appreciable percentage of the packets you store, Steno is probably thrashing your disk VERY hard."

The "small utility" that @dcode is interested in would be optimized specifically to simply export a large set of all packets, between two date/time ranges or such that would not thrash your disk.

@MaxDiOrio
Copy link

This is exactly what I'm interested in now. With no ability to trim captures in steno, or to cut off elephant flows, data consumption is huge. I'd need 170TB of storage space to store 30 days worth of captures in our environment.

If we can take the oldest capture files and convert them into pcaps so we can run trimpcap on them and then store them off somewhere else, that would be huge.

@charlesfair
Copy link
Author

charlesfair commented Jul 25, 2020 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants