Jump to content

[Module] EvilPortal


newbi3

Recommended Posts

  • 2 months later...
  • Foxtrot featured this topic
  • Foxtrot pinned this topic
  • Foxtrot unpinned this topic
  • 1 month later...

@chrizree I would get that when plugging in the Tetra to my pc. Idk if it is something on the pc itself that is causing it or not.  Foxtrot told me that he does not get that ever so I'm thinking a pc thing.

 

@newbi3 I'm messing with Targeted portals and I'm a little confused.  When making Officeportal.php and coffeeportal.php is the index.php just used to call those files depending on the criteria for the target.  Most basic portals ive seen use the index.php for the html also.

  • Upvote 1
Link to comment
Share on other sites

  • 3 months later...
On 9/15/2020 at 3:29 PM, newbi3 said:

Description

EvilPortal is a captive portal tool for the Wifi Pineapple. It allows users to easily setup landing pages that are automatically displayed to clients who connect.

Having an issue?

Please include this information when reporting an issue:

  • A detailed description of the issue including error messages you are receiving and steps to reproduce the problem.
  • The version of Evil Portal you are using
  • The firmware version your pineapple is running
  • Are you connected to the internet?
  • The output of the module log file located at: /tmp/modules/evilportal.log on your pineapple.

Features

  • Targeted Portals
  • Static Portals
  • Creating/Editing/Activating/Deleting Portals
  • White listings clients by ip address
  • Dynamically adding and revoking authorized clients
  • Live Preview of your portal through the module interface

Targeted Portals

Targeted Portals allow you to direct clients to different portals conditionally based on SSID, MAC, Hostname, or Useragent allowing for a much wider range of attacks.

Creating a Targeted Portal

  1. Go to the Portal Workbench in the EvilPortal module
  2. Click the drop down menu to the left of the "Portal Name" input box and select "Targeted"
  3. Give it a name
  4. Click the create new portal button

Edit Targeting Rules

  1. Click on the name of the portal you just created in list of portals
  2. Click the "Target Rule Editor" button in the top right corner of the Work Bench
  3. You should see a modal open up titled "Editing Rules for $portalname" with MAC, SSID, HOSTNAME, and USERAGENT sections
    • These sections represent the value that you can create routing conditions for.
    • Under each section you will see a sub-section titled "Exact" and "Regex". These let you create exact rules or rules that will match a pattern.
    • It should also be noted that these conditions are evaluated as an 'or' not an 'and'. The order that they are evaluated in can be change but more on that later.
  4. Once you figure out the rule you want to create click the "Add Rule" button
  5. You'll see a row appear that says "Key Value", "Destination", and "Remove". Fill out the values for Key Value and Destination.
    • The "Key Value" represents the value that you are checking. For example if the rule is for a SSID the value might be "office-wifi".
    • The "Destination" is the file that is the landing page you are routing clients that match your rule to. If this is an office portal you might want to call it OfficePortal.php. Just remember what you called it because we will need it later. (More on creating these later)
    • The "Remove" button removes the rule
  6. Click "Save" at the bottom

Creating The Destinations

  1. Click the "New File" button in the top right of the work bench.
  2. You should see modal open up titled "Creating New FIle". For the "File Name" field type the name of the destination
    • This must be the name you typed in for the destination field when setting up the rules. In this example it was "OfficePortal.php"
  3. In the "File Contents" field you will write the code to create your portal.
    • It should be noted that you need to make a post request to /captiveportal/index.php with a redirect destination called "target" in it.
    • In my opinion it is easiest to copy the contents of "default.php" and paste it here as a starting point.
  4. Click "Save" at the bottom

Important Notes

  • If a client connects and doesn't match any of the conditions you created, they will be routed to "default.php".
  • Currently there is not an easy way to change the order the rules are evaluated in, if you want to change them you have to do it manually via ssh.
    1. ssh into your pineapple
    2. cd into where your portal is (either /root/portals/$portalname or /sd/portals/$portalname)
    3. nano $portalname.ep (replace $portalname with whatever you called your portal)
    4. Change the order of the strings in the targeted_rules->rule_order array. The items that come first are evaluated first.

Basic Portals

Basic Portals are the same oldschool portals that you have come to know in Evil Portal. These are the portals that are created by default and they work in exactly the same way as they used to.

Hs86ikS.png

 

Having an issue?

Please include this information when reporting an issue:

  • A detailed description of the issue including error messages you are receiving and steps to reproduce the problem.
  • The version of Evil Portal you are using
  • The firmware version your pineapple is running
  • Are you connected to the internet?
  • The output of the module log file located at: /tmp/modules/evilportal.log on your pineapple.

 

 

 

how  do i get to fix the issue of targeted portals for kbeflo, i am unable to redirect to his basic portals

help fix  

 

Link to comment
Share on other sites

i have added the index.php of  yahoo-login code to my destination.php file  

also edited it this way 

 

<?php
$destination = " #the path to my basic portal code";
require_once('helper.php');
?>

<HTML>
<HEAD>
    <title>Evil Portal</title>
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <script type="text/javascript">
        function redirect() { setTimeout(function(){window.location = "/captiveportal/index.php";},100);}
    </script>
</HEAD>

