Tuesday, June 4, 2013

IG Learner Challenge #1


*SPOILERS* Highlight to read.
The first challenge was fairly simple if you know how to access the android logs -- or even exactly what they are. I, unfortunately, did not. I did some research on what the logs were and came up with the understanding that they were a global resource that applications could dump output into for debugging and logging purposes. While the latter part of that is self explanatory (I guessed as much but I wanted to be sure), the global part is important since that means there is one log to rule them all. I didn't have to search for the app's individual log, but instead could pull directly from the global log. I used ADB to get the log with the command "adb logcat > log_android.txt". This pulls the log from your phone and writes it in log_android.txt. The only issue with this method is that it is slow, taking hours to gather the full log. However, you don't need the full log, just a few recent additions to it, so you can cut it off after a few minutes of downloading. I then searched the log (in a standard text editor using ctrl-f) for the phrase "com.intrepidusgroup.learner" since that is the system name of the application. I found the process ID associated with the app (just the number next to "com.intrepidusgroup.learner") and searched for that instead since the full name doesn't always appear next to the log entries. I looked through the log finding all instances of the process ID until I found a fairly distinctive patch of log entries with one of them containing the code that let me proceed.
NOTE: the passphrase is procedurally generated, meaning it changes if you restart the app, so you must do all of this without killing the app.


Note from Max Sobell, Intrepidus Security Consultant: "The log can take "hours" to gather fully because it's always being appended to. I believe the Android OS keeps a rotating portion of the log. When you say "adb logcat" you're getting that portion, plus the things that are appended while the pipe stays open. So, if you run it for hours, you will get hours of logging. If you run it for 1 second, you will get 1 second + the stored logs."

This would suggest that you only need to run it for as long as it takes to press Lesson 1. Thanks Max!

No comments:

Post a Comment