Jump to content
Hak5 Forums
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

@onion2346 I updated the module with the requested changes.  You can pull the latest here or wait for the PR to be merged into the modules repo.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.

×