68 Commits

Author SHA1 Message Date
emanuele-f a111453054 Migrate to nDPI 5.0
Closes #833
2026-03-01 00:04:56 +01:00
emanuele-f 62986d93ff Replace zstd-jni AAR with facebook/zstd built from source (decoder only) 2026-02-21 15:32:17 +01:00
emanuele-f 88923e1277 Bump version to 1.9.0 2026-02-12 10:15:11 +01:00
emanuele-f 5dd872940f Update gradle and dependencies
libpcap 1.10.6
2026-02-06 19:59:24 +01:00
emanuele-f 39b4456aba Fix mismatched HTTP/2 replies with multiplexing (ushark)
When decrypting PCAP/Pcapng, the HTTP/2 replies would be mismatched
when HTTP/2 multiplexing was used and replies were received out of order.

To fix this, keep track of the HTTP/2 stream IDs to correcly match HTTP
requests to replies
2026-01-11 17:41:56 +01:00
emanuele-f 22d2204938 Support 16 KB page size devices
Note TLS decryption is not supported yet, due to changes
needed in Chaquopy chaquo/chaquopy#1171

Closes #475
2025-07-27 10:22:07 +02:00
emanuele-f 6b8ab97713 Fix possible unaligned memory accessses in stun.c on ARMv7
See #496
2025-03-22 16:41:58 +01:00
emanuele-f e650669553 Update ndk and ushark to r26d 2025-03-08 18:51:51 +01:00
emanuele-f 529ef639b6 Show detailed error for failed connections in VPN mode
Also change such errors colors from red to orange, as they
are normal during a capture.

Closes #441
2025-02-20 10:52:33 +01:00
emanuele-f 7899906b60 Use build flavors to make ushark optional 2025-02-16 11:16:04 +01:00
emanuele-f 1d89de51dc Add ability to decrypt PCAP/Pcapng files
A new "Decrypt PCAP file" entry has been added to the main menu,
which allows loading a PCAP+keylog or a Pcapng with secrets and
show the decrypted data in PCAPdroud.

The decryption itself is performed by Wireshark, which is built as
the standalone shared library libushark.so, thanks to ushark.

The shared library is loaded via dlopen to allow proper
re-initialization of the static variables in Wireshark. This also
provides the benefit to avoud unnecessary overhead and possible
inteferences when not used.

HTTP/2 reassembly is properly supported (implemented in ushark)
and content decoding works as expected.

See #351
2025-02-16 08:43:39 +01:00
emanuele-f c610c564bf Reduce size of nDPI
Use slim nDPI, which reduces the libndpi.so 4.12 size from 3 MB to 1 MB.
Further trimming may be evaluated in the future.

Closes #188
2025-01-02 08:17:32 +01:00
emanuele-f 65564a241c Update nDPI to 4.12 and libpcap to 1.10.5
Closes #474
2025-01-01 22:38:46 +01:00
emanuele-f 892731d2a2 Fix nDPI compilation warning 2023-12-10 12:44:57 +01:00
emanuele-f 6c8abf92c5 Use uid from the PCAPdroid trailer if available
When loading a PCAP file, if there is a PCAPdroid trailer available,
use its uid to associate the connections to the originating app.
Currently this assumes that the uid mapping has not changed, e.g. the
app for a specific uid has not been uninstalled.
2023-08-18 10:48:34 +02:00
emanuele-f a947ebfc70 Fix ICMPv6 not working in VPN mode
ICMPv6 packets were dropped due to missing logic

Also affected #321
2023-05-19 12:37:20 +02:00
emanuele-f 2a22e89fef Add ability to configure port mapping
In VPN mode, it's now possible to redirect the traffic of specific
ports towards another host and port. This makes it possible to
integrate PCAPdroid with other apps, by forwarding the traffic to
a local server.

Closes #274
2022-12-12 23:48:56 +01:00
emanuele-f 3f6f32809a Fix paid features unlocking in beta builds
Paid features inherited from the official app were not properly
unlocked when the VPN was started by the Android system

Fixes #255
2022-09-09 22:10:10 +02:00
emanuele-f 88e65b5336 Fix Whatsapp video calls hang up
Fixes #254
2022-09-09 18:55:05 +02:00
emanuele-f fd4a5a382d Fix ICMPv6 not captured with root and app filter 2022-07-23 10:29:05 +02:00
emanuele-f fef9810118 Update submodule 2022-06-07 11:53:56 +02:00
emanuele-f eedba8f180 Fix possible NullPointerException in sslkeyfileExportResult 2022-06-06 18:12:18 +02:00
emanuele-f a010d5a327 Add missing union access check 2022-05-26 19:47:04 +02:00
emanuele-f f9431746d8 Fix upload bandwidth bottleneck in VPN mode
This was caused by induced TCP retransmissions on buffer full
2022-05-26 16:16:18 +02:00
emanuele-f 528438e6de Fix export of invalid/unsupported pkts in root
This ensures that the PCAP file obtained with the root capture does not
excludes invalid/unsupported packets.

