{"id":19938,"date":"2016-09-29T13:15:59","date_gmt":"2016-09-29T20:15:59","guid":{"rendered":"https:\/\/www.paloaltonetworks.com\/blog\/?p=19938"},"modified":"2016-10-03T07:50:09","modified_gmt":"2016-10-03T14:50:09","slug":"unit42-labyrenth-capture-the-flag-ctf-mobile-track-solutions","status":"publish","type":"post","link":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/2016\/09\/unit42-labyrenth-capture-the-flag-ctf-mobile-track-solutions\/","title":{"rendered":"LabyREnth Capture the Flag (CTF): Mobile Track Solutions"},"content":{"rendered":"<p>Welcome back to our blog series where we reveal the\u00a0solutions\u00a0to\u00a0<a href=\"https:\/\/www.paloaltonetworks.com\/blog\/2016\/07\/unit42-announcing-the-labyrenth-capture-the-flag-ctf-challenge\/\">LabyREnth, the Unit 42 Capture the Flag (CTF)<\/a>\u00a0challenge. We\u2019ll be revealing the\u00a0solutions\u00a0to one challenge track per week. Next up, the Mobile track.<\/p>\n<h3>Mobile 1 Challenge: This is your last chance, choose wisely!<\/h3>\n<p><em>Challenge Created By: Jeff White <\/em><a href=\"https:\/\/twitter.com\/noottrak\" rel=\"nofollow,noopener\" ><em>@noottrak<\/em><\/a><\/p>\n<p>We are given an iOS app for this challenge. When we run it in the emulator, we have some squares to touch. If we select a correct square it turns green, if we select a wrong one, it turns yellow; if we touch a wrong one again, it turns red and we lose.<!--more--><\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-1.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:90%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-19941 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-1-500x450.png\" alt=\"labyrenth_mobile-1\" width=\"500\" height=\"450\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-1-500x450.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-1-230x207.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-1-333x300.png 333w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-1-44x40.png 44w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-1.png 570w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>The goal is to turn all the squares green to win and get the flag. We could just play the game and get lucky, or we could try and reverse the program to obtain the key. If we open the binary in IDA we can browse through the functions and quickly find an interesting function that stands out. Specifically, one of them is moving a long array of bytes to incrementing offsets of RDX at the beginning of the function. If we push \u2018R\u2019 on each byte in IDA, we can see that the key is being moved.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-2.png\"><div style=\"max-width:100%\" data-width=\"357\"><span class=\"ar-custom\" style=\"padding-bottom:110.64%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-19944 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-2.png\" alt=\"labyrenth_mobile-2\" width=\"357\" height=\"395\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-2.png 357w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-2-230x254.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-2-271x300.png 271w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-2-36x40.png 36w\" sizes=\"auto, (max-width: 357px) 100vw, 357px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: left;\">PAN{EZE_S41d_Th15_w4s_Ea5y}<\/p>\n<h3>Mobile 2 Challenge: Multiple choice, you say?<\/h3>\n<p><em>Challenge Created By: Juan Cortes <\/em><a href=\"https:\/\/twitter.com\/kongo_86\" rel=\"nofollow,noopener\" ><em>@kongo_86<\/em><\/a><\/p>\n<p>We are given an APK file \u2018EZfill.apk\u2019. To start analyzing this we can either unzip it using a zip tool or use apktool so we can look at the resources, Manifest file, and the smali code. I prefer the apktool.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-3.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:53.4%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-19947 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-3-500x267.png\" alt=\"labyrenth_mobile-3\" width=\"500\" height=\"267\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-3-500x267.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-3-230x123.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-3-768x410.png 768w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-3-510x272.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-3-75x40.png 75w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-3.png 975w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>Examining the AndroidManifest.xml file reveals this is a rather small APK with one main activity.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-4.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:23.4%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-19950 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-4-500x117.png\" alt=\"labyrenth_mobile-4\" width=\"500\" height=\"117\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-4-500x117.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-4-230x54.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-4-768x180.png 768w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-4-510x120.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-4-170x40.png 170w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-4.png 975w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>The next step will be to load our APK into our emulator.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-5.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:42.8%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-19953 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-5-500x214.png\" alt=\"labyrenth_mobile-5\" width=\"500\" height=\"214\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-5-500x214.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-5-230x99.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-5-768x329.png 768w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-5-510x219.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-5-93x40.png 93w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-5.png 975w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>Our app shows up in our app\u2019s list:<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-6.png\"><div style=\"max-width:100%\" data-width=\"178\"><span class=\"ar-custom\" style=\"padding-bottom:87.08%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-19956 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-6.png\" alt=\"labyrenth_mobile-6\" width=\"178\" height=\"155\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-6.png 178w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-6-46x40.png 46w\" sizes=\"auto, (max-width: 178px) 100vw, 178px\" \/><\/span><\/div><\/a><\/p>\n<p>Opening the app gives a login screen. Let\u2019s input some fake data and see what we get:<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-7.png\"><div style=\"max-width:100%\" data-width=\"390\"><span class=\"ar-custom\" style=\"padding-bottom:163.59%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-19959 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-7.png\" alt=\"labyrenth_mobile-7\" width=\"390\" height=\"638\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-7.png 390w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-7-230x376.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-7-183x300.png 183w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-7-24x40.png 24w\" sizes=\"auto, (max-width: 390px) 100vw, 390px\" \/><\/span><\/div><\/a><\/p>\n<p>Seems the app is doing some checking for the email and password. At this point we can start analyzing the app\u2019s code. We can go straight into viewing smali code or we can use <a href=\"http:\/\/bytecodeviewer.com\/\" rel=\"nofollow,noopener\" >Bytecodeviewer<\/a>.<\/p>\n<p>By examining the code, we can see decompiled code in java. We immediately notice a function that takes an array of char as a parameter and returns an array of char. Inside that function we have an array of int\u2019s, which if we were to guess, is the encoded flag. We need to find where this function is being called from and the char array that is passed as an argument. In order to trace it back, we need to look for the onCreate function. This is the first callback when an Android application is started. If you recall from loading the app into the emulator, we saw a button so this leads us to believe a function handles the action of clicking it. Inside the onCreate function we see setOnClickListener. If we follow what is passed to setOnClickListener, it points to a class \u2018b\u2019 which has the function OnClick.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-8.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:72.8%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-19962 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-8-500x364.png\" alt=\"labyrenth_mobile-8\" width=\"500\" height=\"364\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-8-500x364.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-8-230x167.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-8-412x300.png 412w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-8-55x40.png 55w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-8.png 515w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>The onClick calls back to a function in CupsLogin. Since the code is slightly obfuscated and a bit hard to trace, we\u2019ll focus on key points in order to trace this. We noticed these two little functions:<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-9.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:15.4%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-19965 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-9-500x77.png\" alt=\"labyrenth_mobile-9\" width=\"500\" height=\"77\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-9-500x77.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-9-230x35.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-9-510x78.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-9-240x37.png 240w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-9.png 553w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-10.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:14.4%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-19968 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-10-500x72.png\" alt=\"labyrenth_mobile-10\" width=\"500\" height=\"72\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-10-500x72.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-10-230x33.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-10-510x73.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-10-240x34.png 240w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-10.png 571w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>Assuming the check for the char \u2018@\u2019 and length check of 4, we can conclude that it is checking the email and\/or password. Tracing this back, we can see that is being used in private void m().<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-11.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:29.2%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-19971 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-11-500x146.png\" alt=\"labyrenth_mobile-11\" width=\"500\" height=\"146\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-11-500x146.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-11-230x67.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-11-768x224.png 768w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-11-510x149.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-11-137x40.png 137w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-11.png 834w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>Inspecting that code inside that function reveals that the \u2018string\u2019 &amp; \u2018string2\u2019 is being passed to an object.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-12.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:18.8%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-19974 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-12-500x94.png\" alt=\"labyrenth_mobile-12\" width=\"500\" height=\"94\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-12-500x94.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-12-230x43.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-12-510x96.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-12-213x40.png 213w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-12.png 665w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>The object being created extends AsyncTask. According to <a href=\"https:\/\/developer.android.com\/reference\/android\/os\/AsyncTask.html\" rel=\"nofollow,noopener\" >Android\u2019s documentation on AsyncTask<\/a>, when executed, it goes thru four steps.<\/p>\n<p>Inside this class were some more checks in regards to chars. Analyzing the code, we see that doInBackground calls function \u2018a\u2019. Inside this function we see a call too:<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-13.png\"><div style=\"max-width:100%\" data-width=\"469\"><span class=\"ar-custom\" style=\"padding-bottom:112.15%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-19977 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-13.png\" alt=\"labyrenth_mobile-13\" width=\"469\" height=\"526\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-13.png 469w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-13-230x258.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-13-267x300.png 267w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-13-36x40.png 36w\" sizes=\"auto, (max-width: 469px) 100vw, 469px\" \/><\/span><\/div><\/a><\/p>\n<p>Analyzing that function, we can see that it is doing checks and building an array of char and then passing it to a function. Let\u2019s see what values it expects.<\/p>\n<p>After spending time figuring out what char values are expected, we can statically determine a few values for the password:<\/p>\n<pre class=\"lang:default decode:true\">key = [\u2018@\u2019, ?, ?, \u2018u\u2019, \u2018I\u2019, \u2018d\u2019, ?]<\/pre>\n<p>For the remaining chars, we can write a python script to brute force it. Don\u2019t forget to transpose the decoding function we found earlier into python. Below is a sample script to decode this.<\/p>\n<pre class=\"lang:default decode:true\">def decode(key):\r\n\r\n   secret = [] #new char[66];\r\n   flag = [453, 431, 409, 342, 318, 293, 460, 273, 383, 369, 374, 466, 261, \r\n   380, 513, 267, 301, 266, 310, 437, 260, 325, 379, 333, 454, 350, 345, \r\n   460, 293, 303, 289, 290, 438, 373, 264, 309, 351]\r\n\r\n   key = bytearray(key)\r\n   kidx = 0\r\n   for f in flag:\r\n       t = f - 2\r\n       t = ((key[kidx] - 19 + 86) ^ t) &gt;&gt; 2\r\n       secret.append(t)\r\n       kidx = kidx + 1\r\n       if kidx == len(key):\r\n           kidx = 0\r\n\r\n   return secret\r\n\r\ndef char2enum():\r\n   x =[]\r\n   for a in range(32,127):\r\n       t = a &amp; 0xf ^ a\r\n       if t == 96:\r\n           x.append(a)\r\n\r\n   return x\r\n\r\ndef char1_6enum():\r\n   chars = []\r\n   for a in range(32,127):\r\n       for b in range(32,127):\r\n           if a ^ b == 21:\r\n               if [chr(a),chr(b)] in chars:\r\n                   continue\r\n               chars.append([chr(a),chr(b)])\r\n\r\n   return chars\r\n\r\n\r\nchar2 = char2enum()\r\nchar16 = char1_6enum()\r\n\r\nkey  = ['@', ' ', ' ', 'u', 'i', 'd', ' ']\r\n\r\nfor c1 in char2:\r\n   for c in char16:\r\n       key[2] = c1\r\n       key[1] = c[0]\r\n       key[6] = c[1]\r\n       test = decode(key)\r\n       k = \"\".join(chr(k) for k in bytearray(key))\r\n       flg = \"\".join(chr(t) for t in test)\r\n       print \"%s:\\t%s\" % (k,flg)\r\n<\/pre>\n<p>This will generate about 1,500 different variations. We can then grep for lines that have \u2018PAN{\u2018 and that slims it down to 16. Interestingly enough, we get the flag with eight different keys.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-14.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:57.8%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-19980 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-14-500x289.png\" alt=\"labyrenth_mobile-14\" width=\"500\" height=\"289\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-14-500x289.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-14-230x133.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-14-768x443.png 768w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-14-510x294.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-14-69x40.png 69w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-14.png 892w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>If we enter any of the right combos in the app we get:<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-15.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:165.2%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-19983 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-15-500x826.png\" alt=\"labyrenth_mobile-15\" width=\"500\" height=\"826\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-15-500x826.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-15-230x380.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-15-182x300.png 182w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-15-24x40.png 24w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-15.png 568w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: left;\">PAN{da_cups_is_halfEmpty_||_halfFull}<\/p>\n<h3>Mobile 3 Challenge: This executable can be run on any of the 15 BEST phones in circulation!<\/h3>\n<p><em>Challenge Created By: Josh Grunzweig <\/em><a href=\"https:\/\/twitter.com\/jgrunzweig\" rel=\"nofollow,noopener\" ><em>@jgrunzweig<\/em><\/a><em>\u00a0<\/em><\/p>\n<p>For this particular challenge, users are given an application created for the Windows mobile platform. There are a couple of ways to go about solving this challenge; however, approaching it statically is probably the easiest versus setting up the Microsoft Windows mobile emulator or debugging the code on an actual phone. Should the user run the application in an emulated environment, they are presented with the following:<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-16_Figure-1.png\"><div style=\"max-width:100%\" data-width=\"477\"><span class=\"ar-custom\" style=\"padding-bottom:183.23%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-19986 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-16_Figure-1.png\" alt=\"labyrenth_mobile-16_figure-1\" width=\"477\" height=\"874\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-16_Figure-1.png 477w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-16_Figure-1-230x421.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-16_Figure-1-164x300.png 164w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-16_Figure-1-22x40.png 22w\" sizes=\"auto, (max-width: 477px) 100vw, 477px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\"><em>Figure 1 Application running in emulated environment<\/em><\/p>\n<p>Looking at the provided binary, if we unzip the file two times, we\u2019re presented with the following files:<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-17_Figure-2.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:53%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-19989 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-17_Figure-2-500x265.png\" alt=\"labyrenth_mobile-17_figure-2\" width=\"500\" height=\"265\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-17_Figure-2-500x265.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-17_Figure-2-230x122.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-17_Figure-2-768x408.png 768w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-17_Figure-2-510x271.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-17_Figure-2-75x40.png 75w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-17_Figure-2.png 974w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\"><em>Figure 2 Unzipped files from Windows mobile application<\/em><\/p>\n<p>The executable in question is a .NET binary, which we can decompile using a program such as <a href=\"https:\/\/github.com\/0xd4d\/dnSpy\" rel=\"nofollow,noopener\" >dnSpy<\/a>. Looking at the underlying code, we can see that obfuscation has been implemented to make it more difficult to read and understand.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-18_Figure-3.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:53.4%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-19992 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-18_Figure-3-500x267.png\" alt=\"labyrenth_mobile-18_figure-3\" width=\"500\" height=\"267\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-18_Figure-3-500x267.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-18_Figure-3-230x123.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-18_Figure-3-768x410.png 768w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-18_Figure-3-510x273.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-18_Figure-3-75x40.png 75w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-18_Figure-3.png 975w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\"><em>Figure 3 Decompiled code in Windows mobile application<\/em><\/p>\n<p>Stepping through the code and renaming functions along the way allows us to get an understanding of what is going on. The code performs the following:<\/p>\n<ol>\n<li>The code checks to see if the SystemProductName is \u2018Virtual\u2019, indicating it is running within an emulator.<\/li>\n<li>A Boolean check is performed against a function that always returns True, which must be manually changed.<\/li>\n<li>The screen resolution is checked to look for a width greater than 1000 and a height of 5.<\/li>\n<\/ol>\n<p>Should all of these conditions be met, the code execution will proceed. Otherwise, the user is presented with a response of \u2018Hounds Released!\u2019.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-19_Figure-4.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:54.4%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-19995 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-19_Figure-4-500x272.png\" alt=\"labyrenth_mobile-19_figure-4\" width=\"500\" height=\"272\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-19_Figure-4-500x272.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-19_Figure-4-230x125.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-19_Figure-4-510x277.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-19_Figure-4-74x40.png 74w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-19_Figure-4.png 548w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\"><em>Figure 4 One of the many error messages encountered<\/em><\/p>\n<p>If the user makes it this far, the code will start looking at the provided user input to determine if the correct key is provided. The length of the key is first inspected. If the key does not have a length of 12, a random error message will be returned. However, should it have a length of 12, code execution proceeds. The code then makes the following checks:<\/p>\n<ol>\n<li>Checks to see if the SystemProductName starts with a \u2018V\u2019, which it should since our previous check was looking for \u2018Virtual\u2019. The 6th byte of this string (\u2018a\u2019) is stored to later be used in the key.<\/li>\n<li>The first byte of the provided key is checked for an ordinal of 66, or the character \u2018B\u2019.<\/li>\n<li>The embedded MrBurns.jpg file is loaded, and the 7th byte is read and later used in the key (\u2018J\u2019).<\/li>\n<li>The SystemManufacturer is checked for a length of 5 and the last three characters of \u2018kia\u2019. Based on all possible manufacturers, we can conclude that this code is looking for a string of \u2018Nokia\u2019. The first two characters are stored to a variable and later used in the key (\u2018No\u2019).<\/li>\n<li>The 2<sup>nd <\/sup>through 4<sup>th<\/sup> characters of the provided key are XORed against a key and checked for a result of \u2018DIE\u2019. Reversing this process allows us to conclude the application is looking for an inputted string of \u2018AdP\u2019 at bytes 2 through 4 of the provided key.<\/li>\n<li>The 5<sup>th<\/sup> through 8<sup>th<\/sup> characters of the provided key are checked against a long embedded string, looking for a value of \u2018uzzl\u2019.<\/li>\n<li>The same checks are performed against the 9<sup>th<\/sup> and 10<sup>th<\/sup> characters, looking for \u20183\u2019 and \u2018r\u2019 respectively.<\/li>\n<li>Finally, further checks are made against the last two bytes of the provided key, looking for \u2018!\u2019 and \u2018?\u2019.<\/li>\n<li>An embedded Garbage.jpg is read and attempted to be decrypted against the provided key if all of these conditions are met.<\/li>\n<\/ol>\n<p>In addition to everything encountered, various red herring code snippets are included to waste the reverser\u2019s time. Also, string obfuscation was used via the l1() and llll() functions, which unhex and XOR strings respectively. To make things slightly more difficult, function overloading is also used to make reversing a bit trickier.<\/p>\n<p>Taking everything learned, we can conclude that the application is looking for a key of length 12. The string of \u2018aNoJ\u2019 is then concatenated at the end. Based on the checks encountered, we can conclude that the provided key must be that of \u2018BAdPuzzl3r!?\u2019. Using this key gives us the following result:<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-20_Figure-5.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:182.8%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-19998 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-20_Figure-5-500x914.png\" alt=\"labyrenth_mobile-20_figure-5\" width=\"500\" height=\"914\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-20_Figure-5-500x914.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-20_Figure-5-230x421.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-20_Figure-5-164x300.png 164w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-20_Figure-5-22x40.png 22w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-20_Figure-5.png 573w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\"><em>Figure 5 Key after using correct input string<\/em><\/p>\n<p>PAN{Th4t's_My_S3cr3t_N0boDy_Def34ts_th3_HOUNDS}<\/p>\n<h3>Mobile 4 Challenge: (walk or swipe) and (baby and you and cry)<\/h3>\n<p><em>Challenge Created By: Juan Cortes <\/em><a href=\"https:\/\/twitter.com\/kongo_86\" rel=\"nofollow,noopener\" ><em>@kongo_86<\/em><\/a><\/p>\n<p>For this mobile challenge we are given an APK named \u2018Swip3r\u2019. As with the previous APK, we start our analysis by using apktool and load it up into our emulator to get an understanding of the application. We will use Android\u2019s adb tool to install the application. Below are screenshots highlighting these steps.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-21.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:64.8%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20001 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-21-500x324.png\" alt=\"labyrenth_mobile-21\" width=\"500\" height=\"324\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-21-500x324.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-21-230x149.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-21-768x498.png 768w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-21-463x300.png 463w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-21-62x40.png 62w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-21.png 853w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(APK Tool)<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-22.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:46.6%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20004 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-22-500x233.png\" alt=\"labyrenth_mobile-22\" width=\"500\" height=\"233\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-22-500x233.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-22-230x107.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-22-768x358.png 768w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-22-510x237.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-22-86x40.png 86w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-22.png 975w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(adb install)<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-23.png\"><div style=\"max-width:100%\" data-width=\"196\"><span class=\"ar-custom\" style=\"padding-bottom:190.82%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20007 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-23.png\" alt=\"labyrenth_mobile-23\" width=\"196\" height=\"374\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-23.png 196w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-23-157x300.png 157w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-23-21x40.png 21w\" sizes=\"auto, (max-width: 196px) 100vw, 196px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(App icon in the emulator)<\/p>\n<p>We continue by doing a basic dynamic analysis of the application. This gives us a better understanding of what the challenge may require in order to be solved. The app launches with a button that says \u201cGive me the child\u201d. Clicking it changes the screen to the character \u2018Jared\u2019 with \u201cYour eyes can se so cruel\u2026\u201d on the bottom of the screen. Clicking on the screen doesn\u2019t appear to do anything. As the name of the APK suggest, if we swipe we see that the screen changes to a baby crying with the text \u201c0oo0oopps!: 1\u201d. If we continue swiping the screen in a different direction, we see the text \u201c\u201c0oo0oopps: 2\u201d. Once again swiping increases that number after the text. So it appears that the app tracks the number of times we swipe and as it suggests we are doing something wrong.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-24.png\"><div style=\"max-width:100%\" data-width=\"275\"><span class=\"ar-custom\" style=\"padding-bottom:157.09%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20010 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-24.png\" alt=\"labyrenth_mobile-24\" width=\"275\" height=\"432\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-24.png 275w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-24-230x361.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-24-191x300.png 191w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-24-25x40.png 25w\" sizes=\"auto, (max-width: 275px) 100vw, 275px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(Starting the app)<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-25.png\"><div style=\"max-width:100%\" data-width=\"421\"><span class=\"ar-custom\" style=\"padding-bottom:118.76%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20013 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-25.png\" alt=\"labyrenth_mobile-25\" width=\"421\" height=\"500\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-25.png 421w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-25-230x273.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-25-253x300.png 253w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-25-34x40.png 34w\" sizes=\"auto, (max-width: 421px) 100vw, 421px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(Jared appears)<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-26.png\"><div style=\"max-width:100%\" data-width=\"345\"><span class=\"ar-custom\" style=\"padding-bottom:127.54%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20016 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-26.png\" alt=\"labyrenth_mobile-26\" width=\"345\" height=\"440\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-26.png 345w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-26-230x293.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-26-235x300.png 235w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-26-31x40.png 31w\" sizes=\"auto, (max-width: 345px) 100vw, 345px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(Crying baby)<\/p>\n<p>At this point, we have some understanding of the app due to our dynamic analysis. Let\u2019s perform a static analysis of the APK structure and see if we find anything interesting.<\/p>\n<p>The AndroidManifest.xml, while an important file for APK analysis, reveals nothing interesting in this particular app\u2019s manifest. However, if we go into the lib folder, we see the following two folders and each of them holds a native library: \u201clibswiipiin.so\u201d. My guess is this is not your typical android library and is a custom library.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-27.png\"><div style=\"max-width:100%\" data-width=\"496\"><span class=\"ar-custom\" style=\"padding-bottom:75.81%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20019 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-27.png\" alt=\"labyrenth_mobile-27\" width=\"496\" height=\"376\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-27.png 496w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-27-230x174.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-27-396x300.png 396w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-27-53x40.png 53w\" sizes=\"auto, (max-width: 496px) 100vw, 496px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(Libraries)<\/p>\n<p>At this point, we can either load the library on IDA or attempt to decompile the APK\u2019s code using Bytecode Viewer. Why not both?<\/p>\n<p>Let\u2019s start with looking at the decompiled Java code. The application only has two classes: MainActivity.class &amp; Swip3r.class. The Swip3r class is rather small and we see that it sets the title and starts the activity \u2018MainActivity\u201d.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-28.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:92.4%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20022 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-28-500x462.png\" alt=\"labyrenth_mobile-28\" width=\"500\" height=\"462\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-28-500x462.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-28-230x213.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-28-325x300.png 325w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-28-43x40.png 43w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-28.png 609w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(Swip3r.class)<\/p>\n<p>Now we\u2019ll examine the code in the MainActivity.class. We can quickly see the interesting strings we observed from our basic dynamic analysis. We see the app attempts to load the library: \u2018swiipiin\u2019. Lastly, at the end of the class file, we see two native methods being called: \u2018wel()\u2019 and \u2018well()\u2019. One which takes no parameters and the other takes eight parameters.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-29.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:29.4%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20025 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-29-500x147.png\" alt=\"labyrenth_mobile-29\" width=\"500\" height=\"147\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-29-500x147.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-29-230x68.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-29-768x226.png 768w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-29-510x150.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-29-136x40.png 136w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-29.png 975w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(oops strings)<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-30.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:27%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20028 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-30-500x135.png\" alt=\"labyrenth_mobile-30\" width=\"500\" height=\"135\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-30-500x135.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-30-230x62.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-30-510x138.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-30-148x40.png 148w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-30.png 534w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(library loading)<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-31.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:11.6%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20031 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-31-500x58.png\" alt=\"labyrenth_mobile-31\" width=\"500\" height=\"58\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-31-500x58.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-31-230x27.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-31-768x89.png 768w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-31-510x59.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-31-240x28.png 240w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-31.png 975w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(Native Methods)<\/p>\n<p>At this point we know that app uses the native library with the two native methods. We focus on finding where these two methods are being used and then moving to analyze the native library methods. The easy crude way is to just copy the decompiled code into Notepad++ and search for these native methods. We find that \u2018wel()\u2019 is used once in the OnCreate() method and \u2018well()\u2019 is used three times inside the onFling() method. Lastly, we can see that both methods after being called, returns a value that is being used to display text.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-32.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:75.2%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20034 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-32-500x376.png\" alt=\"labyrenth_mobile-32\" width=\"500\" height=\"376\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-32-500x376.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-32-230x173.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-32-399x300.png 399w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-32-53x40.png 53w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-32.png 759w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(wel())<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-33.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:75.2%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20037 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-33-500x376.png\" alt=\"labyrenth_mobile-33\" width=\"500\" height=\"376\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-33-500x376.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-33-230x173.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-33-399x300.png 399w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-33-53x40.png 53w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-33.png 740w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>(well())<\/p>\n<p>Let\u2019s switch over to IDA for a bit and examine the native library. Under exports we see the native methods we previously found in our decompiled Java code. Examining ARM assembly hurts my eyes more than looking at x86 assembly, but we will attempt to analyze these methods a bit. By looking at the code, we can tell that its loading a string \u201cYour eyes can se so cruel\u201d and then returns. If you remember, we saw this text when we loaded the app in our emulator. It coincides with the fact that this method, after being called, returns a value that is used as a string in displaying text. Looking at the other method \u2018well()\u2019 we can see it calls a function (Note: I have renamed this function) \u2018well_func1_F8C\u2019. Looking at that function and using IDA\u2019s \u2018Xrefs from\u2019 we see it calls ten other functions. If you look at those ten functions, most of them have a loop with some sort of bitwise operation, which tells me there is some decoding going on. As I mentioned previously, looking at ARM assembly is not as pleasant as x86. We take another approach and examine the decompiled Java code.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-34.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:19.8%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20040 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-34-500x99.png\" alt=\"labyrenth_mobile-34\" width=\"500\" height=\"99\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-34-500x99.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-34-230x46.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-34-768x153.png 768w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-34-510x101.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-34-201x40.png 201w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-34.png 975w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(IDA Exports)<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-35.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:25.8%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20043 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-35-500x129.png\" alt=\"labyrenth_mobile-35\" width=\"500\" height=\"129\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-35-500x129.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-35-230x59.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-35-768x198.png 768w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-35-510x131.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-35-155x40.png 155w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-35.png 975w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(Xrefs)<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-36.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:66.6%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20046 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-36-500x333.png\" alt=\"labyrenth_mobile-36\" width=\"500\" height=\"333\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-36-500x333.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-36-230x153.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-36-451x300.png 451w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-36-60x40.png 60w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-36.png 684w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(Example Func Loop)<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-37.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:54.8%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20049 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-37-500x274.png\" alt=\"labyrenth_mobile-37\" width=\"500\" height=\"274\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-37-500x274.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-37-230x126.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-37-510x280.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-37-73x40.png 73w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-37.png 759w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(Example2 Func Loop)<\/p>\n<p>The nice thing about ByteCode Viewer is that you get options from different Java decompilers. For example, if we focus on the \u2018OnFling()\u2019 method using JD-GUI decompiler, we get nasty nested while loops. If we choose Procyon decompiler, we get a nice set of nested IF...ELSE statements which is far better for reading the code. If you copy over the decompiled code to Notepad++, it makes it easier to collapse code and see a \u2018big picture\u2019 of what\u2019s going on.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-38.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:28.2%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20052 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-38-500x141.png\" alt=\"labyrenth_mobile-38\" width=\"500\" height=\"141\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-38-500x141.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-38-230x65.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-38-768x217.png 768w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-38-510x144.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-38-142x40.png 142w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-38.png 975w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(Big picture)<\/p>\n<p>A quick <a href=\"https:\/\/developer.android.com\/reference\/android\/view\/GestureDetector.OnGestureListener.html#onFling(android.view.MotionEvent,%20android.view.MotionEvent,%20float,%20float)\" rel=\"nofollow,noopener\" >Google search<\/a> will help you understand what is the point of the <a href=\"https:\/\/developer.android.com\/reference\/android\/view\/GestureDetector.OnGestureListener.html#onFling(android.view.MotionEvent,%20android.view.MotionEvent,%20float,%20float)\" rel=\"nofollow,noopener\" >OnFling() <\/a>method as well as its parameters. This will help us understand what we need to do in order to simplify the completion of this challenge. At this point, we can break down the code looking at each IF and ELSE IF and determine what values are needed. Starting with the first set of conditional statements we see that the code is checking the values from motionEvent.getY(), motionEvent.getX(), motionEvent2.getY(), motionEvent2.getX(). These values are used to detect a motion on a screen on using the X and Y axis, which in turn detect when the user moves UP, DOWN, LEFT, RIGHT. Inside each conditional statement we see that the app sets several int\u2019s with values that are checked throughout this OnFling() method. Knowing that we want the application to call the native method \u2018well()\u2019 we can begin analyzing what values should be set with the right swipe motions as well as stay away from the motions that set the values which calls the \u201c0oo0oopps!\u201d message. After studying the code, we can conclude that the right combination is: UP, LEFT, DOWN, RIGHT, UP. Enjoying a handful of Jared pictures the last image holds the key: PAN{jAr3d_sayz_'swwip3r_!NO!_swipp11nn'}<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-39.png\"><div style=\"max-width:100%\" data-width=\"319\"><span class=\"ar-custom\" style=\"padding-bottom:117.87%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20055 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-39.png\" alt=\"labyrenth_mobile-39\" width=\"319\" height=\"376\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-39.png 319w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-39-230x271.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-39-255x300.png 255w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-39-34x40.png 34w\" sizes=\"auto, (max-width: 319px) 100vw, 319px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(Begin)<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-40.png\"><div style=\"max-width:100%\" data-width=\"267\"><span class=\"ar-custom\" style=\"padding-bottom:115.36%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20058 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-40.png\" alt=\"labyrenth_mobile-40\" width=\"267\" height=\"308\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-40.png 267w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-40-230x265.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-40-260x300.png 260w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-40-35x40.png 35w\" sizes=\"auto, (max-width: 267px) 100vw, 267px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(UP)<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-41.png\"><div style=\"max-width:100%\" data-width=\"250\"><span class=\"ar-custom\" style=\"padding-bottom:119.6%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20061 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-41.png\" alt=\"labyrenth_mobile-41\" width=\"250\" height=\"299\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-41.png 250w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-41-230x275.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-41-33x40.png 33w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(LEFT)<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-42.png\"><div style=\"max-width:100%\" data-width=\"253\"><span class=\"ar-custom\" style=\"padding-bottom:117.39%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20064 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-42.png\" alt=\"labyrenth_mobile-42\" width=\"253\" height=\"297\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-42.png 253w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-42-230x270.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-42-34x40.png 34w\" sizes=\"auto, (max-width: 253px) 100vw, 253px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(DOWN)<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-43.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:119%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20067 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-43-500x595.png\" alt=\"labyrenth_mobile-43\" width=\"500\" height=\"595\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-43-500x595.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-43-230x274.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-43-252x300.png 252w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-43-34x40.png 34w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-43.png 505w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(RIGHT)<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-44.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:100.4%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20070 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-44-500x502.png\" alt=\"labyrenth_mobile-44\" width=\"500\" height=\"502\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-44-500x502.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-44-100x100.png 100w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-44-230x231.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-44-299x300.png 299w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-44-40x40.png 40w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-44-32x32.png 32w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-44-64x64.png 64w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-44-96x96.png 96w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-44-128x128.png 128w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-44.png 646w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(UP)<\/p>\n<p>Quick little easter-egg, if you notice the app has detection for a method \u2018onLongPress()\u2019. Hence if you hold down on the screen\u2019s emulator a nice little string comes on top of the screen. This appears to be base64, however is three different base64 strings, each of which decode to: https:\/\/goo.gl\/VgmUUy. This is a Google shortened URL which leads to a YouTube video of the Labyrinth song \u201cWithin you \u2013 David Bowie 1986.\u201d Unfortunately the Internet gods have since removed this video. Interestingly there were 26 clicks made to this URL all from different countries. Note: the real number is 27, since one click was done during testing. <a href=\"https:\/\/goo.gl\/#analytics\/goo.gl\/VgmUUy\/all_time\" rel=\"nofollow,noopener\" >Get more information about the URL.<\/a><\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-45.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:54.8%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20073 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-45-500x274.png\" alt=\"labyrenth_mobile-45\" width=\"500\" height=\"274\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-45-500x274.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-45-230x126.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-45-510x280.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-45-73x40.png 73w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-45.png 534w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(easter-egg)<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-46.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:60.8%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20076 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-46-500x304.png\" alt=\"labyrenth_mobile-46\" width=\"500\" height=\"304\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-46-500x304.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-46-230x140.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-46-493x300.png 493w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-46-66x40.png 66w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-46.png 528w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p style=\"text-align: center;\">(url decoded)<\/p>\n<p>PAN{jAr3d_sayz_'swwip3r_!NO!_swipp11nn'}<\/p>\n<h3>Mobile 5 Challenge: Can you escape the labyrinth with your life?<\/h3>\n<p><em>Challenge Created By: Jeff White <\/em><a href=\"https:\/\/twitter.com\/noottrak\" rel=\"nofollow,noopener\" ><em>@noottrak<\/em><\/a><\/p>\n<p>Similar to the first iOS challenge, we\u2019re provided with the ARM compiled binary and a simulator version.<\/p>\n<p>Looking through the simulator folders we can see a lot of images with ominous names such as \u201cdeath_01.jpg\u201d, \u201ctunnel_01.jpg\u201d, and \u201cwin_01.jpg\u201d. If we load the binary into IDA and look at the strings, we see some interesting messages with \u201cLOSE\u201d, \u201cWIN\u201d, and the start of a URL.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-47.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:46.4%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20079 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-47-500x232.png\" alt=\"labyrenth_mobile-47\" width=\"500\" height=\"232\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-47-500x232.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-47-230x107.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-47-768x356.png 768w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-47-510x237.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-47-86x40.png 86w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-47.png 899w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>We can also see multiple base64-encoded strings.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-47.2.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:61%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20142 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-47.2-500x305.png\" alt=\"labyrenth_mobile-47-2\" width=\"500\" height=\"305\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-47.2-500x305.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-47.2-230x140.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-47.2-768x468.png 768w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-47.2-492x300.png 492w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-47.2-66x40.png 66w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-47.2.png 902w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>Pulling the base64-encoded strings out and decoding them shows they are reversed words and sentences.<\/p>\n<pre class=\"lang:default decode:true\">The outside air washes over you.\r\nSunlight beams down and warms you.\r\nYou let out a sigh of relief.\r\nYou look back and the maze vanishes.\r\nStepping out of the maze, you live another day.\r\nA tear of joy streams down your face.\r\nThere was never any doubt of winning.\r\nYou chose...poorly.\r\nYour stomach feels like a pit, the last feeling you'll ever have.\r\nChills run down your spine as all of the air seeps out of the room.\r\nMommy?\r\nYou knew this was the wrong way...\r\nGulp..this is the end.\r\nDeath awaits you.\r\nYou pray for a quick death.\r\nYou peek around the right corner, the coast looks clear.\r\nYou quickly dive into the right tunnel.\r\nNoises of children echo from the right.\r\nA green mist rises from the tunnel.\r\nThis tunnel looks familiar, have you gone this way?\r\nYou feel a cold breath on your neck.\r\nThis tunnel looks promising...for the dead.\r\nYou scurry backwards, only to find a new room.\r\nThe sights of this room frieghten you.\r\nDoors begin to shut, but you quickly jump back.\r\nThe room fills with fog you think you went back.\r\nYou think best before moving forward, best to stay put.\r\nClaustrophobia is setting in.\r\nYou have a yearn for your mommy, but her ghost is all that's here.\r\nA light seems to beacon in the left tunnel.\r\nYou sprint to the door along the left.\r\nDid a shadow just cross the far door?\r\nEenie-meenie-minie-moe... giant trolls with no toes.\r\nIt feels warm in this direction.\r\nRunes begin to glow as you walk by.\r\nSmells of rotten flesh and fungus greet you.\r\nYou move forward to the next tunnel.\r\nA scream bellows from ahead, you run towards it.\r\nWhispers call you near.\r\nScratched arrows on the wall point forward.\r\nIs this the right way?\r\nYou step over corpses on your way.\r\nYou step silently ahead, listening to screams in the distance.\r\ndungeon\r\nlabyrinth\r\nevil\r\ncrystal\r\nhades\r\nbowie\r\nspace\r\ntreasure\r\nloot\r\nlost\r\nmaze\r\nsecret\r\n<\/pre>\n<p>Based on the strings, it looks like the app is some kind of game so let\u2019s go ahead and boot it up in a simulator and see what it does before we dive in. For a quick and simple simulation, you can use the website appetize.io for iOS or APK simulation.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-48.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:200.4%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20082 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-48-500x1002.png\" alt=\"labyrenth_mobile-48\" width=\"500\" height=\"1002\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-48-500x1002.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-48-230x461.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-48-150x300.png 150w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-48-20x40.png 20w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-48.png 611w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Using the arrow keys, we can navigate around the \u201cLabyrinth\u201d and see some of the base64-decoded strings on each screen.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-49.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:199.8%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20085 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-49-500x999.png\" alt=\"labyrenth_mobile-49\" width=\"500\" height=\"999\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-49-500x999.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-49-230x460.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-49-150x300.png 150w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-49-20x40.png 20w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-49.png 627w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>Eventually we fail and get our \u201c***LOSE***\u201d message.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-50.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:196.8%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20088 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-50-500x984.png\" alt=\"labyrenth_mobile-50\" width=\"500\" height=\"984\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-50-500x984.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-50-230x452.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-50-153x300.png 153w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-50-20x40.png 20w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-50.png 640w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>Resetting a few times, we eventually make our way out of the maze, which appears random since repeating the same steps would cause us to lose at different points.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-51.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:197.4%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20091 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-51-500x987.png\" alt=\"labyrenth_mobile-51\" width=\"500\" height=\"987\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-51-500x987.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-51-230x454.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-51-152x300.png 152w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-51-20x40.png 20w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-51.png 638w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>When you win, it says you have the \u201cHigh Score!\u201d and that you can submit your score to <a href=\"http:\/\/pansecretloot.com\" rel=\"nofollow,noopener\" >http:\/\/pansecretloot.com<\/a>. After clicking submit though, we\u2019re presented with the below message.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-52.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:41.2%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20094 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-52-500x206.png\" alt=\"labyrenth_mobile-52\" width=\"500\" height=\"206\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-52-500x206.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-52-230x95.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-52-768x317.png 768w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-52-510x210.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-52-97x40.png 97w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-52.png 769w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>The error message states that it was unable to resolve and \u201cno flag for you\u201d. Checking the domain pansecretloot.com, it indeed does not resolve so presumably this is what the message referred to. When I play the game again, we see it\u2019s using a different domain this time, <a href=\"http:\/\/panlostspace.com\" rel=\"nofollow,noopener\" >http:\/\/panlostspace.com<\/a>, which it states also cannot be resolved.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-53.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:198.2%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20097 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-53-500x991.png\" alt=\"labyrenth_mobile-53\" width=\"500\" height=\"991\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-53-500x991.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-53-230x456.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-53-151x300.png 151w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-53-20x40.png 20w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-53.png 634w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>Playing through a couple of times, this pattern just continues to repeat.<\/p>\n<pre class=\"lang:default decode:true \">http:\/\/pansecretloot.com\r\nhttp:\/\/panlostspace.com\r\nhttp:\/\/panlootdungeon.com\r\nhttp:\/\/panlostlost.com\r\nhttp:\/\/pansecretdungeon.com\r\nhttp:\/\/pandungeonbowie.com\r\n<\/pre>\n<p>If you recall from our base64 encoded strings, after all of the messages being displayed in the game is a short list of single words.<\/p>\n<pre class=\"lang:default decode:true \">dungeon\r\nlabyrinth\r\nevil\r\ncrystal\r\nhades\r\nbowie\r\nspace\r\ntreasure\r\nloot\r\nlost\r\nmaze\r\nsecret\r\n<\/pre>\n<p>You can easily see the correlation. It appears that two of the words are being appended to \u201chttp:\/\/pan\u201d to build a domain. Smells DGAish to me! If this is the final list of 12 words, and we know they can be next to each other (lostlost), then it\u2019s just 12^2 for the combinations, which is easily generated and checked.<\/p>\n<pre class=\"lang:default decode:true\">words = [\"dungeon\", \"labyrinth\", \"evil\", \"crystal\", \"hades\", \"bowie\", \"space\", \"treasure\", \"loot\", \"lost\", \"maze\", \"secret\"]\r\n\r\nfor i in words:\r\n\tcount = 0\r\n\twhile count &lt; len(words):\r\n\t\tprint \"pan\" + i + words[count] + \".com\"\r\n\t\tcount += 1\r\n<\/pre>\n<p>Iterating through the generated list and performing DNS lookups, we come across this gem.<\/p>\n<pre class=\"lang:default decode:true \">Host panbowietreasure.com not found: 3(NXDOMAIN)\r\nHost panbowieloot.com not found: 3(NXDOMAIN)\r\nHost panbowielost.com not found: 3(NXDOMAIN)\r\nHost panbowiemaze.com not found: 3(NXDOMAIN)\r\nHost panbowiesecret.com not found: 3(NXDOMAIN)\r\npanspacedungeon.com has address 52.43.46.197\r\nHost panspacelabyrinth.com not found: 3(NXDOMAIN)\r\nHost panspaceevil.com not found: 3(NXDOMAIN)\r\nHost panspacecrystal.com not found: 3(NXDOMAIN)\r\nHost panspacehades.com not found: 3(NXDOMAIN)\r\nHost panspacebowie.com not found: 3(NXDOMAIN)\r\nHost panspacespace.com not found: 3(NXDOMAIN)\r\n<\/pre>\n<p>Browsing to this domain, it just returns the string \u201cM4z3Cub3\".<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-54.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:34.8%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20100 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-54-500x174.png\" alt=\"labyrenth_mobile-54\" width=\"500\" height=\"174\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-54-500x174.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-54-230x80.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-54-510x178.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-54-115x40.png 115w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-54.png 525w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>So it seems the app is building domains from this wordlist but fails to progress because of resolution errors. What if we simply change our host lookup so that all of these domains resolve to the known live site?<\/p>\n<p>Appetize.io is great for quickly looking at an app, but it doesn\u2019t offer us anything in the way of debugging. Since I\u2019m not cool enough to have a physical iOS device that I can load this on, I\u2019ll need to figure out how to load this into a local simulator so that I can affect the domain resolution.<\/p>\n<p>The next part was slightly confusing so I\u2019ll explain it here to hopefully make someone\u2019s life easier. Basically, if you create an Xcode project and run it on a simulator, it generates an .app file for that simulated device. If you right click on the .app file under Products in Xcode, you can open the folder that contains your file, then simply move over the .app included with this challenge. The directory path looks like this:<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-55.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:62.4%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20103 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-55-500x312.png\" alt=\"labyrenth_mobile-55\" width=\"500\" height=\"312\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-55-500x312.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-55-230x144.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-55-481x300.png 481w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-55-64x40.png 64w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-55.png 742w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>The directory \u201clabyREnth_mobile5-XXX\u201d is the project name and then the generated device ID that was created in Xcode for our simulated device. Loading our simulator, we see the app we copied over, along with our empty project app.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-56.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:67.8%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20106 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-56-500x339.png\" alt=\"labyrenth_mobile-56\" width=\"500\" height=\"339\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-56-500x339.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-56-230x156.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-56-768x520.png 768w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-56-443x300.png 443w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-56-59x40.png 59w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-56.png 774w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>Now that we have the app running locally, we\u2019ll modify our \/etc\/hosts file with all of the domains we enumerated and point them all to the IP we resolved for panspacedungeon.com.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-58.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:46.6%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20112 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-58-500x233.png\" alt=\"labyrenth_mobile-58\" width=\"500\" height=\"233\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-58-500x233.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-58-230x107.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-58-768x359.png 768w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-58-510x238.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-58-86x40.png 86w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-58.png 844w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>Next, we\u2019ll run our app and navigate the game until we trigger the win condition.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-59.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:183%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20115 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-59-500x915.png\" alt=\"labyrenth_mobile-59\" width=\"500\" height=\"915\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-59-500x915.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-59-230x421.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-59-164x300.png 164w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-59-22x40.png 22w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-59.png 738w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>Success!<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-60.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:53.2%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20118 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-60-500x266.png\" alt=\"labyrenth_mobile-60\" width=\"500\" height=\"266\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-60-500x266.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-60-230x122.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-60-510x271.png 510w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-60-75x40.png 75w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-60.png 761w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>PAN{G3t_Sch1f7y}<\/p>\n<h3>Mobile 6 Challenge: This handheld is best handheld<\/h3>\n<p><em>Challenge Created By: Richard Wartell <\/em><a href=\"https:\/\/twitter.com\/wartortell\" rel=\"nofollow,noopener\" ><em>@wartortell<\/em><\/a><em>\u00a0<\/em><\/p>\n<p>For this challenge we\u2019re handed a file with an extension of .86p. Not exactly a common extension and the file is only 2kb, so let\u2019s open it in a hex editor:<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-61.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:93.6%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20121 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-61-500x468.png\" alt=\"labyrenth_mobile-61\" width=\"500\" height=\"468\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-61-500x468.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-61-230x215.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-61-768x719.png 768w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-61-320x300.png 320w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-61-43x40.png 43w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-61.png 975w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>Immediately we can see some strings that look interesting, but the first and most important is \u201c**TI86**\u201d. So maybe we\u2019re dealing with a TI86 assembly program? Let\u2019s try to find an emulator where we can run this.<\/p>\n<p><a href=\"https:\/\/wabbit.codeplex.com\/\" rel=\"nofollow,noopener\" >Wabbitemu<\/a> comes to the rescue here. Wabbitemu will allow us to run TI calculator assembly programs. Since this program is for a TI86 calculator, we install the TI86 ROM for the calculator. We can then load the program by opening OGMob.86p and running the following series of keys:<\/p>\n<pre class=\"lang:default decode:true\">2nd -&gt; CUSTOM -&gt; Asm( -&gt; ENTER -&gt; PRGM -&gt; NAMES -&gt; OGMob -&gt; )<\/pre>\n<p>This creates the line, Asm(OGMob), which is how you execute assembly programs on a TI86 calculator. When we execute the program, we get the following info:<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-62.png\"><div style=\"max-width:100%\" data-width=\"370\"><span class=\"ar-custom\" style=\"padding-bottom:218.11%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20124 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-62.png\" alt=\"labyrenth_mobile-62\" width=\"370\" height=\"807\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-62.png 370w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-62-230x502.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-62-138x300.png 138w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-62-18x40.png 18w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/><\/span><\/div><\/a><\/p>\n<p>Playing around with this by hitting some keys, it looks like the display changes based on key presses, but no matter what we keep getting back to a screen that says \u201cFAILURE\u201d. At this point, we need to start looking at this in a disassembler. Looking around for resources on reversing a TI86 binary, we find a <a href=\"https:\/\/www.omnimaga.org\/asm-language\/ida-pro\/\" rel=\"nofollow,noopener\" >decent blog post<\/a>.<\/p>\n<p>However, loading at the suggested addresses here doesn\u2019t work, but playing around in the Wabbitemu debugger shows us that the binary needs to be loaded at 0xD6FD. We can figure this out simply from trial and error, getting the bytes to match up with what is showing up in our debugger.<\/p>\n<p>Once this is loaded correctly, we can finally take a look at things in graph mode. The main graph of the program looks like this:<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-63.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:117.4%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20127 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-63-500x587.png\" alt=\"labyrenth_mobile-63\" width=\"500\" height=\"587\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-63-500x587.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-63-230x270.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-63-768x901.png 768w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-63-256x300.png 256w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-63-34x40.png 34w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-63.png 975w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>However, we have a lot of function calls that don\u2019t seem to go anywhere in IDA, though they point to places in the debugger. So if we Google the addresses with TI86, we find this <a href=\"https:\/\/github.com\/abbrev\/ti-86-asm\/blob\/master\/stranded\/ti86asm.inc\" rel=\"nofollow,noopener\" >link about the constants<\/a>. So it turns out that all of these are internal functions in calculator. By creating a new segment and storing our constants there, we can nicely label our IDB so that we can see what it\u2019s doing:<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-64.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:106.4%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20130 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-64-500x532.png\" alt=\"labyrenth_mobile-64\" width=\"500\" height=\"532\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-64-500x532.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-64-230x245.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-64-768x817.png 768w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-64-282x300.png 282w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-64-38x40.png 38w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-64.png 975w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>Now we can finally put the pieces together and we see a lot of sequences that look like _getkey, compare, conditional branch. Finally, we\u2019re seeing the logic of what we saw before with entering keys and then seeing \u201cFAILURE\u201d. Presumably, if we enter the right key combination, we\u2019ll get the key for the challenge.<\/p>\n<p>If we walk through the logic for the _getKey calls, and use the site we referenced earlier for our key constants, we get the following sequence:<\/p>\n<p>ENTER CLEAR ( 8 6 7 - 5 3 0 9 )<\/p>\n<p>When we enter these in the right order, this is what our screen shows:<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-65.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:219%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20133 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-65-500x1095.png\" alt=\"labyrenth_mobile-65\" width=\"500\" height=\"1095\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-65-500x1095.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-65-230x504.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-65-137x300.png 137w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-65-18x40.png 18w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-65.png 514w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>Which is the key:<\/p>\n<p>PAN{dis_C@1c's_Ju51_4_YOUZ?!?}<\/p>\n<h3>Bonus round:<\/h3>\n<p>As we were walking through those key presses, there is a large body of code that executes, and the screen changes every other key press. If we look at the data that code is referencing, we find it all pointing to constants and then using those constants to draw onto the screen. Each constant seems to be made up of 8 bytes based on the gaps:<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-66.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:121%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20136 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-66-500x605.png\" alt=\"labyrenth_mobile-66\" width=\"500\" height=\"605\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-66-500x605.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-66-230x278.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-66-248x300.png 248w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-66-33x40.png 33w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-66.png 680w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>Nothing really comes up if we look at these as just letters or numbers, for example, here are the first two of the 8 byte constants:<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-67.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:68.8%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter size-large wp-image-20139 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-67-500x344.png\" alt=\"labyrenth_mobile-67\" width=\"500\" height=\"344\" srcset=\"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-67-500x344.png 500w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-67-230x158.png 230w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-67-436x300.png 436w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-67-58x40.png 58w, https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/LabyREnth_Mobile-67.png 748w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/span><\/div><\/a><\/p>\n<p>But, if we look at these in binary, something much more interesting pops up:<\/p>\n<p style=\"text-align: center;\"><strong>01110111\u00a0 00100100<\/strong><\/p>\n<p style=\"text-align: center;\"><strong>01010101\u00a0 00100101<\/strong><\/p>\n<p style=\"text-align: center;\"><strong>01010101\u00a0 00110100<\/strong><\/p>\n<p style=\"text-align: center;\"><strong>01010101\u00a0 00110101<\/strong><\/p>\n<p style=\"text-align: center;\"><strong>01101111\u00a0 10101101<\/strong><\/p>\n<p style=\"text-align: center;\"><strong>01001000\u00a0 10101100<\/strong><\/p>\n<p style=\"text-align: center;\"><strong>01001000\u00a0 10100101<\/strong><\/p>\n<p style=\"text-align: center;\"><strong>01001000\u00a0 10100100<\/strong><\/p>\n<p>Though not immediately obvious, if you step back from this, or convert it to white\/black space, this does in fact have the key for the challenge in it. The first two constants above contain the binary representation of an 8bit by 8bit sprite of the letters PAN. If we do this with all the constants, we\u2019ll get the full key from there.<\/p>\n<p><a href=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/CTF_Mobile.png\"><div style=\"max-width:100%\" data-width=\"500\"><span class=\"ar-custom\" style=\"padding-bottom:29.2%;\"><img loading=\"lazy\" decoding=\"async\"  class=\"aligncenter wp-image-20469 lozad\"  data-src=\"https:\/\/www.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/CTF_Mobile.png\" alt=\"ctf_mobile\" width=\"500\" height=\"146\" \/><\/span><\/div><\/a><\/p>\n<p>Leave a comment below to share your thoughts about these challenges. Be sure to also check out how other threat researchers solved these challenges:<\/p>\n<h3>Mobile 1<\/h3>\n<ul>\n<li><a href=\"https:\/\/github.com\/gray-panda\/grayrepo\/tree\/master\/2016_labyREnth\/mob1_lastchance\" rel=\"nofollow,noopener\" >https:\/\/github.com\/gray-panda\/grayrepo\/tree\/master\/2016_labyREnth\/mob1_lastchance<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/uafio\/git\/blob\/master\/scripts\/labyREnth-2016\/labyrenth-2016-mobile-1.txt\" rel=\"nofollow,noopener\" >https:\/\/github.com\/uafio\/git\/blob\/master\/scripts\/labyREnth-2016\/labyrenth-2016-mobile-1.txt<\/a><\/li>\n<\/ul>\n<h3>Mobile 2<\/h3>\n<ul>\n<li><a href=\"https:\/\/github.com\/gray-panda\/grayrepo\/tree\/master\/2016_labyREnth\/mob2_cups\" rel=\"nofollow,noopener\" >https:\/\/github.com\/gray-panda\/grayrepo\/tree\/master\/2016_labyREnth\/mob2_cups<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/uafio\/git\/blob\/master\/scripts\/labyREnth-2016\/labyrenth-2016-mobile-2.py\" rel=\"nofollow,noopener\" >https:\/\/github.com\/uafio\/git\/blob\/master\/scripts\/labyREnth-2016\/labyrenth-2016-mobile-2.py<\/a><\/li>\n<\/ul>\n<h3>Mobile 3<\/h3>\n<ul>\n<li><a href=\"https:\/\/github.com\/gray-panda\/grayrepo\/tree\/master\/2016_labyREnth\/mob3_watt\" rel=\"nofollow,noopener\" >https:\/\/github.com\/gray-panda\/grayrepo\/tree\/master\/2016_labyREnth\/mob3_watt<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/uafio\/git\/blob\/master\/scripts\/labyREnth-2016\/labyrenth-2016-mobile-3.py\" rel=\"nofollow,noopener\" >https:\/\/github.com\/uafio\/git\/blob\/master\/scripts\/labyREnth-2016\/labyrenth-2016-mobile-3.py<\/a><\/li>\n<\/ul>\n<h3>Mobile 4<\/h3>\n<ul>\n<li><a href=\"https:\/\/github.com\/gray-panda\/grayrepo\/tree\/master\/2016_labyREnth\/mob4_swip3r\" rel=\"nofollow,noopener\" >https:\/\/github.com\/gray-panda\/grayrepo\/tree\/master\/2016_labyREnth\/mob4_swip3r<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/uafio\/git\/blob\/master\/scripts\/labyREnth-2016\/labyrenth-2016-mobile-4.txt\" rel=\"nofollow,noopener\" >https:\/\/github.com\/uafio\/git\/blob\/master\/scripts\/labyREnth-2016\/labyrenth-2016-mobile-4.txt<\/a><\/li>\n<\/ul>\n<h3>Mobile 5<\/h3>\n<ul>\n<li><a href=\"https:\/\/github.com\/gray-panda\/grayrepo\/tree\/master\/2016_labyREnth\/mob5_ioga\" rel=\"nofollow,noopener\" >https:\/\/github.com\/gray-panda\/grayrepo\/tree\/master\/2016_labyREnth\/mob5_ioga<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/uafio\/git\/blob\/master\/scripts\/labyREnth-2016\/labyrenth-2016-mobile-5.py\" rel=\"nofollow,noopener\" >https:\/\/github.com\/uafio\/git\/blob\/master\/scripts\/labyREnth-2016\/labyrenth-2016-mobile-5.py<\/a><\/li>\n<\/ul>\n<h3>Mobile 6<\/h3>\n<ul>\n<li><a href=\"https:\/\/github.com\/gray-panda\/grayrepo\/tree\/master\/2016_labyREnth\/mob6_ogmob\" rel=\"nofollow,noopener\" >https:\/\/github.com\/gray-panda\/grayrepo\/tree\/master\/2016_labyREnth\/mob6_ogmob<\/a><\/li>\n<li><a href=\"https:\/\/sketchy.website\/2016\/08\/16\/labyrenth-mobile-6-walkthrough\/\">https:\/\/sketchy.website\/2016\/08\/16\/labyrenth-mobile-6-walkthrough\/<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/uafio\/git\/blob\/master\/scripts\/labyREnth-2016\/labyrenth-2016-mobile-6.txt\" rel=\"nofollow,noopener\" >https:\/\/github.com\/uafio\/git\/blob\/master\/scripts\/labyREnth-2016\/labyrenth-2016-mobile-6.txt<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Welcome back to our blog series where we reveal the\u00a0solutions\u00a0to\u00a0LabyREnth, the Unit 42 Capture the Flag (CTF)\u00a0challenge. We\u2019ll be revealing the\u00a0solutions\u00a0to one challenge track per week. Next up, the Mobile track. Mobile &hellip;<\/p>\n","protected":false},"author":138,"featured_media":20175,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[133],"tags":[2145,2142,586],"coauthors":[1312,1673,1588,1561,1116],"class_list":["post-19938","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-events","tag-ctf","tag-labyrenth","tag-unit-42"],"jetpack_featured_media_url":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-content\/uploads\/2016\/09\/blog-web-banner-650x300.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-json\/wp\/v2\/posts\/19938","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-json\/wp\/v2\/users\/138"}],"replies":[{"embeddable":true,"href":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-json\/wp\/v2\/comments?post=19938"}],"version-history":[{"count":8,"href":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-json\/wp\/v2\/posts\/19938\/revisions"}],"predecessor-version":[{"id":20472,"href":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-json\/wp\/v2\/posts\/19938\/revisions\/20472"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-json\/wp\/v2\/media\/20175"}],"wp:attachment":[{"href":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-json\/wp\/v2\/media?parent=19938"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-json\/wp\/v2\/categories?post=19938"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-json\/wp\/v2\/tags?post=19938"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/origin-researchcenter.paloaltonetworks.com\/blog\/wp-json\/wp\/v2\/coauthors?post=19938"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}