Skip to content

Error when running SMS module on mvt-android #639

@bordenc

Description

@bordenc

On a clean install, ran an ADB backup (which has apparently been deprecated, is there a plan to deal with that?), and got the following output (scrubbed of identifying information):

MVT - Mobile Verification Toolkit
                https://mvt.re
                Version: 2.6.1
                Indicators updates checked recently, next automatic check in 12 hours


         INFO     [mvt.android.cmd_check_backup] Parsing STIX2 indicators file at path                                                               
                  /home/.local/share/mvt/indicators/raw.githubusercontent.com_AmnestyTech_investigations_master_2021-07-18_nso_pegasus.stix2  
         INFO     [mvt.android.cmd_check_backup] Parsing STIX2 indicators file at path                                                               
                  /home/.local/share/mvt/indicators/raw.githubusercontent.com_mvt-project_mvt-indicators_main_intellexa_predator_predator.stix
                  2                                                                                                                                  
         INFO     [mvt.android.cmd_check_backup] Parsing STIX2 indicators file at path                                                               
                  /home/.local/share/mvt/indicators/raw.githubusercontent.com_mvt-project_mvt-indicators_main_2022-06-23_rcs_lab_rcs.stix2    
         INFO     [mvt.android.cmd_check_backup] Parsing STIX2 indicators file at path                                                               
                  /home/.local/share/mvt/indicators/raw.githubusercontent.com_AssoEchap_stalkerware-indicators_master_generated_stalkerware.st
                  ix2                                                                                                                                
         INFO     [mvt.android.cmd_check_backup] Parsing STIX2 indicators file at path                                                               
                  /home/.local/share/mvt/indicators/raw.githubusercontent.com_AmnestyTech_investigations_master_2023-03-29_android_campaign_ma
                  lware.stix2                                                                                                                        
         INFO     [mvt.android.cmd_check_backup] Parsing STIX2 indicators file at path                                                               
                  /home/.local/share/mvt/indicators/raw.githubusercontent.com_mvt-project_mvt-indicators_main_2023-04-11_quadream_kingspawn.st
                  ix2                                                                                                                                
         INFO     [mvt.android.cmd_check_backup] Parsing STIX2 indicators file at path                                                               
                  /home/.local/share/mvt/indicators/raw.githubusercontent.com_mvt-project_mvt-indicators_main_2023-06_01_operation_triangulati
                  on_operation_triangulation.stix2                                                                                                   
         INFO     [mvt.android.cmd_check_backup] Parsing STIX2 indicators file at path                                                               
                  /home/.local/share/mvt/indicators/raw.githubusercontent.com_mvt-project_mvt-indicators_main_2023-07-25_wyrmspy_dragonegg_wyr
                  mspy_dragonegg.stix2                                                                                                               
         INFO     [mvt.android.cmd_check_backup] Parsing STIX2 indicators file at path                                                               
                  /home/.local/share/mvt/indicators/raw.githubusercontent.com_AmnestyTech_investigations_master_2024-05-02_wintego_helios_wint
                  ego_helios.stix2                                                                                                                   
         INFO     [mvt.android.cmd_check_backup] Parsing STIX2 indicators file at path                                                               
                  /home/.local/share/mvt/indicators/raw.githubusercontent.com_AmnestyTech_investigations_master_2024-12-16_serbia_novispy_novi
                  spy.stix2                                                                                                                          
         INFO     [mvt.android.cmd_check_backup] Loaded a total of 10722 unique indicators                                                           
         INFO     [mvt] Checking Android backup at path: backup.ab                                                                                   
         INFO     [mvt.android.modules.backup.sms] Running module SMS...                                                                             
         INFO     [mvt.android.modules.backup.sms] Processing SMS backup file at apps/com.android.providers.telephony/d_f/000000_sms_backup          
(truncated for brevity)       
         INFO     [mvt.android.modules.backup.sms] Processing MMS backup file at apps/com.android.providers.telephony/d_f/000036_mms_backup          
         ERROR    [mvt.android.modules.backup.sms] Error in running extraction from module SMS: cannot access local variable 'message_links' where it
                  is not associated with a value                                                                                                     
                  Traceback (most recent call last):                                                                                                 
                    File "/home/.local/pipx/venvs/mvt/lib/python3.13/site-packages/mvt/common/module.py", line 171, in run_module             
                      exec_or_profile("module.run()", globals(), locals())                                                                           
                      ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                           
                    File "/home/.local/pipx/venvs/mvt/lib/python3.13/site-packages/mvt/common/utils.py", line 263, in exec_or_profile         
                      exec(module, globals, locals)                                                                                                  
                      ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                  
                    File "<string>", line 1, in <module>                                                                                             
                    File "/home/.local/pipx/venvs/mvt/lib/python3.13/site-packages/mvt/android/modules/backup/sms.py", line 61, in run        
                      self.results.extend(parse_sms_file(data))                                                                                      
                                          ~~~~~~~~~~~~~~^^^^^^                                                                                       
                    File "/home/.local/pipx/venvs/mvt/lib/python3.13/site-packages/mvt/android/parsers/backup.py", line 241, in parse_sms_file
                      if message_links or entry["body"].strip() == "":                                                                               
                         ^^^^^^^^^^^^^                                                                                                               
                  UnboundLocalError: cannot access local variable 'message_links' where it is not associated with a value                            
         INFO     [mvt.android.cmd_check_backup] Reference hash of the info.json file:                                                               
                  "71330ec54f4675c37b00263d4f3b43a3b2822569a8dfed0b4d9f1e4f7b899a78"                                                                 
         INFO      NOTE: Using MVT with public indicators of compromise (IOCs) WILL NOT automatically detect advanced attacks.                       
                                                                                                                                                     
                  Please seek reputable expert help if you have serious concerns about a possible spyware attack. Such support is available to human 
                  rights defenders and civil society through Amnesty International's Security Lab at https://securitylab.amnesty.org/get-help/?c=mvt

No idea what to do with this. Suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    androidbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions