Jump to content
sud0nick

[Official] Portal Auth

Recommended Posts

@avinn the first thing that comes to mind is you didn't chmod everything properly after installing the module from GitHub.  If you did you can SSH into the Pineapple and try running the cloner script manually to see what happens.  It's at /pineapple/modules/PortalAuth/includes/scripts/portalclone.py.  Run it with --help to see all of the available options.

  • Like 1

Share this post


Link to post
Share on other sites

Hi @sud0nick. Thanks for that feedback. I did put in the permissions as that was on one of your previous posts. I did as you mentioned and i am trying to clone http://www.starbucks.com.sg but I get the following

root@Pineapple:/sd/modules/PortalAuth/includes/scripts# python portalclone.py --portalName SG --portalArchive /sd/portal

s/ --injectSet Payloader --url http://www.starbucks.com.sg --injectjs --injectcss --injecthtml

Exception in thread Thread-8:

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 60, in downloadFile

    with open(self.resourceDirectory + name, 'wb') as out_file:

IOError: [Errno 22] invalid mode ('wb') or filename: '/sd/portals/SG/resources/main.js?20160817'

 

Exception in thread Thread-6:

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 60, in downloadFile

    with open(self.resourceDirectory + name, 'wb') as out_file:

IOError: [Errno 78] File name too long: '/sd/portals/SG/resources/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl12_TSM&compress=0&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen%3a4ae4914f-8c8e-4123-9d05-414d87b48357%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2014.2.618.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen%3afada54f8-476b-46c3-863a-c1195bffba67%3a16e4e7cd%3addbfcb67%3af7645509%3bTelerik.Sitefinity%2c+Version%3d7.1.5201.0%2c+Culture%3dneutral%2c+PublicKeyToken%3db28c218413bdf563%3aen%3a14209715-61c1-47f8-8900-cbcac63a6099%3a3b9a1b05%3bTelerik.Sitefinity.Search.Impl%2c+Version%3d7.1.5201.0%2c+Culture%3dneutral%2c+PublicKeyToken%3db28c218413bdf563%3aen%3a760a0996-dcaf-4de4-8ff5-3fdca56b65f2%3a7561727d'

 

Exception in thread Thread-5:

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 60, in downloadFile

    with open(self.resourceDirectory + name, 'wb') as out_file:

IOError: [Errno 22] invalid mode ('wb') or filename: '/sd/portals/SG/resources/WebResource.axd?d=NffBwSAZjt_7VJjnTfvJdiG1UQAxq970tS8ggCEcrP49P0zzguVqguvbtA-4uqgcAGV3DNX4o0Wfm-bME8yqajAw9w81&t=635370430285126825'

Complete

 

The portal is created but its preview on the Pineapple shows 403 Forbidden. No error log except the ones above.

Secondly, I don't see a method to select the payload (exe file) as per your Youtube Video. Not sure how that can be done via CLI as I did not see it as part of the injectSet ...

 

Share this post


Link to post
Share on other sites

Seems to have got half the portal with the following traceback when run from CLI

 

root@Pineapple:/sd/modules/PortalAuth/includes/scripts#  python portalclone.py --portalName SGTELL --portalArchive "/sd/

portals/" --injectSet Payloader --url "https://www.singtel.com/personal/products-services/broadband/singtel-wifi" --inje

ctjs --injectcss --injecthtml

Killed

root@Pineapple:/sd/modules/PortalAuth/includes/scripts#  python portalclone.py --portalName SGTELL --portalArchive "/sd/

portals/" --injectSet Payloader --url "https://www.singtel.com/personal/products-services/broadband/singtel-wifi" --inje

ctjs --injectcss --injecthtml

Killed

root@Pineapple:/sd/modules/PortalAuth/includes/scripts#  python portalclone.py --portalName SG --portalArchive "/sd/port

als/" --injectSet Payloader --url "http://www.starbucks.com.sg" --injectjs --injectcss --injecthtml

Exception in thread Thread-8:

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 60, in downloadFile

    with open(self.resourceDirectory + name, 'wb') as out_file:

IOError: [Errno 22] invalid mode ('wb') or filename: '/sd/portals/SG/resources/main.js?20160817'

 

Exception in thread Thread-5:

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 60, in downloadFile

    with open(self.resourceDirectory + name, 'wb') as out_file:

