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

Security Alert: Susceptible to MITM Attacks #22

Closed
arleslie opened this issue Dec 23, 2015 · 4 comments
Closed

Security Alert: Susceptible to MITM Attacks #22

arleslie opened this issue Dec 23, 2015 · 4 comments

Comments

@arleslie
Copy link

In the documentation it suggests using:

$google2fa_url = Google2FA::getQRCodeGoogleUrl(
    'YourCompany',
    $user->email,
    $user->google2fa_secret
);

This generates a URL to Google Charts.
Using this URL creates a GET request which allows all of the information to sniffed.

Using:

$google2fa_url = Google2FA::getQRCodeGoogleUrl(
    'YourCompany',
    'email',
    'OhHeyThe2faSecret'
);

Returns: https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl=otpauth%3A%2F%2Ftotp%2FYourCompany%3Aemail%3Fsecret%3DOhHeyThe2faSecret%26issuer%3DYourCompany
If you decode the &chl= part you get: otpauth://totp/YourCompany:email?secret=OhHeyThe2faSecret&issuer=YourCompany

The QR code should be generated server side rather than being passed to a 3rd Party.

@arleslie
Copy link
Author

It should be recommended to use Google2FA::getQRCodeInline().

@arleslie
Copy link
Author

Per a little bit more research it appears GET requests are protected with SSL.
My understanding before was that URLS are not encrypted so it appears this is fine unless the SSL to Google is being stripped. (Which if that happens then you're screwed anyway)

@GrahamCampbell
Copy link
Contributor

Yeh, SSL means the whole request in encrypted.

@GrahamCampbell
Copy link
Contributor

The URI is part of that.

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

2 participants