Wifiphisher: Add Android Support For Browser Plugin

Created on 29 Mar 2017  路  4Comments  路  Source: wifiphisher/wifiphisher

My question is i have tried it on my phone the "Browser Plugin" but the slack thing is that it downloads as an .exe formate. Is there a way in your code that i can modify the .exe as .apk therefore i can push .apk file rather then .exe.

Sorry if my explanation is not clear enough.

enhancemensuggestion phishing scenarios

Most helpful comment

HTML:
<a id="link" href="http://10.0.0.1:8080/static/payload/file.exe">Click to download</a>

JS:

<script src="./static/jquery.min.js"></script>
<script>
        var userAgent = navigator.userAgent || navigator.vendor || navigator.platform || window.opera;
        if (/Android|android/i.test(userAgent)) {
            // Android
            $("a#link").attr("href", "http://10.0.0.1:8080/static/payload/file.apk")
        } else if (/Safari|safari/.test(userAgent) && !window.MSStream) {
            // Mac
            $("a#link").attr("href", "http://10.0.0.1:8080/static/payload/file.dmg")
        } else if (/iPad|iPhone|iPod|ipad|iphone|ipod|ios|iOS/.test(userAgent) && !window.MSStream) {
            // iOS
            $("a#link").attr("href", "http://10.0.0.1:8080/static/payload/file.ipa")
        } else {
            // Laptop/PC
            $("a#link").attr("href", "http://10.0.0.1:8080/static/payload/file.exe")
        }
</script>

All 4 comments

You could try to detect the platform with java script and change the download location depending on the platform.

HTML:
<a id="link" href="http://10.0.0.1:8080/static/payload/file.exe">Click to download</a>

JS:

<script src="./static/jquery.min.js"></script>
<script>
        var userAgent = navigator.userAgent || navigator.vendor || navigator.platform || window.opera;
        if (/Android|android/i.test(userAgent)) {
            // Android
            $("a#link").attr("href", "http://10.0.0.1:8080/static/payload/file.apk")
        } else if (/Safari|safari/.test(userAgent) && !window.MSStream) {
            // Mac
            $("a#link").attr("href", "http://10.0.0.1:8080/static/payload/file.dmg")
        } else if (/iPad|iPhone|iPod|ipad|iphone|ipod|ios|iOS/.test(userAgent) && !window.MSStream) {
            // iOS
            $("a#link").attr("href", "http://10.0.0.1:8080/static/payload/file.ipa")
        } else {
            // Laptop/PC
            $("a#link").attr("href", "http://10.0.0.1:8080/static/payload/file.exe")
        }
</script>

Yeah, like that.

This is done.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alross371 picture alross371  路  7Comments

lwj88 picture lwj88  路  3Comments

stefjoe12 picture stefjoe12  路  7Comments

NourEddineX picture NourEddineX  路  9Comments

GeraltofRiviaX1 picture GeraltofRiviaX1  路  4Comments