Commit Graph

571 Commits

Author SHA1 Message Date
mezysinc
9cf49a7c8d Update Portuguese strings 2022-05-21 04:57:12 +02:00
Allan Nordhøy
5d19f3ce02 Update Norwegian strings 2022-05-21 04:53:42 +02:00
emanuele-f
da48740926 Bump version to 1.4.7 2022-02-10 11:40:43 +01:00
emanuele-f
ca473fade4 Fix empty stats when there is no traffic 2022-02-10 10:24:10 +01:00
emanuele-f
b4b172e540 Fix possible NULL pointer access in isRootCapture 2022-02-10 10:11:37 +01:00
emanuele-f
695af4889e Merge branch 'master' into dev 2022-02-09 22:42:49 +01:00
emanuele-f
a9653054ef Avoid ANR when stopping the capture
The threads are now joinined in the background, avoiding to delay the main
thread. This fixes ANR while stopping the capture.

Fixes #186
2022-02-09 22:36:48 +01:00
emanuele-f
955f36b881 Fix start/stop icons appearance when disabled 2022-02-09 22:07:02 +01:00
emanuele-f
e0ccce12c9 Fix CaptureService not stopped properly
When stopping the service, only stopForeground was called, but not
stopSelf. If the process was destroyed (e.g. by swiping the app
from the recent apps), in some cases it would be restarted due to
START_STICKY, causing ForegroundServiceStartNotAllowedException in
Android 12.

Fixes #175
2022-02-09 16:26:38 +01:00
emanuele-f
7d3f2e9610 Bump version to 1.4.6 2022-02-06 12:49:10 +01:00
emanuele-f
558e20aef0 Remove the CSV header from translated strings 2022-02-06 11:53:38 +01:00
MS-PC
b9a9dcc251 Update Spanish strings 2022-02-06 11:27:27 +01:00
Allan Nordhøy
4a98afb6aa Update Norwegian Bokmål strings 2022-02-06 11:22:14 +01:00
Maxime Leroy
b74eceb869 Update French strings 2022-02-06 11:15:32 +01:00
J. Lavoie
fe17a4020b Initial French translation 2022-02-06 11:14:58 +01:00
J. Lavoie
8f3e4ffb29 Update Italian strings 2022-02-06 10:56:14 +01:00
emanuele-f
fbba541617 Fix test 2022-02-06 10:24:20 +01:00
emanuele-f
c2ad297005 Initial mitmproxy plugin implementation
The pcapdroid_mitm.py plugin allows PCAPdroid to receive the decrypted data from
mitmproxy and display it into the GUI (currently limited to the HTTP request)
2022-02-06 00:27:09 +01:00
emanuele-f
c1276d23b4 Add additional sanitizers 2022-02-03 18:56:33 +01:00
emanuele-f
9fce153fc5 Update dependencies 2022-02-03 17:12:42 +01:00
emanuele-f
59288b583d Update to nDPI 4.2
Relevant changes:

- Reduced memory footprint
- Fix some memory issues
- Improved protocols dissection
2022-02-03 16:58:07 +01:00
emanuele-f
8fb3fa97b1 Add test for HTTP proxy metadata 2022-02-03 16:49:32 +01:00
emanuele-f
70f7ce9150 Merge branch 'dev' 2022-02-03 15:25:15 +01:00
emanuele-f
7a1a0e6981 Reaching max_dump_size does not stop the capture
Now only the PCAP dump is stopped when max_dump_size is reached
2022-02-03 11:59:40 +01:00
emanuele-f
f5e0fbd417 Improve HTTP server termination
This prevents synchronization issues on clients not ReadyForData
2022-02-03 11:56:33 +01:00
emanuele-f
18ffc2c374 Fix memory leak in HTTP server mode
When a client stopped the PCAP download, the isCloseConnection did not
detect the close. As a result, the PCAP dump would still be enqueued to
the ChunkedInputStream, causing the memory allocation to raise and never
be free.

