From 02014b414bd106e06f0efc16087f8973aaa84d4c Mon Sep 17 00:00:00 2001 From: tek Date: Fri, 3 Dec 2021 19:42:35 +0100 Subject: [PATCH] Add warning for apple notification --- mvt/ios/modules/mixed/sms.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/mvt/ios/modules/mixed/sms.py b/mvt/ios/modules/mixed/sms.py index 60425b7..c8ab2c5 100644 --- a/mvt/ios/modules/mixed/sms.py +++ b/mvt/ios/modules/mixed/sms.py @@ -102,12 +102,16 @@ class SMS(IOSExtraction): if not message.get("text", None): message["text"] = "" - # Extract links from the SMS message. - message_links = check_for_links(message.get("text", "")) - - # If we find links in the messages or if they are empty we add them to the list. - if message_links or message.get("text", "").strip() == "": + if message.get("text", "").startswith("ALERT: State-sponsored attackers may be targeting your iPhone"): + self.log.warn("Apple warning about state-sponsored attack received on the %s", message["isodate"]) self.results.append(message) + else: + # Extract links from the SMS message. + message_links = check_for_links(message.get("text", "")) + + # If we find links in the messages or if they are empty we add them to the list. + if message_links or message.get("text", "").strip() == "": + self.results.append(message) cur.close() conn.close()