Commit Graph

83884 Commits

Author SHA1 Message Date
Gerald Combs b9946577d6 Sysdig Bridge: Remove old code.
Remove commented & ifdef0'd code that loaded plugins directly. Destroy
our libsinsp instance on exit.
2022-03-22 17:51:32 +00:00
Gerald Combs 349c067414 Sysdig Bridge: Handle info and conversation fields.
Fix our field length display as well.
2022-03-22 17:51:32 +00:00
Gerald Combs bee0393a94 Sysdig Bridge: Switch to libsinsp/libscap.
Switch from loading the cloudtrail plugin directly to doing so
indirectly via libsinsp. This should let us start leveraging the rich
functionality offered by libsinsp.
2022-03-22 17:51:32 +00:00
Gerald Combs 9b106b500c Sysdig Bridge: Update the Sysdig Plugin fields.
Update the Sysdig Plugin fields to match falcosecurity/libs scap.c.
2022-03-22 17:51:32 +00:00
Gerald Combs 72b1e028a8 Sysdig Event: Find the sdplugin dissector once.
We only need to search for dissectors at startup while registering
handoffs.
2022-03-22 17:51:32 +00:00
Gerald Combs a075ce1be7 Sysdig bridge: Update a struct.
Update ss_plugin_extract_field to match

https://github.com/falcosecurity/plugin-sdk-go/blob/main/pkg/sdk/plugin_info.h
2022-03-22 17:51:32 +00:00
Gerald Combs 24aa07281a Sysdig bridge: Fix a couple of offsets.
It looks like the source ID and event data are 4 bytes further into each
block. Quick fix pending more details about the block format.
2022-03-22 17:51:32 +00:00
Gerald Combs 9a889e9546 Sysdig bridge: Set our plugin API version to 0.2.0. 2022-03-22 17:51:32 +00:00
Gerald Combs 70aed62c86 Sysdig bridge: Fix compilation.
Fix

logshark/plugins/epan/sysdig_bridge/packet-sysdig-bridge.c:86:39: error: this old-style function definition is not preceded by a prototype [-Werror,-Wstrict-prototypes]
register_conversation_filters_mappings()
                                      ^
1 error generated.
2022-03-22 17:51:32 +00:00
Mark Stemm 58e3976910 Use the plugin name as the protocol short name
Prior versions had a dedicated plugin API function for this, but we
removed it from the plugin API, so just use the plugin name.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2022-03-22 17:51:32 +00:00
Loris Degioanni 0555c413d1 Sysdig Bridge: Fix a memory allocation crash.
avoid moving plugin states around the address space by mallocing all of the memory at the beginning instead of using realloc every time a plugin is detected. This prevents crashes and other types of bad behavior that were caused by plugins accessing garbage memory.
2022-03-22 17:51:32 +00:00
Mark Stemm 39c8e1ac2c Use register_shutdown_routine, not cleanup_routine
register_cleanup_routine is called after reading a single capture
file. Since the async extraction is set up per plugin instead of
per-instance, we want register_shutdown_routine().

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2022-03-22 17:51:32 +00:00
Mark Stemm 5fdc4142b9 Update to use single extract_fields func
Update to reflect newest API changes (single extract_fields
func). This simplifies dissect_plg_bridge a bit, as the setup/calling
plugin function can mostly be unified based on the field type, with
just looking at the res_str/res_u64 part of the field struct
afterward.
2022-03-22 17:51:32 +00:00
Mark Stemm c34693bb20 Update to reflect latest plugins api changes
Although not used by wireshark directly, update
plugin_next/plugin_next_batch to note they return structs for events
instead of pointers + lens + timestamps.

Extract functions now use field names, so no need to extract or keep
track of field ids. The a "abbrev" property of header_field_info
contains the field name e.g. ct.xxx.
2022-03-22 17:51:32 +00:00
Mark Stemm 665a04e5e9 Update pluginevent to match falcosecurity/libs
It recently changed from 320 to 322, probably as a result of a rebase
to master, so reflect that change here.

It won't change once the plugin changes code is merged to master.
2022-03-22 17:51:32 +00:00
Loris Degioanni 8c3f436cc0 load the plugins from the wireshark directory 2022-03-22 17:51:32 +00:00
Loris Degioanni d226a7aa98 separate list of conversation filters for logshark
Conflicts:
	CMakeLists.txt
2022-03-22 17:51:32 +00:00
Loris Degioanni 2d6b0e8885 conversation-like filtering and coloring for sysdig plugins 2022-03-22 17:51:32 +00:00
Loris Degioanni de5f59d7a4 sysdig: initial implementation of sysdig plugins support
This commit introduces a new wireshark plugin which is able to act as proxy to sysdig plugins, loading them into Wireshark and transforming their output into dissectors that Wireshark can use to display the data.
2022-03-22 17:51:32 +00:00
Loris Degioanni 625a042ff8 initial skeleton for sysdig plugins experiments 2022-03-22 17:51:32 +00:00
Dario Lombardo a3877af990
debian: add missing symbol. 2022-03-22 17:14:38 +01:00
Joakim Karlsson 67a3256bcd rpcrdma: fix build issue [-Wmaybe-uninitialized] 2022-03-22 14:21:13 +00:00
Joakim Karlsson f07c30fffe CBOR: fix build issue [-Wmaybe-uninitialized] 2022-03-22 14:09:42 +00:00
Nardi Ivan 7c1dd842ff Diameter: improve IMEI/IMEISV dissection in User-Equipment-Info AVP
3GPP.User-Equipment-Info AVP should contain the IMEISV (if type is 0).
However some implementations put the IMEI there: decode it but display a
protocol error indication too.
2022-03-22 13:59:00 +00:00
João Valverde 16729be2c1 dfilter: Add bitwise masking of bits
Add support for masking of bits. Before the bitwise operator
could only test bits, it did not support clearing bits.

