|
1 | | -# libmvt-multiplatform (starter) |
| 1 | +# libmvt-multiplatform |
2 | 2 |
|
3 | | -Pure Java library (no Android dependencies) that implements parsing & IOC matching for Android-related artifacts. |
| 3 | + |
| 4 | + |
4 | 5 |
|
5 | | -- Package base: `org.osservatorionessuno.libmvt` |
6 | | -- No Android Gradle plugin or androidx deps. |
7 | | -- Feed it raw text dumps (dumpsys, getprop, etc.) and obtain structured results + detections. |
| 6 | +A pure Java library that parses Android artifacts and matches them against |
| 7 | +indicators of compromise. |
| 8 | + |
| 9 | +Package base: `org.osservatorionessuno.libmvt`. |
8 | 10 |
|
9 | 11 | ## Build & Test |
10 | 12 | ```bash |
11 | | -./gradlew test |
12 | | -# or, if wrapper isn't generated yet: |
13 | | -gradle wrapper |
14 | | -./gradlew test |
| 13 | +gradle test |
15 | 14 | ``` |
16 | 15 |
|
17 | | -## AndroidQF API |
18 | | -The `AndroidQFRunner` class can parse a directory exported with the |
19 | | -[androidqf](https://mvt.re/) format and run all available modules. |
20 | | -Example: |
| 16 | +## Updating IOCs |
| 17 | +Use `IndicatorsUpdates` to download the latest indicator files or to fetch a |
| 18 | +specific IOC file. |
| 19 | +```java |
| 20 | +IndicatorsUpdates updates = new IndicatorsUpdates(); |
| 21 | +updates.update(); // download index and IOC files to ~/.mvt/indicators |
| 22 | +Indicators iocs = Indicators.loadFromDirectory(updates.getIndicatorsFolder().toFile()); |
| 23 | + |
| 24 | +// download an extra IOC file |
| 25 | +updates.download("https://example.com/my_iocs.stix2"); |
| 26 | +``` |
| 27 | + |
| 28 | +Alternatively load IOCs from an existing directory: |
21 | 29 | ```java |
22 | | -Path dir = Path.of("/path/to/androidqf"); |
23 | 30 | Indicators iocs = Indicators.loadFromDirectory(Path.of("/path/to/iocs").toFile()); |
| 31 | +``` |
| 32 | + |
| 33 | +## AndroidQF example |
| 34 | +Run all modules on a directory exported with |
| 35 | +[androidqf](https://mvt.re/): |
| 36 | +```java |
| 37 | +Path dir = Path.of("/path/to/androidqf"); |
24 | 38 | AndroidQFRunner runner = new AndroidQFRunner(dir); |
25 | 39 | runner.setIndicators(iocs); |
26 | 40 | Map<String, Artifact> result = runner.runAll(); |
27 | 41 | ``` |
28 | | - |
29 | 42 | Individual modules can be invoked via `runModule("processes")` etc. |
30 | | -See `AndroidQFRunner.AVAILABLE_MODULES` for the list of names. |
31 | | - |
32 | | - |
33 | | -## Next steps |
34 | | -- Translate more artifact parsers from Python. |
35 | | -- Extend Detection metadata (source file, STIX IDs, etc.). |
36 | | -- Optionally publish to Maven Central / local repo. |
37 | | - |
38 | | -## Android feature parity |
39 | | - |
40 | | -Below is a quick overview of the Android artifact support compared to the Python |
41 | | -version. "Parser" indicates whether a class exists to parse the artifact. The |
42 | | -"Detection" column reflects if the heuristic/IOC logic is on par with the |
43 | | -Python implementation. |
44 | | - |
45 | | -| Artifact | Parser | Detection | |
46 | | -|----------|:------:|:---------:| |
47 | | -| Accessibility | ✅ | ✅ | |
48 | | -| ADB | ✅ | ❌ (no IOC logic) | |
49 | | -| Android backup | ✅ | ✅ | |
50 | | -| Appops | ✅ | ⚠ partial | |
51 | | -| Battery daily | ✅ | ✅ | |
52 | | -| Battery history | ✅ | ✅ | |
53 | | -| DB info | ✅ | ✅ | |
54 | | -| Package activities | ✅ | ✅ | |
55 | | -| Packages | ✅ | ⚠ partial | |
56 | | -| Platform compat | ✅ | ✅ | |
57 | | -| Receivers | ✅ | ✅ | |
58 | | -| File timestamps | N/A | N/A | |
59 | | -| Getprop | ✅ | ⚠ partial | |
60 | | -| Processes | ✅ | ⚠ partial | |
61 | | -| Settings | ✅ | ✅ | |
62 | | -| Tombstone crashes | ✅ | ⚠ partial | |
63 | | - |
64 | | -Legend: ✅ implemented, ❌ missing, ⚠ simplified compared to Python. |
65 | | - |
| 43 | +See `AndroidQFRunner.AVAILABLE_MODULES` for the list. |
0 commit comments