maaaaz / androwarn

Yet another static code analyzer for malicious Android applications
GNU Lesser General Public License v3.0
477 stars 159 forks source link

IndexError in core.py #15

Closed steverichey closed 5 years ago

steverichey commented 7 years ago

When using androwarn to analyze an approximately 23MB Xamarin application, I received an IndexError on line 426 of core.py. The full traceback is below:

Traceback (most recent call last):
  File "androwarn.py", line 116, in <module>
    main(options, arguments)
  File "androwarn.py", line 99, in main
    data = perform_analysis(APK_FILE, a, d, x, no_connection)
  File ".../androwarn/analysis/analysis.py", line 120, in perform_analysis
    ( 'suspicious_connection_establishment',     gather_suspicious_connection_establishment(x) ),
  File ".../androwarn/search/malicious_behaviours/remote_connection.py", line 68, in gather_suspicious_connection_establishment
    result.extend( detect_Socket_use(x) )
  File ".../androwarn/search/malicious_behaviours/remote_connection.py", line 52, in detect_Socket_use
    remote_port     = get_register_value(2, registers)
  File ".../androwarn/core/core.py", line 426, in get_register_value
    dict = registers[index]
IndexError: list index out of range

We were able to work around this temporarily by wrapping the offending block in a try/except and returning ERROR_VALUE_NOT_FOUND.

vedpbadola commented 7 years ago

I am also getting the same type of error.

Josue198s commented 6 years ago

Was this issue solved because I am getting the same issue.

maaaaz commented 5 years ago

Fixed in the latest version.