Jump to content
sud0nick

[Official] Portal Auth

Recommended Posts

@kruemel and @nrohsakul sorry guys I've been really busy with work and school.  Now that school is out I should be able to find some time to work on these problems.  Please send me a PM with the sites you were trying to clone and any other details so I can try to replicate the problem and work it out.

  • Upvote 1

Share this post


Link to post
Share on other sites

I've pushed an update to my dev branch on GitHub.  Nothing major has changed but I would appreciate it if some people could test it with various sites and let me know if they get any errors.  The cloning process should now be a little bit faster than before since the resources are downloading concurrently instead of serially.

Share this post


Link to post
Share on other sites

Version 1.4 has been submitted to the Module Manager.  It is already available on GitHub in the Portal Auth master branch.  Here is the changelog:

June 10, 2017 

- The default captive portal test page can now be reached over HTTPS
- Added dependency for curl to support access to Test Site over HTTPS
- Portal cloning is now multithreaded which makes it slightly faster
- Added ability to select payloads for target OSes in the cloner options window

 

  • Upvote 1

Share this post


Link to post
Share on other sites

Unable to clone websites using Portal Auth 1.4

I have been using Portal Auth for a while on my nano and tetra and had reasonable success with it.

But since this recent update i don't know what went wrong. I don't do anything different and i follow the youtube tutorial exactly - including the Starbucks website as an example to test.

But every site i try i keep getting errors like the example below:

clone_error_14_35_11.txt

Exception in thread Thread-21: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 763, in run self.__target(*self.__args, **self.__kwargs) File "/sd/modules/PortalAuth/includes/scripts/PortalCloner.py", line 58, in downloadFile with closing(self.session.get(urlparse.urljoin(self.url, url), stream=True, verify=False)) as r: File "/sd/modules/PortalAuth/includes/scripts/libs/requests/sessions.py", line 473, in get return self.request('GET', url, **kwargs) File "/sd/modules/PortalAuth/includes/scripts/libs/requests/sessions.py", line 461, in request resp = self.send(prep, **send_kwargs) File "/sd/modules/PortalAuth/includes/scripts/libs/requests/sessions.py", line 573, in send r = adapter.send(request, **kwargs) File "/sd/modules/PortalAuth/includes/scripts/libs/requests/adapters.py", line 415, in send raise ConnectionError(err, request=request) ConnectionError: ('Connection aborted.', BadStatusLine("''",)) Traceback (most recent call last): File "/pineapple/modules/PortalAuth/includes/scripts/portalclone.py", line 24, in cloner.cloneResources() File "/sd/modules/PortalAuth/includes/scripts/PortalCloner.py", line 224, in cloneResources fh = open(self.portalDirectory + css_file).read().decode('utf-8', 'ignore') IOError: [Errno 2] No such file or directory: '/root/portals/cadi-library/resources/css_N3lSPYU_3cCSLBOPiPtwtv2IajQX03IWQTo5LiHk10.css'

I have internet access and everything is upto date. I am also getting an error and it say check the error log for details but when i do there is nothing there.

 

I haven't made any changes, just updated from the pineapple module bar so i don't understand why i am having these issues

 

 

Share this post


Link to post
Share on other sites

Hi @SystemCrash86 @sud0nick

I've seen similar messages . To workaround this. ( and it seems to work most of the time) 

I use /root/portals/ rather than /sd/portals/

I also tend to make sure all other modules are turned off (inluding PineAP) before I attempt a clone . I've noticed when running "top" that the CPU usage is hammered with other modules and attempting to clone portal. 

With the above, I've had some success and been able to successfully clone SOME websites. 

TO ADD: A FRESH REBOOT SEEMS TO HELP BEFORE CLONING AS WELL!!

My only issue seems to be with the "Injection Sets" . No matter what I change in the configs, the Link one clicks "Download Network Client" always references "/downloads/windows/None" and not the actual executable file . I can copy the link, change the "none" to "filename.exe" and download the file that way. Looking through the injection sets, "None" is not referenced as a file. However if I rename the .exe to None, it will open the file. This leads me to believe that when the "Injection Set" is being added to the cloned portal that the "None" variable is being added somewhere, but I am not versed in coding and not quite there with the "Pineapple" Foo yet :) Tearing what little hair i have left out to figure this out :)

 

Regards

Edited by m0nk666

Share this post


Link to post
Share on other sites
1 hour ago, m0nk666 said:

My only issue seems to be with the "Injection Sets" . No matter what I change in the configs, the Link one clicks "Download Network Client" always references "/downloads/windows/None" and not the actual executable file . I can copy the link, change the "none" to "filename.exe" and download the file that way. Looking through the injection sets, "None" is not referenced as a file. However if I rename the .exe to None, it will open the file. This leads me to believe that when the "Injection Set" is being added to the cloned portal that the "None" variable is being added somewhere, but I am not versed in coding and not quite there with the "Pineapple" Foo yet :) Tearing what little hair i have left out to figure this out :)

 

Regards

Feel like a Dumbass ... I've been playing with this for days .. looking to replace the "None" value . It was in front of my eyes all along in the cloner options .. <SIGH> .. I think because I was stringently sticking to your awesome tutorial video .. and not taking into account that you have now inserted the PHP Magic you were referring to, hence not selecting the file when I cloned :) 

Regards

DOH.JPG

Share this post


Link to post
Share on other sites

@SystemCrash86 Can you be more specific in which errors you're seeing on which device?  The reason I ask is because I'm guessing that you're seeing the following error on your NANO and not your TETRA:

No such file or directory: '/root/portals/cadi-library/resources/css_N3lSPYU_3cCSLBOPiPtwtv2IajQX03IWQTo5LiHk10.css'

This normally comes up when your device runs out of space.  You see the above error because the CSS files are first downloaded and then parsed to download any resources referenced within them so when the script tries to open the CSS file for reading it can't find it and a crash occurs.  All other files are parsed while in memory and then saved to disk (which is why it's possible to get a "Portal Cloned Successfully" message even when your device runs out of space and nothing is actually saved).  If you're on a NANO I recommend saving portals to /sd/portals.  If you don't see them show up in Evil Portal then you need to create a symlink:

ln -s /root/portals /sd/portals

The root partition is far too small to save a cloned site so you'll almost always come across this error if you aren't storing them on the SD card.  If you're having trouble on your TETRA please post more details about the site you're trying to clone, the settings you use, and the error you get.  The more information I have the easier it will be to troubleshoot.  Right now I'm able to clone sites and I don't receive any errors so it's hard for me to fix something I don't see as broken.

 

@m0nk666 I'm glad you figured it out.  Whenever there is a new release be sure to read both the change log and the help buttons around the module to see what's been added.

Share this post


Link to post
Share on other sites

Hi @sud0nick

I tried what you said and at first i still got nothing so i decided to preform another Firmware Recovery and start completely from scratch. I have factory reset the devive many times with the same result which lead me to making the post in the first place.

I must have had a corrupted file or something because after a complete firmware restart i was able to do exactly what you said and so far i have no issues.

Thanks for all your help i really appreciated it.

So glad i am able to use such a great tool, please keep up the great work

Share this post


Link to post
Share on other sites

Hi SudoNick

How to create this

:

If you don't see them show up in Evil Portal then you need to create a symlink:

ln -s /root/portals /sd/portals ?

 

so Far i have only successfully cloned www.google.com, no luck on other websites like starbucks, mcdonalds and facebook. How to solve that sir?

Share this post


Link to post
Share on other sites

I have been trying to create a symlink like u said, but even i m root ssh into pineapple, i still get this Operations not permitted.

 

help anyone? thanks sir

Share this post


Link to post
Share on other sites

update. I have reformatted my sd card from FAT32 to EXT4 because symlink only works with EXT4 linux file system.

now i can run ln -s /root/portals /sd/portals

but now another problem

still evil portal cant seem to see the cloned pages and when i ssh into pineapple it shows this

 

root@Pineapple:/sd/portals# ls

mcd1     portals

 

it creats another portals folder in sd/portals

so i tried copy mcd1 into sd/portals/portals it shows up in evil portal but that means the cloned page is in root and filled up the nano space and defeat the purpose.

 

please help. thanks sir

Share this post


Link to post
Share on other sites

@sudovader you need to create a symlink to /sd/portals in place of the /root/portals directory.  If you don't know how to do this I suggest you Google it to learn about symlinks.

Edited by sud0nick

Share this post


Link to post
Share on other sites

Hi,

I try to upload a payload file (.bat) via the portal auth "upload payload button" and it seems that it just hangs or gets stuck there forever, no error messages, nothing just the pineapple sign emmiting pineapple waves keeps moving forever?

Any advice is appreciated. Thanks.

Share this post


Link to post
Share on other sites

It's probably because you're uploading a .bat file.  The module expects a .exe for Windows payloads.  I should have included a response for unsupported file types but I can also include support for .bat files.

Share this post


Link to post
Share on other sites
1 hour ago, sud0nick said:

It's probably because you're uploading a .bat file.  The module expects a .exe for Windows payloads.  I should have included a response for unsupported file types but I can also include support for .bat files.

"que no los dos".jpeg

  • Like 1

Share this post


Link to post
Share on other sites
6 minutes ago, Sebkinne said:

"que no los dos".jpeg

¯\_(ツ)_/¯ It never even crossed my mind that someone might download a batch script and run it.  I guess anything is possible.  I definitely see it being more useful in CursedScreech so I'll make the change in both modules.

Share this post


Link to post
Share on other sites

Hi Sud0nick,

Yea thought it might be because of the file type.

excellent, either way thank you for looking into it and possibly updating it.

 

Share this post


Link to post
Share on other sites

Hi sudo i am facing this issue while clonning any portal.

And as per your recommendations i installed the module by module manager

Below is the error

 

ERROR:root:code for hash md5 was not found. Traceback (most recent call last): File "/usr/lib/python2.7/hashlib.py", line 147, in globals()[__func_name] = __get_hash(__func_name) File "/usr/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type md5 ERROR:root:code for hash sha1 was not found. Traceback (most recent call last): File "/usr/lib/python2.7/hashlib.py", line 147, in globals()[__func_name] = __get_hash(__func_name) File "/usr/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha1 ERROR:root:code for hash sha224 was not found. Traceback (most recent call last): File "/usr/lib/python2.7/hashlib.py", line 147, in globals()[__func_name] = __get_hash(__func_name) File "/usr/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha224 ERROR:root:code for hash sha256 was not found. Traceback (most recent call last): File "/usr/lib/python2.7/hashlib.py", line 147, in globals()[__func_name] = __get_hash(__func_name) File "/usr/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha256 ERROR:root:code for hash sha384 was not found. Traceback (most recent call last): File "/usr/lib/python2.7/hashlib.py", line 147, in globals()[__func_name] = __get_hash(__func_name) File "/usr/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha384 ERROR:root:code for hash sha512 was not found. Traceback (most recent call last): File "/usr/lib/python2.7/hashlib.py", line 147, in globals()[__func_name] = __get_hash(__func_name) File "/usr/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha512 Traceback (most recent call last): File "/pineapple/modules/PortalAuth/includes/scripts/portalclone.py", line 4, in from PortalCloner import PortalCloner File "/pineapple/modules/PortalAuth/includes/scripts/PortalCloner.py", line 12, in import requests File "/pineapple/modules/PortalAuth/includes/scripts/libs/requests/init.py", line 58, in from . import utils File "/pineapple/modules/PortalAuth/includes/scripts/libs/requests/utils.py", line 26, in from .compat import parse_http_list as _parse_list_header File "/pineapple/modules/PortalAuth/includes/scripts/libs/requests/compat.py", line 94, in from .packages.urllib3.packages.ordered_dict import OrderedDict File "/pineapple/modules/PortalAuth/includes/scripts/libs/requests/packages/init.py", line 83, in load_module raise ImportError("No module named '%s'" % (name,)) ImportError: No module named 'requests.packages.urllib3'

