Skip to content

Update MASTG-DEMO-0006 to cover the remaining MASTG-TEST-0203 logging APIs #3949

Description

@dchapagain

Following up on discussion #3948, where @cpholguera suggested updating MASTG-DEMO-0006 before adding a new static demo for MASTG-TEST-0231.

Context

MASTG-TEST-0203 lists the following APIs:
apis: [Log, Logger, System.out.print, System.err.print, java.lang.Throwable#printStackTrace]

MASTG-DEMO-0006 is currently its only demo. From what I can see, MastgTest.kt covers android.util.Log (v, i, w, d, e, wtf) and java.util.logging.Logger.severe, while run.sh hooks android.util.Log!* and java.util.logging.Logger!severe.

The API's that are not covered yet:

  • System.out.print / println
  • System.err.print / println
  • Throwable.printStackTrace

Proposed change:

  1. Add samples for the three APIs above to MastgTest.kt
  2. Extend the hooks to java.io.PrintStream!print* and java.lang.Throwable!printStackTrace* (System.out and System.err are both PrintStream instances)
  3. Regenerate output.txt and logcat_output.txt from a real run
  4. Update the Steps / Observation / Evaluation sections to match

A few scope questions:

  1. Tooling: Should this stay with frida-trace or migrate to frooky + hooks.json? The current demo instructions prefer frooky, and filterEventsByStacktrace looks useful for reducing the noise from hooking java.io.PrintStream.
  2. Demo Conventions: MastgTest.kt has no // SUMMARY: comment and no // FAIL: [MASTG-TEST-0203] annotations. Should I bring it in line with the current demo instructions here, or keep the diff minimal?
  3. Terminology: The demo title currently uses "...Looking for Secrets", while draft PR Fix and narrow terms for better scoping #3592 changes the terminology in this area toward "authenticators". Should this update stay aligned with the current master, or follow the wording from that PR?

I would like to work on this. Happy to be assigned.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions