Skip to content

Improve Frida util: Recursive Get Input/Return Argument Values #3453

@bernhste

Description

@bernhste

Based on #3365

If one of the inputParameters or returnValue are objects and we need their values we won't be able to see them now.

var target = {
    category: "STORAGE",
    demo: "0002",
    hooks: [
        {
            class: "android.content.ContentResolver",
            methods: [
                "insert"
            ],
            maxDepth: 1  // Added maxDepth property to recursively decode objects up to 1 level deep
        }
    ]
};

In this case android.content.ContentValues would reveal what we're looking for. So instead of this:

  "inputParameters": [
    {
      "type": "android.net.Uri",
      "value": "content://media/external/downloads"
    },
    {
      "type": "android.content.ContentValues",
      "value": "<instance: android.content.ContentValues>"
    }
  ],

We'd see something like this:

  "inputParameters": [
    {
      "type": "android.net.Uri",
      "value": "content://media/external/downloads"
    },
    {
      "type": "android.content.ContentValues",
      "value": {
        "__class": "android.content.ContentValues",
        "_display_name": "secretFile86.txt",
        "mime_type": "text/plain",
        "relative_path": "Download"
      }
    }
  ],

If that still isn't what we're looking for we could set maxDepth: 2 and so on.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions