Home > Insights 

This Blog

Syndication

Calendar

<February 2008>
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
2425262728291
2345678

CA Security Advisor Research Blog

Find out what our research team is saying about the latest security threats in the CA Security Advisor blog

PayPal Closes a Phishing Vulnerability

Take a close look at this image.  You can click to enlarge it.

 


 

It looks like the PayPal login page, but some things are off. For one, the title is "Login - PayPal Phishing Proof of Concept". That is because this isn't the PayPal login page at all, but a Phishing proof of concept. It was hosted on PayPal's servers and secured with PayPal's security certificates, but I had complete control over all the HTML, including where the login form sent usernames and passwords. This page would not have been caught by any of today's anti-phishing programs, because thanks to a vulnerability, PayPal itself was serving this page.


Thankfully, the people we contacted at PayPal were responsive and the vulnerability was resolved within minutes. To our knowledge, their quick action prevented any customers from coming to harm as a result of this vulnerability, and we applaud their speedy and responsible action on this issue. It serves as a reminder, however, of the importance of secure development when web sites are being brought online, and the importance of speedy reaction when vulnerabilities are discovered.


This vulnerability stemmed from an error jsp designed for server-side inclusion. When a page on paypal needed error messages to display, it could call this jsp and pass in the message it wanted via the err_message variable. The jsp would return that same message, formatted in a yellow box with an exclamation point graphic in front of it. This jsp was, however, open to the public in addition to being callable by other PayPal pages. The photograph below shows an example of a simple "Hello World" message being passed in to it:

 


 

This page was initially forwarded to me as a joke, with people exploiting it to make PayPal return humorous or insulting error messages. Some quick tests, however, indicated no checks were being performed on the input. The JSP wasn't differentiating between POST and GET variables, and did not filter the contents of this variable at all. This meant that HTML and Javascript could be passed in place of "Hello World", and they would be inserted verbatim into the returned page at a fixed location.


It may not seem like much, but this is all that someone needs in order to perform all sorts of mischief. Browser exploit code could have been posted, causing visitors to download and run malware. The real risk associated with this type vulnerability, however, is phishing. If the right code was passed in, the yellow box and error message can be hidden, and the contents of any other PayPal page could be displayed in their stead, modified in order to return login details or other personal information to a third party server. Since the page is being generated and returned by PayPal's servers, however, automated anti-phishing programs and even casual user inspection would reveal nothing wrong. In all aspects other than the URL path and aspects of the source code, the page would be indistinguishable from a legitimate login form. It would even be retuned over an https connection secured with PayPal's security certificates:



Thankfully, in PayPal's case, the malicious exploit of this vulnerability seems to have been avoided. Similar vulnerabilities almost certainly exist across the web, however, and we want to take this opportunity to urge web application developers to follow stringent security practices. Follow a least-access approach, preventing outside users from being able to request objects which are designed as server-side includes, and always perform checks on your input to remove potentially harmful HTML and Javascript.

 

Share this post: Email it! | bookmark it! | digg it! | reddit!

Comments

binary-zero said:

Thanks for sharing.

February 17, 2008 12:34 PM

mike said:

My Paypal account was compromised by this scam. I spoke to Paypal supervisor who stated there was no major threat at that time, which was a lie. After two weeks, Paypal finally put the money back into my bank account, but refused to pay bank fees incurred, due to their lack of security. After threatening to go to the media, they put 48.00 into my Paypal account for 8 days of fees. I understand there are alot of threats out there, but any big target companies like Paypal should have 24 hr monitoring and testing to maximize security.

May 7, 2008 11:22 AM

jean volk said:

this is along with all others I have printed out, are extremely educational to me, as I am  cautious, yet this has enabled me to be even more so. there are things that never ever even crossed my mind could happen on the internet. too bad, for us honest people. with technology we can be more proficient, but so can the hackers, unfortunately. Everyone out there please beware, and protect your identity.

May 19, 2008 11:43 PM

Leave a Comment

(required)  
(optional)
(required)  
Add

About Stefan Berteau

Stefan Berteau is a senior research engineer with CA's Anti-Spyware Research team. He holds a B.S. in Multimedia Design and Development from American University, where his studies concentrated on machine learning and graphics programming. Stefan's research-related interests include automated identification and behavioral analysis of threats, analysis of the complex systems created by botnets, modeling the economics of malware, and cryptography.
 
 
Page Tools