Skip to main content

File Extraction

Tracks how the Save Binaries app handles HTTP file transfers: files extracted or skipped, decompression, and bytes saved.

PropertyValue
GUID{282E13BE-9691-4B61-F0A3-21CB90792478}
LayerSystem
InputPackets
Key typeFixed event name, or file type
ImplementationLua — fe_counters.lua, fed by save_exe_streaming.lua (apps/analyzers/save_binaries)
Trisul Appsave_binaries (install from Trisul Apps)
Bucket / Topper30 s / 300 s
Enabled by defaultYes, once the app is installed

What it measures​

  • save_exe_streaming.lua checks each HTTP response. Responses with a javascript, html or css Content-Type are skipped. Others are reassembled.
  • On the first chunk of a file it runs libmagic on the payload. If the magic string matches the trigger regex (Windows/DOS executables, ELF, PDF, Flash, Office macros by default), the file is written to the output directory (default /tmp/savedfiles).
  • Requires File Extraction to be enabled in the probe config.

Keys​

Meter 0 and meter 1 use fixed event keys. Meter 2 uses the first two words of the libmagic description.

KeyMeterMeaning
Extracted0File matched the trigger regex and is being saved.
Skipped0File type did not match, not saved.
ContentTypeSkip0Response skipped because of its JavaScript/HTML/CSS Content-Type.
DecompressorStart0gzip response that is decompressed for inspection.
DecompressorSkip0gzip response skipped by Content-Type, decompression avoided.
LibmagicError0libmagic failed on the first chunk.
ExtractedBW1Bytes written for saved files.
PE32 executable2A saved file of this type (first two words of the magic string).
PDF document2A saved PDF.

Special keys​

KeyMeaning
SYS:GROUP_TOTALSSum of every update made to this group in the interval. Meter 0 adds events of all kinds together, so it is not a file count.

Meter list​

IDNameTypeUnitsTopBottomDescription
0hitsVT_COUNTERHits100Meter name Hits. +1 per event, keyed by event name.
1bytesVT_RATE_COUNTERBps100Meter name Throughput. Bytes of saved file chunks, key ExtractedBW.
2hitsVT_COUNTERHits100Meter name TypeHits. +1 per extracted file, keyed by file type.
3bytesVT_RATE_COUNTERBps100Meter name TypeThroughput. Not populated by the current code.
4Unused Cardinality counterVT_GAUGEUniques2020Reserved cardinality slot. Not populated.
5Unused Cardinality counterVT_GAUGEUniques2020Reserved cardinality slot. Not populated.