IOError: [Errno 22] invalid mode ('wb') or filename: '/sd/portals/SG/resources/WebResource.axd?d=NffBwSAZjt_7VJjnTfvJdiG1UQAxq970tS8ggCEcrP49P0zzguVqguvbtA-4uqgcAGV3DNX4o0Wfm-bME8yqajAw9w81&t=635370430285126825'

 

Exception in thread Thread-6:

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 60, in downloadFile

    with open(self.resourceDirectory + name, 'wb') as out_file:

IOError: [Errno 78] File name too long: '/sd/portals/SG/resources/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl12_TSM&compress=0&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen%3a4ae4914f-8c8e-4123-9d05-414d87b48357%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2014.2.618.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen%3afada54f8-476b-46c3-863a-c1195bffba67%3a16e4e7cd%3addbfcb67%3af7645509%3bTelerik.Sitefinity%2c+Version%3d7.1.5201.0%2c+Culture%3dneutral%2c+PublicKeyToken%3db28c218413bdf563%3aen%3a14209715-61c1-47f8-8900-cbcac63a6099%3a3b9a1b05%3bTelerik.Sitefinity.Search.Impl%2c+Version%3d7.1.5201.0%2c+Culture%3dneutral%2c+PublicKeyToken%3db28c218413bdf563%3aen%3a760a0996-dcaf-4de4-8ff5-3fdca56b65f2%3a7561727d'

 

Exception in thread Thread-11:

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 59, 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.', ResponseNotReady())

 

Complete 

 

Did not get the tinycss issue though

Share this post


Link to post
Share on other sites

Here are the issues:

IOError: [Errno 22] invalid mode ('wb') or filename: '/sd/portals/SG/resources/main.js?20160817'

IOError: [Errno 78] File name too long: '/sd/portals/SG/resources/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl12_TSM&compress=0&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen%3a4ae4914f-8c8e-4123-9d05-414d87b48357%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2014.2.618.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen%3afada54f8-476b-46c3-863a-c1195bffba67%3a16e4e7cd%3addbfcb67%3af7645509%3bTelerik.Sitefinity%2c+Version%3d7.1.5201.0%2c+Culture%3dneutral%2c+PublicKeyToken%3db28c218413bdf563%3aen%3a14209715-61c1-47f8-8900-cbcac63a6099%3a3b9a1b05%3bTelerik.Sitefinity.Search.Impl%2c+Version%3d7.1.5201.0%2c+Culture%3dneutral%2c+PublicKeyToken%3db28c218413bdf563%3aen%3a760a0996-dcaf-4de4-8ff5-3fdca56b65f2%3a7561727d'

Invalid filename and filename too long.  I'll need to add a check for these exceptions and work around them.

Share this post


Link to post
Share on other sites

Everyone, as of today I've removed the old server used to test for the existence of a captive portal.  If you have not yet upgraded to the latest version of this module from my GitHub you should at least set your test site to https://portalauth.s3.us-east-2.amazonaws.com/cptest.html to regain the portal detection functionality.  Of course, I also recommend just updating to the latest version.

Edited by sud0nick

Share this post


Link to post
Share on other sites
On 6/28/2017 at 4:01 AM, m0nk666 said:

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

How did you manage to get the .exe to be displayed there?

Share this post


Link to post
Share on other sites
Posted (edited)

@Providence It works for me.  Did you configure the upload limit first by clicking the link I've highlighted in this image?

Capture.PNG.94ba9b6b317ac40fcf563781c07083b5.PNG

Edited by sud0nick

Share this post


Link to post
Share on other sites
18 hours ago, sud0nick said:

@Providence It works for me.  Did you configure the upload limit first by clicking the link I've highlighted in this image?

Capture.PNG.94ba9b6b317ac40fcf563781c07083b5.PNG

Thank you, but when i click on it, it just says "Successfully configured and still does not upload

 

also when i try cloning https://google.com/

it fails

Share this post


Link to post
Share on other sites

@Providence open your browser's developer tools and look at the console.  You may be uploading a file that's too large.  If there is some other issue the console might have the reason.

Share this post


Link to post
Share on other sites
Posted (edited)

Tried all known fixes in this post and still getting this error on my nano? 

 

