analyzing-network-traffic-for-incidents
Warn
Audited by Gen Agent Trust Hub on Jul 16, 2026
Risk Level: MEDIUMCOMMAND_EXECUTION
Full Analysis
- [COMMAND_EXECUTION]: The automation script
scripts/agent.pyutilizessubprocess.runwithshell=Trueto execute system-level commands liketsharkandsuricata. - The commands are constructed using f-string interpolation with variables such as
pcap_pathanddisplay_filteracross several functions:run_tshark,get_pcap_summary,detect_data_exfiltration,detect_ids_alerts, andextract_http_objects. - Since
pcap_pathis sourced directly from user-provided command-line arguments (sys.argv[1]), an attacker could provide a filename containing shell metacharacters (e.g.,; rm -rf /) to execute arbitrary commands with the privileges of the agent. - The
display_filterparameter inrun_tsharkis also interpolated into a shell string, which could be exploited if the agent accepts arbitrary filter strings from untrusted sources. - [DATA_EXFILTRATION]: The
extract_http_objectsfunction inscripts/agent.pyautomatically extracts files from PCAP data and saves them to a local directory (/tmp/http_objects). While intended for forensics, this mechanism could be used to move sensitive data from within network captures to more accessible or observable locations on the host system.
Audit Metadata