Since NanoHTTPD does not seem to provide a way to detect connection close
and since it is not actively maintained, the HTTP server has been
replaced with an ad-hoc implementation which provides the minimal
features PCAPdroid needs to export the PCAP over HTTP.
2022-02-01 17:40:23 +01:00
emanuele-f
e6906f3603 Remove the readme from the pcap dir
The readme must not be part of the fuzzing corpus
2022-01-30 01:13:52 +01:00
emanuele-f
8984ae6648 Boost fuzz_capture performance
Read packets without pcapd and only perform minimal DPI
2022-01-30 01:02:10 +01:00
emanuele-f
b4780b1246 Don't monitor Netlink without the @inet interface 2022-01-30 00:36:02 +01:00
emanuele-f
81cb73d70c Fix UAF in root capture with DNS replies
When a DNS reply is received, remove_connection frees the
connection data. However, a reference to the conn->tuple
was kept in the pkt_context_t, causing a use-after-free
2022-01-29 23:00:23 +01:00
emanuele-f
5d4eee8542 Add capture fuzz_capture target 2022-01-29 22:14:58 +01:00
emanuele-f
02b143aa42 Reorganize tests 2022-01-29 18:43:29 +01:00
emanuele-f
bdce2736f9 Fix possible OOB read in pcapd with invalid IPv6
Thank you fuzzer <3
2022-01-29 17:55:17 +01:00
emanuele-f
935f9218fe Only create pcapd PID in daemon mode 2022-01-29 17:34:56 +01:00
emanuele-f
c98b3b0cbe Add initial fuzzing of pcapd 2022-01-29 17:27:19 +01:00
emanuele-f
05faa403f5 Fix pcapd crash with no arguments 2022-01-29 17:24:28 +01:00
emanuele-f
4a859bee6a Tighten root parameters checks
This prevents possible injections from user provided parameters
2022-01-29 12:45:01 +01:00
emanuele-f
987839858d Fix crash on stop with no dump after 672e810 2022-01-29 11:55:21 +01:00
emanuele-f
9052bd8f5f Return the PCAPdroid version in get_status 2022-01-28 18:29:37 +01:00
emanuele-f
672e810bec Improve capture performance with PCAP dump
PCAP dump is now performed into a separate thread. This greatly reduces
the chance for packet loss in root mode as well as preventing latency
spikes in VPN mode.
2022-01-28 18:08:37 +01:00
emanuele-f
a2d795152f Fix packets truncated with root and TSO/GRO
Packets were truncated on some devices employing offloading, in which
case the packet size was bigger than the MTU. A snaplen of 65535 fixes
this problem.

See #182
2022-01-27 14:26:59 +01:00
emanuele-f
e1bafef088 Revert "Disable TPACKET v3 to prevent packets reordering in root mode"
This reverts commit f715c06be1.

Further testing comparing the dumps produced by simultaneuosly running
PCAPdroid in non-immediate mode with tcpdump in immediate mode has
shown that packets reordering can also occur in immediate mode, so
it does not depend on TPACKET v3.
2022-01-27 11:59:54 +01:00
emanuele-f
f715c06be1 Disable TPACKET v3 to prevent packets reordering in root mode
It seems like TPACKET V3 causes packet reordering issues, where a packet
A sent before a packet B by the same host is actually seen after B in
the capture. This causes inexistent out-of-order and missing TCP segments
issues in Wireshark.

This has been verified by comparing the PCAP dump generated by PCAPdroid
in HTTP server mode with the traffic dump on the LAN, thus excluding
reordering occuring over the Internet.
2022-01-26 15:50:44 +01:00
emanuele-f
5e9be5cd8b Remove old strings 2022-01-26 10:03:47 +01:00
emanuele-f
a70f4e38f7 Implement functional tests for the new dump params 2022-01-25 22:46:08 +01:00
emanuele-f
e00870b23e New dump parameters for the Intent-based API
- snaplen: limit the size of a every packet
- max_pkts_per_flow
- max_dump_size: stop the capture when the size limit is reached
2022-01-25 15:57:38 +01:00
emanuele-f
82831cae2d Provide recv stats when reading from file 2022-01-25 11:31:14 +01:00
emanuele-f
f2f765dca5 Fix root capture from "any" after 2ea1229 2022-01-25 11:28:01 +01:00
emanuele-f
59eda30056 Print total stats when pcapd terminates 2022-01-25 10:08:10 +01:00
emanuele-f
41f76486b4 Add requirePreference 2022-01-21 11:36:50 +01:00