Fixes #209
2022-05-20 15:47:14 +02:00
emanuele-f 5dfe15c4d9 TLS decryption now uses SOCKS5 auth
This prevents other processes from using the proxy
2022-04-14 01:04:09 +02:00
emanuele-f c4e23a8fb7 Fix UDP STUN compatibility
This makes p2p connections possible with some types of NAT
2022-03-26 18:06:07 +01:00
emanuele-f 8f5ed5fbb2 Fix GH worflow 2022-03-24 22:25:50 +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 a59664415a Add DPI and malware detection tests 2022-01-20 20:07:13 +01:00
emanuele-f 44cda96718 Add -fPIC to zdtun 2022-01-20 14:56:57 +01:00
emanuele-f e841cb6a52 Fix Cmake version warning 2021-12-14 22:50:26 +01:00
emanuele-f a9b90d5ff2 Fix deprecation/warning messages
Closes #151
2021-12-14 15:13:16 +01:00
emanuele-f a924ee5073 Remove symlinks and update dbip to 2021_12 2021-12-14 11:42:55 +01:00
emanuele-f 4855f7e4c4 Fix UAF of pd_conn_t
The UAF could be triggered with a on_connection_close followed by a
conns_clear and by a zdtun_lookup on the connection. Fixed in zdtun,
which now doesn't return closed connections.
2021-12-08 23:06:22 +01:00
emanuele-f e3ecd253ea Fix crash after 28ff23e 2021-12-08 18:33:17 +01:00
emanuele-f 963b1072b1 Spoof DNS replies for blocked hosts
This prevents the DNS resolver from spamming multiple requests when no
reply is seen.
2021-12-08 17:17:13 +01:00
emanuele-f 28ff23e26e Host is now extracted and blocked immediately
This commit also introduces the pkt_context_t to remove the need to store a
temporary cur_pkt, reducing chance to introduce bugs in VPN mode.
2021-12-07 16:52:11 +01:00
emanuele-f 8cf67378f5 Fix crash in Android 7
The getParameterCount is only available since API level 26. Using a
patched MaxMind-DB-Reader-java to avoid crashing.

https://developer.android.com/reference/java/lang/reflect/Method#getParameterCount()

java.lang.NoSuchMethodError: No virtual method getParameterCount()I in class Ljava/lang/reflect/Constructor; or its super classes (declaration of 'java.lang.reflect.Constructor' appears in /system/framework/core-oj.jar)
 at com.maxmind.db.Decoder.decodeMapIntoObject(Decoder.java:397)
 at com.maxmind.db.Decoder.decodeMap(Decoder.java:342)
 at com.maxmind.db.Decoder.decodeByType(Decoder.java:162)
 at com.maxmind.db.Decoder.decode(Decoder.java:151)
 at com.maxmind.db.Decoder.decode(Decoder.java:76)
 at com.maxmind.db.Reader.<init>(Reader.java:133)
 at com.maxmind.db.Reader.<init>(Reader.java:90)
 at com.emanuelef.remote_capture.Geolocation.openDb(Geolocation.java:67)
2021-11-23 22:42:08 +01:00
emanuele-f 1a8522126d Update dependencies 2021-11-23 11:11:54 +01:00
emanuele-f f29637bbe8 Add raw resources submodule 2021-11-19 18:31:04 +01:00
emanuele-f 4d0681f4d7 Revert library changes 2021-10-29 11:44:54 +02:00
emanuele-f 49117d1ecf Fix string 2021-10-29 11:16:22 +02:00
emanuele-f 1809a3d88c Update dependencies
- libpcap 1.10.1
- nDPI 4.0
- gradle, ndk, build tools
2021-10-14 19:48:16 +02:00
emanuele-f 69178a8910 Remove dependency on autotools 2021-07-28 11:19:56 +02:00
emanuele-f bc28244e21 Rework time handling
Periodic tasks are now based on a monotonic timer. The timestamp in
the exported PCAP now corresponds to the original timestamp when using
root. Moreover, in-app first/last seen time now displays the milliseconds.

Closes #89
2021-07-06 15:54:26 +02:00
emanuele-f 51dc0dde7e Fix bogus connections with root due to fragments
Connections with random ports sometimes appeared while capturing packets
as root, in particular while exporting data via the UDP exporter. These
were actually IP fragments, whose data was misinterpreted due to the
lack of L4 headers.
2021-07-01 18:27:28 +02:00
emanuele-f 258930d110 Fix multiple issues with ICMP connections
- Fix ping to known DNS servers being blocked
- Hide port number for ICMP connections
- Fix monodirectional ICMP connnections in root mode
2021-06-30 17:31:41 +02:00
emanuele-f 50bc81e575 Show request plaintext regardless of the protocol 2021-06-03 12:27:28 +02:00
emanuele-f e7c5227bfe Fix missing HTTP request in some cases 2021-06-02 15:34:40 +02:00