mirror of
https://github.com/mvt-project/mvt.git
synced 2026-02-16 18:32:46 +00:00
Compare commits
1 Commits
main
...
fix/add-py
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
74dd566ee6 |
7
Makefile
7
Makefile
@@ -1,9 +1,14 @@
|
|||||||
PWD = $(shell pwd)
|
PWD = $(shell pwd)
|
||||||
|
|
||||||
|
autofix:
|
||||||
|
ruff format .
|
||||||
|
ruff check --fix .
|
||||||
|
|
||||||
check: ruff mypy
|
check: ruff mypy
|
||||||
|
|
||||||
ruff:
|
ruff:
|
||||||
ruff check .
|
ruff format --check .
|
||||||
|
ruff check -q .
|
||||||
|
|
||||||
mypy:
|
mypy:
|
||||||
mypy
|
mypy
|
||||||
|
|||||||
59
SECURITY.md
59
SECURITY.md
@@ -2,61 +2,4 @@
|
|||||||
|
|
||||||
Thank you for your interest in reporting security issues and vulnerabilities! Security research is of utmost importance and we take all reports seriously. If you discover an issue please report it to us right away!
|
Thank you for your interest in reporting security issues and vulnerabilities! Security research is of utmost importance and we take all reports seriously. If you discover an issue please report it to us right away!
|
||||||
|
|
||||||
Please DO NOT file a public issue, instead send your report privately to the MVT maintainers at Amnesty International via `security [at] amnesty [dot] tech`.
|
Please DO NOT file a public issue, instead send your report privately to *nex [at] nex [dot] sx*. You can also write PGP-encrypted emails to [this key](https://keybase.io/nex/pgp_keys.asc?fingerprint=05216f3b86848a303c2fe37dd166f1667359d880).
|
||||||
|
|
||||||
You can also write PGP-encrypted emails to key `CFBF9698DCA8EB2A80F48ADEA035A030FA04ED13`. The corresponding PGP public key is lited below.
|
|
||||||
|
|
||||||
```
|
|
||||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
|
||||||
|
|
||||||
mQINBGlFPwsBEADQ+d7SeHrFPYv3wPOjWs2oMpp0DPdfIyGbg+iYWOC36FegZhKY
|
|
||||||
+WeK96GqJWt8wD6kwFUVwQI795WZrjSd1q4a7wR+kj/h7xlRB6ZfVICA6O5DOOm6
|
|
||||||
GNMvqy7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1LOccYyaOOFF/PSyCu9dKzXk7zEz2HNcIboWSkAE
|
|
||||||
8ZDExMYM4WVpVCOj+frdsaBvzItHacRWuijtkw==
|
|
||||||
=JAXX
|
|
||||||
-----END PGP PUBLIC KEY BLOCK-----
|
|
||||||
```
|
|
||||||
|
|||||||
@@ -17,17 +17,17 @@ classifiers = [
|
|||||||
"Programming Language :: Python",
|
"Programming Language :: Python",
|
||||||
]
|
]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"click==8.3.0",
|
"click==8.2.1",
|
||||||
"rich==14.1.0",
|
"rich==14.1.0",
|
||||||
"tld==0.13.1",
|
"tld==0.13.1",
|
||||||
"requests==2.32.5",
|
"requests==2.32.5",
|
||||||
"simplejson==3.20.2",
|
"simplejson==3.20.1",
|
||||||
"packaging==25.0",
|
"packaging==25.0",
|
||||||
"appdirs==1.4.4",
|
"appdirs==1.4.4",
|
||||||
"iOSbackup==0.9.925",
|
"iOSbackup==0.9.925",
|
||||||
"adb-shell[usb]==0.4.4",
|
"adb-shell[usb]==0.4.4",
|
||||||
"libusb1==3.3.1",
|
"libusb1==3.3.1",
|
||||||
"cryptography==46.0.3",
|
"cryptography==45.0.6",
|
||||||
"PyYAML>=6.0.2",
|
"PyYAML>=6.0.2",
|
||||||
"pyahocorasick==2.2.0",
|
"pyahocorasick==2.2.0",
|
||||||
"betterproto==1.2.5",
|
"betterproto==1.2.5",
|
||||||
@@ -80,7 +80,7 @@ packages = "src"
|
|||||||
addopts = "-ra -q --cov=mvt --cov-report html --junitxml=pytest.xml --cov-report=term-missing:skip-covered"
|
addopts = "-ra -q --cov=mvt --cov-report html --junitxml=pytest.xml --cov-report=term-missing:skip-covered"
|
||||||
testpaths = ["tests"]
|
testpaths = ["tests"]
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff.lint]
|
||||||
select = ["C90", "E", "F", "W"] # flake8 default set
|
select = ["C90", "E", "F", "W"] # flake8 default set
|
||||||
ignore = [
|
ignore = [
|
||||||
"E501", # don't enforce line length violations
|
"E501", # don't enforce line length violations
|
||||||
@@ -95,10 +95,10 @@ ignore = [
|
|||||||
# "E203", # whitespace-before-punctuation
|
# "E203", # whitespace-before-punctuation
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.ruff.per-file-ignores]
|
[tool.ruff.lint.per-file-ignores]
|
||||||
"__init__.py" = ["F401"] # unused-import
|
"__init__.py" = ["F401"] # unused-import
|
||||||
|
|
||||||
[tool.ruff.mccabe]
|
[tool.ruff.lint.mccabe]
|
||||||
max-complexity = 10
|
max-complexity = 10
|
||||||
|
|
||||||
[tool.setuptools]
|
[tool.setuptools]
|
||||||
|
|||||||
@@ -84,17 +84,13 @@ class BugReportModule(MVTModule):
|
|||||||
return self._get_file_content(main_content.decode().strip())
|
return self._get_file_content(main_content.decode().strip())
|
||||||
except KeyError:
|
except KeyError:
|
||||||
return None
|
return None
|
||||||
|
else:
|
||||||
dumpstate_logs = self._get_files_by_pattern("dumpState_*.log")
|
dumpstate_logs = self._get_files_by_pattern("dumpState_*.log")
|
||||||
if dumpstate_logs:
|
if not dumpstate_logs:
|
||||||
return self._get_file_content(dumpstate_logs[0])
|
|
||||||
|
|
||||||
dumpsys_files = self._get_files_by_pattern("*/dumpsys.txt")
|
|
||||||
if dumpsys_files:
|
|
||||||
return self._get_file_content(dumpsys_files[0])
|
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
return self._get_file_content(dumpstate_logs[0])
|
||||||
|
|
||||||
def _get_file_modification_time(self, file_path: str) -> dict:
|
def _get_file_modification_time(self, file_path: str) -> dict:
|
||||||
if self.zip_archive:
|
if self.zip_archive:
|
||||||
file_timetuple = self.zip_archive.getinfo(file_path).date_time
|
file_timetuple = self.zip_archive.getinfo(file_path).date_time
|
||||||
|
|||||||
@@ -34,20 +34,6 @@ class DumpsysReceivers(DumpsysReceiversArtifact, BugReportModule):
|
|||||||
|
|
||||||
self.results = results if results else {}
|
self.results = results if results else {}
|
||||||
|
|
||||||
def check_indicators(self) -> None:
|
|
||||||
for result in self.results:
|
|
||||||
if self.indicators:
|
|
||||||
receiver_name = self.results[result][0]["receiver"]
|
|
||||||
|
|
||||||
# return IoC if the stix2 process name a substring of the receiver name
|
|
||||||
ioc = self.indicators.check_receiver_prefix(receiver_name)
|
|
||||||
if ioc:
|
|
||||||
self.results[result][0]["matched_indicator"] = ioc
|
|
||||||
self.detected.append(result)
|
|
||||||
continue
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def run(self) -> None:
|
def run(self) -> None:
|
||||||
content = self._get_dumpstate_file()
|
content = self._get_dumpstate_file()
|
||||||
if not content:
|
if not content:
|
||||||
|
|||||||
@@ -768,30 +768,6 @@ class Indicators:
|
|||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def check_receiver_prefix(self, receiver_name: str) -> Union[dict, None]:
|
|
||||||
"""Check the provided receiver name against the list of indicators.
|
|
||||||
An IoC match is detected when a substring of the receiver matches the indicator
|
|
||||||
:param app_id: App ID to check against the list of indicators
|
|
||||||
:type app_id: str
|
|
||||||
:returns: Indicator details if matched, otherwise None
|
|
||||||
|
|
||||||
"""
|
|
||||||
if not receiver_name:
|
|
||||||
return None
|
|
||||||
|
|
||||||
for ioc in self.get_iocs("app_ids"):
|
|
||||||
if ioc["value"].lower() in receiver_name.lower():
|
|
||||||
self.log.warning(
|
|
||||||
'Found a known suspicious receiver with name "%s" '
|
|
||||||
'matching indicators from "%s"',
|
|
||||||
receiver_name,
|
|
||||||
ioc["name"],
|
|
||||||
)
|
|
||||||
return ioc
|
|
||||||
|
|
||||||
return None
|
|
||||||
|
|
||||||
def check_android_property_name(self, property_name: str) -> Optional[dict]:
|
def check_android_property_name(self, property_name: str) -> Optional[dict]:
|
||||||
"""Check the android property name against the list of indicators.
|
"""Check the android property name against the list of indicators.
|
||||||
|
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
# Use of this software is governed by the MVT License 1.1 that can be found at
|
# Use of this software is governed by the MVT License 1.1 that can be found at
|
||||||
# https://license.mvt.re/1.1/
|
# https://license.mvt.re/1.1/
|
||||||
|
|
||||||
MVT_VERSION = "2.7.0"
|
MVT_VERSION = "2.6.1"
|
||||||
|
|||||||
@@ -631,10 +631,6 @@
|
|||||||
"build": "16H81",
|
"build": "16H81",
|
||||||
"version": "12.5.7"
|
"version": "12.5.7"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"version": "12.5.8",
|
|
||||||
"build": "16H88"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"build": "17A577",
|
"build": "17A577",
|
||||||
"version": "13.0"
|
"version": "13.0"
|
||||||
@@ -903,10 +899,6 @@
|
|||||||
"version": "15.8.5",
|
"version": "15.8.5",
|
||||||
"build": "19H394"
|
"build": "19H394"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"version": "15.8.6",
|
|
||||||
"build": "19H402"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"build": "20A362",
|
"build": "20A362",
|
||||||
"version": "16.0"
|
"version": "16.0"
|
||||||
@@ -1016,10 +1008,6 @@
|
|||||||
"version": "16.7.12",
|
"version": "16.7.12",
|
||||||
"build": "20H364"
|
"build": "20H364"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"version": "16.7.14",
|
|
||||||
"build": "20H370"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"version": "17.0",
|
"version": "17.0",
|
||||||
"build": "21A327"
|
"build": "21A327"
|
||||||
@@ -1176,10 +1164,6 @@
|
|||||||
"version": "18.7.3",
|
"version": "18.7.3",
|
||||||
"build": "22H217"
|
"build": "22H217"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"version": "18.7.4",
|
|
||||||
"build": "22H218"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"version": "26",
|
"version": "26",
|
||||||
"build": "23A341"
|
"build": "23A341"
|
||||||
@@ -1195,9 +1179,5 @@
|
|||||||
{
|
{
|
||||||
"version": "26.2",
|
"version": "26.2",
|
||||||
"build": "23C55"
|
"build": "23C55"
|
||||||
},
|
|
||||||
{
|
|
||||||
"version": "26.2.1",
|
|
||||||
"build": "23C71"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
Reference in New Issue
Block a user