A summary of the second problem of Ali Mobile Security Challenge
Source: Internet
Author: User
<span id="Label3"></p><p><p>1. Methods of trickery</p></p><p><p>Because it is not very likely to look at the assembly instructions, so after looking at other People's Problem-solving ideas, they think of a trickery method. o (╯-╰) o</p></p><p><p>Prior to learning the process learned a lot of instructions, such as strings, listing all the strings in the File. Suddenly remembered to be able to export the memory of the APK runtime so file (in fact, it is also learning-'),</p></p><p><p>After verifying that the string that was compared once is stored in memory, the DD command is used to import the content into the SD card:</p></p><pre><pre><span style="color: #0000ff;">DD</span> <span style="color: #0000ff;">if</span>=/proc/<span style="color: #800080;">2829</span>/mem of=/sdcard/hah.mem bs=<span style="color: #800080;">1</span> skip=<span style="color: #800080;">1750364160</span> count=<span style="color: #800080;">28672</span></pre></pre><p><p>For small white, check PID ah, DD command format ah are now Checked. Although very idiot, but with a few times familiar with, slowly accumulate.</p></p><p><p>Skip is the starting position of the so file, count is the copy of the blocks block, in fact, copy so file the difference in the starting position of the Best.</p></p><p><p>Then use the strings command:</p></p><pre><pre><span style="color: #800080;">4</span> <span style="color: #0000ff;">grep</span> <span style="color: #0000ff;">grep</span> <span style="color: #0000ff;">grep</span> -v/</pre></pre><p><p>Print out the string as follows, with the location:</p></p><pre> <span style="color: #800080;"><span style="color: #800080;">3577</span></span><span style="color: #000000;"><span style="color: #000000;">Jolin</span></span><span style="color: #800080;"><span style="color: #800080;">3702</span></span> <span style="color: #0000ff;"><span style="color: #0000ff;"></span> free</span> <span style="color: #800080;"><span style="color: #800080;">3707</span></span><span style="color: #000000;"><span style="color: #000000;">Dlsym</span></span><span style="color: #800080;"><span style="color: #800080;">3715</span></span><span style="color: #000000;"><span style="color: #000000;">malloc</span></span><span style="color: #800080;"><span style="color: #800080;">4321</span></span><span style="color: #000000;"><span style="color: #000000;">Raise</span></span><span style="color: #800080;"><span style="color: #800080;">4702</span></span><span style="color: #000000;"><span style="color: #000000;">Abort</span></span><span style="color: #800080;"><span style="color: #800080;">4732</span></span><span style="color: #000000;"><span style="color: #000000;">memcpy</span></span><span style="color: #800080;"><span style="color: #800080;">13754</span></span><span style="color: #000000;"><span style="color: #000000;">U,bucuoo</span></span><span style="color: #800080;"><span style="color: #800080;">15477</span></span><span style="color: #000000;"><span style="color: #000000;">qffffff</span></span><span style="color: #888888; background-color: #ffff00;"><span style="color: #888888; background-color: #ffff00;">42120 Aiyou,bucuoo</span></span><span style="color: #800080;"><span style="color: #800080;">42170</span></span>s!<span style="color: #000000;"><span style="color: #000000;">#L</span></span><span style="color: #800080;"><span style="color: #800080;">42226</span></span>9x,+ (x=!<span style="color: #000000;"><span style="color: #000000;">) </span></span><span style="color: #800080;"><span style="color: #800080;">42247</span></span><span style="color: #000000;"><span style="color: #000000;">Coxt</span></span><span style="color: #800080;"><span style="color: #800080;">42263</span></span><span style="color: #000000;"><span style="color: #000000;">. 6gq</span></span><span style="color: #800080;"><span style="color: #800080;">42356</span></span><span style="color: #000000;"><span style="color: #000000;">Lnat</span></span><span style="color: #800080;"><span style="color: #800080;">42404</span></span><span style="color: #000000;"><span style="color: #000000;">9HbB</span></span><span style="color: #800080;"><span style="color: #800080;">42420</span></span><span style="color: #000000;"><span style="color: #000000;">Bmae</span></span><span style="color: #800080;"><span style="color: #800080;">42425</span></span> <span style="color: #800080;"><span style="color: #800080;">3</span></span>:*<span style="color: #800080;"><span style="color: #800080;">8</span></span>(-&<span style="color: #800080;"><span style="color: #800080;">42435</span></span> <span style="color: #800000;"><span style="color: #800000;">"</span></span><span style="color: #800000;"><span style="color: #800000;">@%%7) B</span></span> <span style="color: #800080;"><span style="color: #800080;">52120</span></span><span style="color: #000000;"><span style="color: #000000;">Wojiushidaan</span></span><span style="color: #800080;"><span style="color: #800080;">52170</span></span>s!<span style="color: #000000;"><span style="color: #000000;">#L</span></span><span style="color: #800080;"><span style="color: #800080;">52226</span></span>9x,+ (x=!<span style="color: #000000;"><span style="color: #000000;">) </span></span><span style="color: #800080;"><span style="color: #800080;">52247</span></span><span style="color: #000000;"><span style="color: #000000;">Coxt</span></span><span style="color: #800080;"><span style="color: #800080;">52263</span></span><span style="color: #000000;"><span style="color: #000000;">. 6gq</span></span><span style="color: #800080;"><span style="color: #800080;">52356</span></span><span style="color: #000000;"><span style="color: #000000;">Lnat</span></span><span style="color: #800080;"><span style="color: #800080;">52404</span></span><span style="color: #000000;"><span style="color: #000000;">9HbB</span></span><span style="color: #800080;"><span style="color: #800080;">52420</span></span><span style="color: #000000;"><span style="color: #000000;">Bmae</span></span><span style="color: #800080;"><span style="color: #800080;">52425</span></span> <span style="color: #800080;"><span style="color: #800080;">3</span></span>:*<span style="color: #800080;"><span style="color: #800080;">8</span></span>(-&<span style="color: #800080;"><span style="color: #800080;">52435</span></span> <span style="color: #800000;"><span style="color: #800000;">"</span></span><span style="color: #800000;"><span style="color: #800000;">@%%7) B</span></span> <span style="color: #800080;"><span style="color: #800080;">57722</span></span>[email protected]<span style="color: #800000;"><span style="color: #800000;">'</span></span><span style="color: #800000;"><span style="color: #800000;">@e</span></span> <span style="color: #800080;"><span style="color: #800080;">57736</span></span>[email protected]=<span style="color: #000000;"><span style="color: #000000;">P</span></span><span style="color: #800080;"><span style="color: #800080;">57756</span></span>[email protected]@a%<span style="color: #000000;"><span style="color: #000000;">@ </span></span><span style="color: #800080;"><span style="color: #800080;">61224</span></span>xo%@<span style="color: #800080;"><span style="color: #800080;">9</span></span> <span style="color: #800080;"><span style="color: #800080;">61242</span></span>%@}<span style="color: #800080;"><span style="color: #800080;">5</span></span>&<span style="color: #000000;"><span style="color: #000000;">@ </span></span><span style="color: #800080;"><span style="color: #800080;">61252</span></span>%@ $b%<span style="color: #000000;"><span style="color: #000000;">@ </span></span><span style="color: #800080;"><span style="color: #800080;">61271</span></span>o%@| '%<span style="color: #000000;"><span style="color: #000000;">@ </span></span><span style="color: #800080;"><span style="color: #800080;">61314</span></span> <span style="color: #0000ff;"><span style="color: #0000ff;">Kill</span></span> <span style="color: #800080;"><span style="color: #800080;">61321</span></span>%s%<span style="color: #000000;"><span style="color: #000000;">D</span></span><span style="color: #800080;"><span style="color: #800080;">61327</span></span><span style="color: #000000;"><span style="color: #000000;">Dlsym</span></span><span style="color: #800080;"><span style="color: #800080;">61335</span></span><span style="color: #000000;"><span style="color: #000000;">fopen</span></span><span style="color: #800080;"><span style="color: #800080;">61343</span></span><span style="color: #000000;"><span style="color: #000000;">fgets</span></span><span style="color: #800080;"><span style="color: #800080;">61351</span></span> <span style="color: #0000ff;"><span style="color: #0000ff;">Sleep</span></span> <span style="color: #800080;"><span style="color: #800080;">61357</span></span><span style="color: #000000;"><span style="color: #000000;">Getpid</span></span><span style="color: #800080;"><span style="color: #800080;">61366</span></span><span style="color: #000000;"><span style="color: #000000;">strstr</span></span><span style="color: #800080;"><span style="color: #800080;">61375</span></span><span style="color: #000000;"><span style="color: #000000;">sscanf</span></span><span style="color: #800080;"><span style="color: #800080;">61404</span></span><span style="color: #000000;"><span style="color: #000000;">Yaotong</span></span><span style="color: #800080;"><span style="color: #800080;">61414</span></span><span style="color: #000000;"><span style="color: #000000;">sprintf</span></span><span style="color: #800080;"><span style="color: #800080;">61424</span></span><span style="color: #000000;"><span style="color: #000000;">lrand48</span></span><span style="color: #800080;"><span style="color: #800080;">61434</span></span><span style="color: #000000;"><span style="color: #000000;">Mprotect</span></span><span style="color: #800080;"><span style="color: #800080;">61445</span></span><span style="color: #000000;"><span style="color: #000000;">Tracerpid</span></span><span style="color: #800080;"><span style="color: #800080;">61457</span></span><span style="color: #000000;"><span style="color: #000000;">Cacheflush</span></span><span style="color: #800080;"><span style="color: #800080;">61554</span></span>Securitycheck Started ...</pre><p><p><span style="line-height: 1.5;">of course, It is the answer to study, so the filter "_", "/", ". so" string may not be universal.</span></p></p><p><p><span style="line-height: 1.5;">With the naked eye, and the possibility of the password content guessing, even if the test is not too time-consuming. uh, Uh. It's so Simple and Rude.</span></p></p><p><p></p></p><p><p><span style="line-height: 1.5;">2, seemingly the title gives the alternative solution:</span></p></p><p><p><span style="line-height: 1.5;">Reference: http://drops.wooyun.org/tips/5409</span></p></p><p><p>Modify the Compare section in the so file, and use the previous log print function to print the string that was Compared. Try it yourself, it works, and it's simple and Efficient.</p></p><p><p></p></p><p><p>3, a senior write the problem-solving ideas, bypassing debugging, and then change so File. Since the beginning even Ida how attach mobile phone apk do not understand, later attach on because the anti-debugging also failed to load normally.</p></p><p><p>So I just looked at it. Learn more in the future and look back on it.</p></p><p><p>Reference: http://secauo.com/2015-Mobile-Security-Challenge-2.html</p></p><p><p></p></p><p><p>4, a colleague to provide ideas, the use of ADBI framework, Hook Program read state information operation function fopen, so that it can be normal attach to the Program.</p></p><p><p>In fact, for the small white, accept a new way of thinking, than to make a problem to have a meaning. So I compiled the next ADBI framework (fortunately before the NDK compiler environment t.t).</p></p><p><p>Basic learned the use of this framework, look at the principle, the hook, although to now or foggy, at least it will be easy to Use.</p></p><p><p></p></p><p><p>Because so far has not attach to the program, also do not know how to operate after attach, view variable Content. But at least through this process of study:</p></p><p><p>Methods of Ida Attach program</p></p><p><p>Ways to modify so files (using 010 or Ida)</p></p><p><p>How to use the ADBI framework</p></p><p><p>Use of strings directives</p></p><p><p>Use of the DD command</p></p><p><p>How to view the PID</p></p><p><p>Although there has been no real contact with the reverse, I believe that the more slowly, will understand more, the Deeper. Come on (^ω^).</p></p><p><p> </p></p><p><p>A summary of the second problem of Ali Mobile Security Challenge</p></p></span>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service