News for hackers. Stuff that matters.
Re:PayPal 2FA Bypass by greyskull on Sunday October 23, 2016 @02:10AM (#12772240)
What could the backend logic possibly be this worked?
Re:PayPal 2FA Bypass by Dinius on Sunday October 23, 2016 @02:20AM (#12772272)
Something like this: (PHP felt like the right approach here :p)

        if ($selectedOption == SECURITY_QUESTION)
  	{
  		if (isset($_POST["SecurityQuestion0"]) && isset(["SecurityQuestion1"]))
  		{
    			if ($_POST["SecurityQuestion0"] != $answer0 || $_POST["SecurityQuestion1"] != $answer1)
  			{
  				// invalid answers
  				return;
  			}
  		}

  		authenticateUser();
  	}
Re:PayPal 2FA Bypass by dkopi on Sunday October 23, 2016 @02:37AM (#12772321)
More likely along the lines of

  if ((isset($_POST["SecurityQuestion0"]) && $_POST["SecurityQuestion0"] != $answer0) || 
  (isset($_POST["SecurityQuestion1"]) && $_POST["SecurityQuestion1"] != $answer1)
Re:PayPal 2FA Bypass by Chyzwar on Sunday October 23, 2016 @06:16AM (#12772849)
You should use !==.

isset is do not handle all corner cases, it would return true for empty strings or false for NULL. You should use framework like Laravel: Input::has('key')

By design type of security challenge should not be an option. API endpoint should not check for $selectedOption == SECURITY_QUESTION. In this case you still vulnerable for the same attack.

You always should return something. having just return; is bad.

Finally you should use something safer than PHP since mistake can cost you money.

Re:PayPal 2FA Bypass by sinaa on Sunday October 23, 2016 @05:55AM (#12772793)
likely using the following pseudo-ish code:

  # possibly done using a session variable
  security_questions = []
  # first question
  security_questions.push({question: answer})
  # second question
  security_questions.push({question: answer})
  
  forEach(security_questions as x)
      if(!validate_answer(x))
           return false;

  return true;
Re:PayPal 2FA Bypass by citruspi on Sunday October 23, 2016 @02:32AM (#12772307)
Hopefully not, but I've seen worse.

     def validate_security_questions():
        if not question_0 or not question_1:
            raise AuthException('Invalid security questions')

    try:
        validate_security_questions(question_0, question_1)
    except AuthException as ex:
        # Todo: Present error to user
        pass
Re:PayPal 2FA Bypass by djf1 on Sunday October 23, 2016 @02:27AM (#12772293)

  return all([is_valid_answer(q, a) for q, a in params])
Re:PayPal 2FA Bypass by psybin on Sunday October 23, 2016 @02:20AM (#12772274)
If there's a SMS challenge, process.

If there's a question challenge, process.

If no exceptions were thrown, you're authenticated.