<BODY>
<div style="text-align: center;">
    <h1>Evil Portal</h1>
    <p>This is the default Evil Portal page.</p>
    <p>The SSID you are connected to is <?=getClientSSID($_SERVER['REMOTE_ADDR']);?></p>
    <p>Your host name is <?=getClientHostName($_SERVER['REMOTE_ADDR']);?></p>
    <p>Your MAC Address is <?=getClientMac($_SERVER['REMOTE_ADDR']);?></p>
    <p>Your internal IP address is <?=$_SERVER['REMOTE_ADDR'];?></p>

    <form method="POST" action="/captiveportal/index.php" onsubmit="redirect()">
        <input type="hidden" name="target" value="<?=$destination?>">
        <button type="submit">Authorize</button>
    </form>

</div>

</BODY>

</HTML>

 

 

adding path to basic destination code to $destination

Link to comment
Share on other sites

11 minutes ago, dark_pyrro said:

Still not sure what your problem is. Why don't you just download all the kleo portals to the Pineapple from github and then activate the desired one from the Pineapple web gui?

how do i run a targeted evilportal based on ssid with kleo portals ?

cus ive tried and it ent working for me

 

Link to comment
Share on other sites

  • 3 months later...
On 11/18/2021 at 6:56 PM, swifttrill said:

lol check it out if you got a way around it though assist

Check my step by step video. I find beta 2.0.0 on the MK7 very buggy with the Evil Portal and also Cleo's portals won't run because in my case the Server won't even preview. If you downgrade to the firmware from my video you can at least try. I read online pressing "Firmware check twice" (this will give you the re-install current FW option) might also work!

 

 

I'm also working on new portals. Expect video's soon!

Edited by Sgt.Foose
Link to comment
Share on other sites

Well, beta releases tends to be buggy. It's part of the "package".

At least when the first beta was released there was a package missing that made the EP module behave bad (or not at all); libblobmsg-json

Problems are still showing though since there are something related to encryption that I haven't seen before when using EP on older firmware. Haven't been digging any deeper into that though.

Link to comment
Share on other sites

 

 

For the Dutchies in here; I made a new Ziggo Hotspots Evil Portal. Ziggo is the largest internet provider in The Netherlands and as a customer of Ziggo, you can connect to any home via SSID "Ziggo" which every Ziggo modem by default will broadcast. Since many clients never use it, they often fool for entering both their email and many of their passwords. Happy looting!

https://github.com/SgtFoose/Evil-Portals

158378292-32af4781-31b7-4ce8-aae0-f09285

Edited by Sgt.Foose
Link to comment
Share on other sites

  • 2 weeks later...

This is my new McDonalds Portal.

It attempts the user to create an account (which will never succeed) or to login if they think they have an account. They might give it a couple tries leaving a few of their most used credentials.

FYI: McDonalds wifi is open and requires no username and password at all. I couldn't find any decent instructions in both the restaurant and or website (Netherlands), leaving room for an EP. I included a screenshot of the wifi from the restaurant in the portal folder on my GitHub (see link below) in case you might want to tweak it more!

160284637-2b6bd6c3-d85c-40f2-b6f5-ee8d29

Download here

Link to comment
Share on other sites

I read the "Usage" section on the GitHub repo; an alternative way is to download the portals directly from the Pineapple instead of using some intermediate computer to download and then scp/sftp the files to the Pineapple. It's easier just to use wget and unzip. It's possible to script as well if desired.

Link to comment
Share on other sites

30 minutes ago, dark_pyrro said:

I read the "Usage" section on the GitHub repo; an alternative way is to download the portals directly from the Pineapple instead of using some intermediate computer to download and then scp/sftp the files to the Pineapple. It's easier just to use wget and unzip. It's possible to script as well if desired.

Yes I was looking into this but my GitHub XP is level 1 so I'm not sure if my code is ready for such a command. I will look into that and see if I can add that to the instructions. Thanks for the advise anyway!

Link to comment
Share on other sites

You can just use

wget https://github.com/SgtFoose/Evil-Portals/archive/refs/heads/main.zip -O /root/portals/portals.zip

Then unzip the downloaded file (unzip needs to be installed if on a fresh Pineapple)

After that, move the portals to their correct position in the file system since the unpacking procedure won't put them where they should be.

Do some cleanup if desired

  • Thanks 1
Link to comment
Share on other sites

13 hours ago, dark_pyrro said:

You can just use

wget https://github.com/SgtFoose/Evil-Portals/archive/refs/heads/main.zip -O /root/portals/portals.zip

Then unzip the downloaded file (unzip needs to be installed if on a fresh Pineapple)

After that, move the portals to their correct position in the file system since the unpacking procedure won't put them where they should be.

Do some cleanup if desired

Instructions tested, verified and added to the GitHub page!

Edited by Sgt.Foose
Link to comment
Share on other sites

@newbi3 Would it be possible to ad an option to add triggers for the EP to show it's portal?

E.g. when a client logs on, we give them full internet access, nothing happens, nothing shows.

When we set a trigger e.g. "facebook.com", and a user browses to the specified URL, the EP triggers and presents the Portal?

With this option, it would be much more realistic of fooling clients and also would be very useful for the build-in "Evil WPA Access Point".

 

Link to comment
Share on other sites

  • 3 months later...
2 hours ago, Emilio5639 said:

Has there been some progress on making more of these evil portals?  I know there was some generated but I wasn't sure if there was another location where there are more to pull from.  

Check out my GitHub page. Requests are welcome 🤗 

 

Link

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...