Share this post


Link to post
Share on other sites

@N30blu3 that error means it can't find the urllib3 module for Python.  It's included with PortalAuth at /pineapple/modules/PortalAuth/includes/scripts/libs/requests/packages/urllib3.  I just downloaded the module on my NANO and cloned a portal successfully so I'm not sure why you're getting that error.  Did you happen to bork your python installation somehow?  What firmware version are you running?  Have you tried factory resetting your pineapple?

Share this post


Link to post
Share on other sites

Hmm, first time trying this module and seen the video and seen this thread.  Recommendations.

If a simlink is needed for Evil portal to see portals on the SD, maybe we need a config for Evilportal to change the path where it stores\looks for its portals?  I have seen the PortalAuth clone to SD for EP not see it.

If above not possible, maybe PortalAuth can create simlink for users who want to use the SD (feels to me this may have to be a requirement for space so maybe not even work unless you are using SD).

I also been seeing some errors almost like above ones and seen in one post here that the path statement may even need to include the SDcard's bin and sbin folders for some payloads to work right.  This one maybe more posed toward Hak5 if this is the case, as I have not jumped back into my Nano since I messed with it on Sunday to check this, why isn't this path populated when an SDcard is present or option to add/remove it when one is inserted or something like that?  If installing to the SD card breaks stuff when it is recommended to be used then this should be auto..or even mandatory for module installation due to space.  This last one is directed to Hak5 if it is true.

I am mainly posting because I just saw a post of someone frustrated with using their nano and they do not seem like a skiddie but mainly having to fix modules on the back end out of the box to even run them for the first time.  I maybe messing with PortalAuth and EvilPortal again later on today because I only messed with my Nano maybe a couple of times since purchasing last year (one time being Sunday just deciding to try PA and EP) and mainly used it for PineAP and use the machine it is connected to as the brain for the MiTM attacks instead of trying modules.  I mainly will be looking at ease of just downloading the module and being able to run stuff without having to go ssh to get functionality.  I would put that on the same level as telling users they have to ssh into the BashBunny to do things to get a payload to run.

I am not knocking on the module(s).  If they work, they work.  We just need to get better at installation.  Don't worry, I am not excluding myself.  Look at the instructions I have for the BBTPS for the BB, I need work too.

Share this post


Link to post
Share on other sites

@PoSHMagiC0de dude are you sure you're in the right thread?  This is a thread dedicated to PortalAuth support only and not issues with the rest of the Pineapple.  If you need to store portals on the sd card you can do so by changing the setting in the GUI.  It defaults to /root/portals but you can change it to /sd/portals if you'd like.  However EP looks for portals isn't my business as I'm not the author of that module and I won't tell newbi3 how to write his own software.  No one has had to fix my modules "on the back end out of the box" that I'm aware of.

Share this post


Link to post
Share on other sites

Actually, it started with PA with errors similar to above which led to another post when I was kind of looking for the fix to adding path to local.rc to fix dep issues to EP which I didn't look at the author, only assumed the same only cause there have been demos on using both together.  Now that I know they are both by separate folks that explains why the demos to use both are outdated and most likely will not work on nano due to space at default location.

 

Later it evolved as I began to remember other things.  My bad.

I will post to EP thread about maybe needing to have ability to change portal storage location.  Or, since I have been sorta learning the module format I will just customize the code on my nano to fit what makes sense to me.

Share this post


Link to post
Share on other sites

Hi mates! I ve got a problem when i using module Portal Auth on my wifipineapple nano - Android. In the end of making my portal (where i have to push the button Clone POrtal in Cloner Options  i got an error : "An error has occured...." Other text on russian language, means  "confirm your actions..." as usual it appears on actions. What is going wrong? Is that module works?

Please share working links how to make working portal.

With Best Regards  

 

Screenshot_of Error Portal Auth

 

Share this post


Link to post
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.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...