aboutsummaryrefslogtreecommitdiffstats
path: root/extcap
AgeCommit message (Collapse)AuthorFilesLines
2024-02-25Fix lots of spellingsMartin Mathieson1-2/+2
2024-02-23falcodump: add missing AWS regionsUli Heilmeier1-0/+2
2024-01-30CMake: Fix our falcodump symlinkGerald Combs1-19/+42
2024-01-31Falco bridge+falcodump: Various fixesGerald Combs1-7/+2
Fix building with Visual C++ and recent versions of falco-libs.
2024-01-19extcap: Set matching libssh log levelJohn Thacker7-15/+62
Instead of always setting the libssh log level to SSH_LOG_INFO when an extcap has a ws log level of LOG_LEVEL_DEBUG or lower, set the libssh log level to a corresponding log level (NOISY/TRACE, DEBUG/DEBUG, INFO/INFO, MESSAGE and above/WARN). Format the libssh logging messages more similar to our normal logging messages, with a libssh domain and using the libssh priority. Prior to 0.11.0 (that is, this commit: https://gitlab.com/libssh/libssh-mirror/-/commit/657d9143d121dfff74f5a63f734d0096c7f37194 ) libssh sends some merely informational messages at their WARN level, so lower that down to INFO, which isn't printed by default and doesn't get printed in the GUI. Related to #17888
2024-01-19extcap: Provide a more useful error message when key passphrase is badJohn Thacker1-2/+19
ssh_pki_import_privkey_file can return SSH_OK ("import good, go ahead and try to connect") or two types of errors, SSH_EOF ("file doesn't exist or permission denied") or SSH_ERROR (any other error). Unfortunately ssh_get_error() is called on the session, and doesn't provide anything when importing the key failed. When we get one of those two errors, add a log message explaining what's going on. Unfortunately ssh_get_error() is called on the session, not a key, and doesn't provide anything more when importing the key failed, so we'll have to be somewhat generic in our error mssage. It's a user-correctible error, so it's worth putting in the GUI. When importing the key succeeded but authentication failed, keep doing what we've been doing, as other methods might still succeed. Fix #17888
2024-01-18Increase libssh minimum version to 0.8.5John Thacker1-2/+0
libssh 0.8.5 was released in October 2018, all known Linux distributions that currently compile on the master branch with their default packages include a more recent version, and we ship the 0.10.x series for Windows and MacOS. (Among major Linux distributions that compile currently, Debian Buster has 0.8.7). It has several API changes to ssh_options_get and ssh_options_set, new features, and a number of bugs and CVEs fixed. We can remove a workaround for a missing API call in extcap/ssh-base
2024-01-17extcap: fix build with older libsshJoakim Karlsson1-0/+2
2024-01-15extcap: Add ability to enable SHA-1 algorithmsJohn Thacker5-1/+93
libssh 0.10.0 removed SHA-1 based keys and algorithms from its default configuration, though they are still supported. We ship with 0.10.5 in Windows and macOS now, and many Linux distributions are on 0.10.x as well. Add the ability to re-enable SHA-1 RSA keys, MAC, and KEX algorithms with a preference to ciscodump, sshdump, and wifidump. This will be a little easier in 0.11.0, where it's possible to just specify the algorithms you want to add to the default list, instead of having to specify the entire list. Fix #19510. Fix #19594
2024-01-12GNSS: add dissectors for further UBX messagesTimo Warns1-0/+469
2023-12-19androiddump: Don't hang for 20s on Linux if loopback is downJohn Thacker1-30/+35
androiddump uses nonblocking connect on Windows, trying 10 times with 1ms timeouts in select(). (This is short, but it's generally trying to connect to the loopback interface.) On UN*X, it uses blocking sockets, also trying 10 times, with SO_SNDTIMEO set to 2s. Generally the socket returns nears instaneously, because it's trying to connect to localhost. If the loopback interface goes down, however, this results in 20s of timeouts. Use nonblocking sockets on UN*X as well. Related to #13104, #15295
2023-10-31wsutil: Consolidate IP address codeJoão Valverde1-1/+1
Consolidate code to handle IP addresses in inet_addr.[ch].
2023-10-17androiddump: support capture filterFlorian Bezold1-5/+10
2023-10-11Move our Falco plugin directoriesGerald Combs1-2/+2
Move our Falco plugin directories up one level so that we're outside the hierarchy scanned by plugins_init. This also makes it more clear that these are Falco plugins and that they don't conform to our plugin API.
2023-09-03ciscodump: Keep strptime() behavior unchangedJoão Valverde1-2/+2
Use the system implementation if available, the internal one if not.
2023-09-03Build with NetBSD's strptime()João Valverde1-1/+2
Replace our strptime code, which is from gnulib, with the simpler and better NetBSD implementation. This changes the ws_strptime() stub to unconditionally use the internal implementation. Previously it would use the system implementation of available. This is still possible but is opt-in, i.e., code should add the necessary #ifdefs and assume responsability for handling non-portable formats or providing limited functionality on some platforms. Text import allows the user to specify the strptime() format freely, so in that case it makes sense to use the system's implementation, and pass the responsability for understanding the implementation and the supported specifiers to the user. Only fall back to our implementation if the system libc lacks a strptime().
2023-08-11dpauxmon: Flush after pcap headerJohn Thacker1-0/+2
Flush after writing the pcap header for the same reasons as in udpdump (see commit 9ad1ec1651689a39e86562d083a0794d6fcbc2c2)
2023-08-03extcap: Flush after writing the pcap headerJohn Thacker2-0/+4
Call fflush in udpdump and ciscodump after writing the pcap header so that it is actually written out even if no packets have arrived yet. By doing so, dumpcap no longer blocks in cap_pipe_open_live waiting for the pcap header from the extcap pipe until the first packet is captured, but instead goes on to (attempt to) open its output. This means that if we capture no packets that a capture file with a header but no packet records will be created (and, if not a temp file, will have to be cleaned up), but that is consistent with tshark and Wireshark behavior otherwise. This means you can no longer do a capture to a FIFO or Named Pipe in this order: 1) Start dumpcap 2) Create the FIFO or Named Pipe 3) Start the flow of packets to the UDP port which only worked when not dissecting packets. It was broken if tshark also needed to dissect packets, but evaded the checks for if we were writing to a FIFO or Named Pipe resulting in behavior mysterious to users, such as only writing to one of the Named Pipe readers on Windows (or failing if there aren't enough instances), or having tshark and the other pipe reader compete for the pipe input and eventually failing on UN*X. Instead, the FIFO or Named Pipe needs to be created before launching dumpcap, or else an ordinary file will be created (on UN*X), or an error about not being able to open the output (on Windows, since Named Pipes have a magic prefix, and you can't create an ordinary file with a named pipe filename.) Fix #17900.
2023-07-31Falcodump: Partially revert c8accef14cGerald Combs1-9/+8
sinsp::get_plugin_manager is usable again, so switch back to using it.
2023-07-04Falcodump + Falco bridge: libsinsp API updatesGerald Combs1-14/+21
Update to match recent libsinsp 0.11 API changes.
2023-06-28Falcodump: Update our AWS region listGerald Combs1-1/+3
2023-06-28Falcodump: Fix our data source settingsGerald Combs1-2/+2
Change the data source label to "Log data URL". Fix a tooltip typo.
2023-06-18Get rid of unnecessary casts.Guy Harris1-1/+1
snprintf(), sensibly, takes a size_t argument specifying the size of the buffer. g_snprintf(), bogusly, takes a gulong argument specifying the size of the buffer, so we had to do casts to avoid narrowing complaints, but we're just using snprintf() now (as we require C11 or later), and don't need the casts any more.
2023-06-16Convert writecap to C99 typesGerald Combs1-1/+1
Convert writecap to C99 types. Add maximum and minimum values to convert-glib-types.py. Ping #19116
2023-06-15Convert our extcaps to C99 typesGerald Combs17-431/+433
Convert our extcaps to C99 types. Try to preserve padding in convert-glib-types.py and add globbing support on Windows. Ping #19116
2023-06-03randpkt: Support different capture formats, default to pcapngJohn Thacker1-2/+7
Related to #18009 - Have randpkt default to pcapng, allow selecting a different capture file format via the common -F option that other command line tools use, and document it. For the randpktdump extcap, just use pcapng. This fixes --all-random, because --all-random requires different encapsulation per packet. It also fixes the related -r option to randpkt (though note that picking a file format that doesn't support ENCAP_PER_PACKET with -r causes problems.) Document -r in the randpkt man page. Fix #18944
2023-06-01CMake+Windows: Try to fix NSIS installer with NinjaJoão Valverde1-1/+1
2023-05-26androiddump: Fix warning [-Wdiscarded-qualifier]João Valverde1-1/+1
wireshark/extcap/androiddump.c:573:48: warning: passing argument 5 of 'select' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 573 | if ((select(0, NULL, &fdset, NULL, &timeout) != 0) && (FD_ISSET(sock, &fdset))) { | ^~~~~~~~
2023-05-16sshdump: Trying to get closer to setting intended rem. capture filterJaap Keuter1-0/+10
Closes #18874
2023-04-26etwdump: Try to fix the buildJohn Thacker1-1/+1
At least one version of MSVC seems not to like a trailing comma at the end of variadic arguments.
2023-04-26add ProcessorNumber to packet commentsKevin Schoonover1-4/+7
2023-04-20falcodump: Catch exceptions when loading pluginsGerald Combs1-20/+18
Consolidate some duplicate code.
2023-03-23sshdump: allow dumpcap capture config without remote interfaceJaap Keuter1-10/+12
Closes #18904
2023-03-13Falcodump: Update to match the current libsinsp/libscap.Gerald Combs1-2/+2
2023-02-19sshdump: add capability to use doas on remote hostJaap Keuter1-15/+59
2023-02-10Move ui/cmdarg_err.[ch] to wsutilJoão Valverde3-3/+3
2023-02-06Remove wspcap.h and use config.h insteadJoão Valverde1-1/+1
Forcing the use of a dedicated header to replace pcap.h is unnecessary code and mental overhead in this case. We can use config.h instead for the same purpose of defining a macro symbol before including pcap.h.
2023-02-06Remove wsutil/netlink.h workaroundJoão Valverde1-1/+0
2023-02-06CMake: Cleanup unnecessary linking with shared librariesJoão Valverde1-6/+1
2023-01-19Falco bridge+falcodump: Scan for personal pluginsGerald Combs1-0/+12
2023-01-14MinGW: Cast away a -Wincompatible-pointer-types warningJoão Valverde1-3/+3
extcap/androiddump.c:1712:36: warning: passing argument 2 of 'ws_inet_pton4' from incompatible pointer type [-Wincompatible-pointer-types] 1712 | ws_inet_pton4(bt_local_ip, &(server.sin_addr.s_addr)); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | u_long * {aka long unsigned int *}
2023-01-13MinGW: Fix -Wsign-compareJoão Valverde1-2/+2
2023-01-13ciscodump(.c): Fix Null pointer passed to 1st parameter expecting 'nonnull'Alexis La Goutte1-2/+2
2023-01-12Falcodump: More scap event code handling fixesGerald Combs1-10/+0
We don't need to do anything special for timeouts.
2023-01-11Falcodump: Improve scap event code handlingGerald Combs1-3/+21
Check timeouts and filtered events.
2023-01-05androiddump: btsnoop support on android T and onwardsJakub Pawlowski1-1/+1
After android T, BT process might be called i.e. com.google.android.bluetooth, instead of com.android.bluetooth It depends on what APEX version is installed.
2022-12-22CMake: Set a default output directory for log-based extcapsGerald Combs1-0/+3
2022-12-15Extcap: Fix falcodump gcc warnings and errors.Gerald Combs1-8/+7
Fix warnings and errors reported by gcc 11.3.
2022-12-13Fix ciscodump CIDDario Lombardo1-1/+1
2022-12-12ciscodump: Added support for IOS XE 17.xj.novak@netsystem.cz1-41/+347