Commit Graph

556 Commits

Author SHA1 Message Date
emanuele-f
a924ee5073 Remove symlinks and update dbip to 2021_12 2021-12-14 11:42:55 +01:00
emanuele-f
fd9f8a4cbd Add Windows build workflow 2021-12-14 10:15:14 +01:00
emanuele-f
e270ee8670 Use memory-mapped file for geolocation lookups
This saves ~14 MB of RAM usage due to the loading of mmdb files
2021-12-13 19:41:17 +01:00
emanuele-f
29612b389c Small memory usage improvements
For the foreground, the Loader for the target apps dialog doesn't load
the bitmaps anymore and is destroyed once finished. Bitmaps take lots of
memory, so they should only be loaded when necessary.

For the backgroud, the AppsResolver now loads the virtual/unknown app
icons only if necessary, saving ~0.5 MB when the app is in background.
2021-12-13 18:57:03 +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
3a94ce03c8 Fix firewall blocking flags 2021-12-08 17:26:33 +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
41460fe9cf Add checks in startActivity/ActivityResultLauncher
This prevents crashes when no activity is found to handle the specified
Intent
2021-12-08 11:07:30 +01:00
emanuele-f
102960d982 Fix DNS host not being extracted on first packet 2021-12-07 18:09:23 +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
a48514db65 Separate vpn and root specific struct fields 2021-12-06 17:53:49 +01:00
emanuele-f
c079474917 Rename vpnproxy to pcapdroid 2021-12-06 16:29:37 +01:00
emanuele-f
c74d15658f Reduce passed parameters and track phases 2021-12-03 18:18:59 +01:00
emanuele-f
a6b5675edc Simplify blocking of private DNS 2021-12-03 16:02:45 +01:00
emanuele-f
f78cec5c9f Fix blocking by host not working 2021-12-03 11:58:57 +01:00
emanuele-f
62bb11b251 Improve ID comments 2021-12-02 23:20:13 +01:00
emanuele-f
cc11790f0e Implement features unlock via unlock code 2021-12-02 23:07:53 +01:00
emanuele-f
6e4afb51af Re-enable always-on VPN
Even though the PCAPdroid VPN cannot be currently controlled via the
Android settings, users can use the always-on VPN to block the device
connections until manually starting PCAPdroid.

This reverts commit 85f2333e5b.
2021-12-01 11:07:27 +01:00
emanuele-f
62c84f9663 Initial firewall implementation (no-root mode)
- Block connections by IP, domain or app
- Add filter to show blocked connections
- Migrate IP matching to ndpi_ptree_t API
- IPv6 addresses now supported in blacklists
- Duplicate IP address rules now only counted once
2021-11-29 22:40:35 +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
e2ab8a9f3e Bump version to 1.4.4 2021-11-23 13:58:20 +01:00
RyoidenshiAokigahara
4d90b37c7c
New string translated into russian (#159) 2021-11-23 11:30:14 +00:00
emanuele-f
fafd42f07f Fix bad debug version hyperlink 2021-11-23 11:20:53 +01:00
emanuele-f
1a8522126d Update dependencies 2021-11-23 11:11:54 +01:00
emanuele-f
99353d1086 Add missing string 2021-11-23 11:00:38 +01:00
Emanuele Faranda
95e1b4322e
Update README.md 2021-11-23 10:46:52 +01:00
emanuele-f
2c86fc312d Restart catpure on consecutive start requests
This prevents crashes
2021-11-23 10:22:15 +01:00
emanuele-f
4912491672 Improve layout 2021-11-23 09:56:24 +01:00
emanuele-f
378576e165 Update IT translation 2021-11-23 09:51:12 +01:00
sr093906
ceec226783
Update zh-rCN Strings (#157) 2021-11-23 08:26:54 +00:00
emanuele-f
51474d8e12 Sort control permissions by package name
Control permissions is now only shown in the settings if any permission
is set
2021-11-22 19:56:57 +01:00
Emanuele Faranda
6f73c46537
Update app_api.md 2021-11-22 19:35:54 +01:00
emanuele-f
b1cd5c77ae Change action name 2021-11-22 19:28:38 +01:00
emanuele-f
6c084e6d81 Add ability to receive Intent on capture stopped 2021-11-22 19:04:07 +01:00
emanuele-f
67c3c7bb99 Add CaptureCtrl status request 2021-11-22 18:19:16 +01:00
emanuele-f
00bfb81dbf Add warning in SOCKS5 mode with no app filter
Closes #143
2021-11-22 16:47:05 +01:00
emanuele-f
a61d8af4c1 Add malware detection warning with private DNS on 2021-11-22 16:15:23 +01:00
emanuele-f
3e522a1786 Properly handle private DNS
PCAPdroid now tracks the private DNS state. Secure DNS queries are now
only blocked when set in opportunistic mode. A notice is now shown when
PCAPdroid has no visibility on the DNS query.

Fixes #130
2021-11-22 15:38:56 +01:00
emanuele-f
6700463155 Remove getBilling from app class 2021-11-22 11:44:55 +01:00
emanuele-f
71a8adda30 Add country flag in the connection details 2021-11-19 22:34:46 +01:00
emanuele-f
f29637bbe8 Add raw resources submodule 2021-11-19 18:31:04 +01:00
emanuele-f
b10096bfbe Add malware detection docs link to the app
Closes #140
2021-11-19 18:21:44 +01:00
emanuele-f
ebfcea7217 Ability to manually update the blacklists
The update status is now also shown
2021-11-19 18:21:44 +01:00
emanuele-f
0edba60206 Remove unneded check 2021-11-19 18:21:44 +01:00
MZM
b330f5915d fix some deprecations (#156)
Co-authored-by: mazm <marcel.zipaj-misko@student.tuke.sk>
2021-11-19 18:21:44 +01:00
emanuele-f
3d5ce803a0 Improve layout 2021-11-19 18:21:44 +01:00
emanuele-f
3366a778c6 Improve malware detection overview
- Refresh malware status and blacklists views
- Serialize blacklists info
- Improve layout
2021-11-19 18:21:44 +01:00
emanuele-f
e7b8811f23 Initial malware detection overview (wip)
- Overall status of malware detection
- Show the blacklists used, check their status
- Whitelist moved to this activity
2021-11-19 18:21:44 +01:00
emanuele-f
8399e30fab Add ability to start at boot
Closes #100
2021-11-19 18:21:44 +01:00