Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2FA not working due Exception #19

Open
unl1k3ly opened this issue Apr 16, 2018 · 2 comments
Open

2FA not working due Exception #19

unl1k3ly opened this issue Apr 16, 2018 · 2 comments
Assignees

Comments

@unl1k3ly
Copy link

unl1k3ly commented Apr 16, 2018

Hi,

Thanks to come up with this awesome tool.

2FA does not work. I've tried to spin a new ec2 and it fails when it gets to 2FA (/authenticate) part.

Entire exception is pasted below:

Exception happened during processing of request from ('137.129.114.42', 55298)
Traceback (most recent call last):
  File "/usr/lib/python3.5/socketserver.py", line 313, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 341, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.5/socketserver.py", line 681, in __init__
    self.handle()
  File "/opt/CredSniper/lib/python3.5/site-packages/werkzeug/serving.py", line 293, in handle
    rv = BaseHTTPRequestHandler.handle(self)
  File "/usr/lib/python3.5/http/server.py", line 422, in handle
    self.handle_one_request()
  File "/opt/CredSniper/lib/python3.5/site-packages/werkzeug/serving.py", line 328, in handle_one_request
    return self.run_wsgi()
  File "/opt/CredSniper/lib/python3.5/site-packages/werkzeug/serving.py", line 270, in run_wsgi
    execute(self.server.app)
  File "/opt/CredSniper/lib/python3.5/site-packages/werkzeug/serving.py", line 258, in execute
    application_iter = app(environ, start_response)
  File "/opt/CredSniper/lib/python3.5/site-packages/flask/app.py", line 1997, in __call__
    return self.wsgi_app(environ, start_response)
  File "/opt/CredSniper/lib/python3.5/site-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/opt/CredSniper/lib/python3.5/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/CredSniper/lib/python3.5/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/opt/CredSniper/modules/gmail/gmail.py", line 53, in authenticate
    triggered = self.trigger()
  File "/opt/CredSniper/modules/gmail/gmail.py", line 155, in trigger
    pass_form.set('Passwd', self.password)
  File "/opt/CredSniper/lib/python3.5/site-packages/mechanicalsoup/form.py", line 258, in set
    raise LinkNotFoundError("No valid element named " + name)
mechanicalsoup.utils.LinkNotFoundError: No valid element named Passwd

Cheers

@DakotaNelson
Copy link
Contributor

If I had to guess, this would be because there's no element on the phishing page (template) named "Passwd" - could you try going through the template and renaming the password field to "Passwd" (I assume by setting its HTML id attribute?) and see if that works?

@ustayready
Copy link
Owner

So, the 'Passwd' field is requested by Gmail when the user-agent is an older browser and is being set during the trigger() function. This may be because Google changed the form field or is no longer using the deprecated version of their page when a browser is older. The error is being caused when CredSniper attempts to authenticate using the phished credentials so that it can trigger the 2FA for SMS, the older versions of Gmail had a form field called 'Passwd' which CredSniper is not able to find. I will need to look into this further.

@ustayready ustayready self-assigned this Jul 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@ustayready @DakotaNelson @unl1k3ly and others