This allows testing if any combination of bits are set/unset
more naturally with a single test. Previously this was only
possible by combining several bitwise predicates.

Bitwise is implemented as a test node, even though it is not.
Maybe the test node should be renamed to something else.

Fixes #17246.
2022-03-22 12:58:04 +00:00
Jaap Keuter 3e3db6cd3e CFM: Unindent dissector code by restructuring loop conditions
Include missing default switches to handle incorrect protocol values.
2022-03-22 07:37:02 +00:00
Gerald Combs 1e39a66746 etwdump: Clarify "ETW".
Not everyone knows what ETW is.
2022-03-21 15:35:48 -07:00
João Valverde 631cf34f0c dfilter: Use a function pointer array to free registers 2022-03-21 18:43:36 +00:00
Constantine Gavrilov 89a39134ff NVMeOF TCP: fix storing of QID for TCP protocol -- fix missing commit. 2022-03-21 18:31:21 +00:00
João Valverde 6a0129a0e3 dfilter: Fix EditorConfig settings 2022-03-21 17:49:12 +00:00
João Valverde 54d8627c9a dfilter: Add more comments to optimization pass 2022-03-21 17:36:41 +00:00
João Valverde d60f2580ba dfilter: Pass around constants in instructions
The DFVM instructions arguments are generic boxed types but instead
of using FVALUE and PCRE types the code passes aroung REGISTER types
instead. Change that to pass constants in the instruction.
2022-03-21 17:09:56 +00:00
João Valverde 94d909103e dfilter: Remove DFVM constant initialization 2022-03-21 17:09:43 +00:00
João Valverde ae17e733ac dfilter: Use more DFVM values in gencode 2022-03-21 17:09:29 +00:00
João Valverde 769f1f10de dfilter: Add DFVM value constructor 2022-03-21 17:09:19 +00:00
Constantine Gavrilov 402bd8f28d NVMeOF TCP: fix storing of QID for TCP protocol. 2022-03-21 16:21:43 +02:00
João Valverde 1b574e7466 dfilter: Cleanup dfvm_apply() 2022-03-21 12:38:09 +00:00
João Valverde 22f3d87a8f dfilter: Use singly linked list for registers
Replace calls to list append with list prepend where applicable.
2022-03-21 11:47:19 +00:00
João Valverde ea949ef719 dfilter: Cleanup dfilter_dump() 2022-03-21 11:26:52 +00:00
Roland Knall 9253762305 Qt: Fix startCapture legacy call 2022-03-21 10:06:28 +00:00
Roland Knall 5212a757a4 Qt: Remove sparkline for extcap 2022-03-21 09:49:13 +00:00
Richard Sharpe e6487fcdf4 tools/radiotap-gen: Fix build issue on some versions of Ubuntu. 2022-03-20 17:38:40 +00:00
Gerald Combs 96f3b7065f CMake: Fix our dtds dependencies. 2022-03-20 17:21:19 +00:00
Gerald Combs c347b057a7 dumpcap: Count more block types as packets.
The Sysdig Event dissector handles BLOCK_TYPE_SYSDIG_EVENT_V2 and
BLOCK_TYPE_SYSDIG_EVENT_V2_LARGE blocks. Add them to dumpcap's packet
count so that we don't get a "No packets captured." error.
2022-03-20 17:04:58 +00:00
Gerald Combs 6a97b2095c [Automatic update for 2022-03-20]
Update manuf, services enterprise numbers, translations, and other items.
2022-03-20 16:41:14 +00:00
João Valverde 50f04cb9da dfilter: Remove dead code 2022-03-19 20:10:43 +00:00
Jorge Mora 984dc6de78 IWARP_DDP_RDMAP: display read request tags and offsets in hex 2022-03-19 19:38:26 +00:00
Jorge Mora 4a80186e2b RPCoRDMA: do not reassemble if there is only one fragment
Only reassemble if reply chunk size is non-zero to avoid reassembly
of a single fragment. The RPC-over-RDMA reply has no data when the
reply chunk size is non-zero but it needs to reassemble all
fragments (more_frags = FALSE) in this frame. On the other hand
when the reply chunk size is zero, the whole message is given in
this frame therefore there is no need to reassemble.
2022-03-18 21:22:11 +00:00
John Thacker 37a0054551 http: Pass data relative to the original offset to follow tap
dissect_http_message might get called with a nonzero offset into
the tvb if there are multiple messages/segments in a frame. Only
send data starting from that offset to the follow tap, instead of
starting at tvb offset 0. Fix #18006
2022-03-18 21:11:09 +00:00
Jaap Keuter 096bc367b6 Align plugin reg function search with epan reg function search 2022-03-18 21:01:40 +00:00