Traceback (most recent call last): File "/pineapple/modules/PortalAuth/includes/scripts/portalclone.py", line 4, in from PortalCloner import PortalCloner File "/sd/modules/PortalAuth/includes/scripts/PortalCloner.py", line 18, in import tinycss ImportError: No module named tinycss

 

Edited by WPA2

Share this post


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

@WPA2 try deleting the module and installing the latest from GitHub.

I already did, can you give me install instructions so i know i did it correctly.  Cheers

Share this post


Link to post
Share on other sites

1. Remove the module from your Pineapple:

rm -rf /pineapple/modules/PortalAuth/

2. Download the zip archive from GitHub (https://github.com/sud0nick/PortalAuth).
3. Extract it and rename PortalAuth-master to PortalAuth.
4. SCP the PortalAuth directory to the Pineapple in the /pineapple/modules/ directory.
5. Change the permissions:

chmod 755 -R /pineapple/modules/PortalAuth/

 

Share this post


Link to post
Share on other sites

Hey, I am new into this topic and maybe this is a very basic error that is easy to fix by my own but every time I try to clone a Portal (tried it with a few) I always get the same error msg:

Traceback (most recent call last): File "/pineapple/modules/PortalAuth/includes/scripts/portalclone.py", line 4, in from PortalCloner import PortalCloner File "/sd/modules/PortalAuth/includes/scripts/PortalCloner.py", line 18, in import tinycss ImportError: No module named tinycss

I am very new into this topic and would be very happy if somebody can tell me what to do.

 

Share this post


Link to post
Share on other sites
7 minutes ago, lostnewbie said:

Hey, I am new into this topic and maybe this is a very basic error that is easy to fix by my own but every time I try to clone a Portal (tried it with a few) I always get the same error msg:

Traceback (most recent call last): File "/pineapple/modules/PortalAuth/includes/scripts/portalclone.py", line 4, in from PortalCloner import PortalCloner File "/sd/modules/PortalAuth/includes/scripts/PortalCloner.py", line 18, in import tinycss ImportError: No module named tinycss

I am very new into this topic and would be very happy if somebody can tell me what to do.

 

I am very sorry to bother you; seems like I am not able to read the whole topic properly xD

Share this post


Link to post
Share on other sites
On 8/25/2018 at 2:43 AM, sud0nick said:

@jayiod105, @plubowicz, and @Att3mp7ed-R3c()n if you completely delete the module from your Pineapple and download the latest from my GitHub you will not have this problem.  This is an issue in the current version on the module manager and I have not had time to fix all of the merge conflicts from the pull request to the main repo.  This is why the latest from my GitHub is not available in Hak5's repo yet.

Hi there. Can you tell me how you install this module from github rather than the pineapple module downloader. K

 

Share this post


Link to post
Share on other sites
(cursed screech) I'm looking for a way to encrypt the payload after building with visual studio to avoid detection someone can help me?
 

Share this post


Link to post
Share on other sites
On 4/8/2019 at 4:04 AM, sud0nick said:

1. Remove the module from your Pineapple:


rm -rf /pineapple/modules/PortalAuth/

2. Download the zip archive from GitHub (https://github.com/sud0nick/PortalAuth).
3. Extract it and rename PortalAuth-master to PortalAuth.
4. SCP the PortalAuth directory to the Pineapple in the /pineapple/modules/ directory.
5. Change the permissions:


chmod 755 -R /pineapple/modules/PortalAuth/

 

What is SCP and how do I do this. Linux noobie? ANd thanks for answer . Kev

Share this post


Link to post
Share on other sites

I have this error on the Portal Auth module

 

Traceback (most recent call last): File "/pineapple/modules/PortalAuth/includes/scripts/portalclone.py", line 4, in from PortalCloner import PortalCloner File "/sd/modules/PortalAuth/includes/scripts/PortalCloner.py", line 18, in import tinycss ImportError: No module named tinycss

 

I can´t clone portals 😞

Share this post


Link to post
Share on other sites
Posted (edited)
45 minutes ago, mrjeff said:

No module named tinycss

if you search the forums for tinycss you will see a few suggested fixes. On the TETRA its simple to install python-pip and then pip install tinycss but on a nano that will fill the storage up and sd install of pip is not so easy. I also see some people removing and reinstalling to get it to work, and even going to the github of the portalauth and cloning that to the pineapple instead to get things to work. Plenty to try to resolve your issue.

Edited by Just_a_User

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...