I haven't done much blogging for a while. I will be doing more posts this year. At least that's one of my new year's resolutions! Some of my posts will be original content residing here, but others will be links to articles or posts I've done elsewhere.
I'd like to start 2017 by sharing a link to the webinar I did in 2015 that is aimed at anyone who wants to dip their toes into the world of web application penetration testing. The webinar was for the benefit of the uTest Community, and you therefore need an account to view the webinar. It's easy and free to sign up though.
I'm proud to say the uTest community has given my webinar a stellar rating of 4.86 stars out of 5! If you are new to the field of manual appsec testing, I'm sure you'll find it helpful. Pro tip: install and learn Burp Suite!
The webinar is here:
https://www.utest.com/courses/recorded-webinar-introduction-security-testing-dave-ferguson
Enjoy.
Friday, January 27, 2017
Tuesday, June 16, 2015
OWASP #4 Continues to Laugh at Automated Scanners
I was thinking back to 2006 when I was new to the world of Application Security. Someone on our consulting team arranged a call with a vendor called Secure Software, Inc. They were a company with a code scanning product called CodeAssure, but they were probably best known for a freeware tool called Rough Auditing Tool for Security ("RATS"). The company was bought by Fortify in 2007 and their products essentially died off.
On the call I wanted to better understand how this magical CodeAssure product worked. For example, how could it recognize Insecure Direct Object Reference in a web application? (Actually, that term wasn't even coined yet. Back then it was called Broken Access Control. Come to think of it, I like that name better.) Anyway, I described some of the vulnerabilities I was seeing during my application pen testing where I could edit numerical parameters in the URL or the HTTP request body and gain access to another user's data.
For a moment, there was dead silence on the call. It was one of those times when nobody on their side knew how to answer and they were all hoping that one of their teammates would step up and offer an intelligent response. In the end there was no intelligent response, only dancing around the question as sales people often do. I was a little naive back then to ask the question in the first place. I should have known their product could do absolutely nothing to identify this type of vulnerability.
SAST scanning tools can't be relied upon to identify insecure direct object references. But hey, the same is true for dynamic scanners. DAST tools aren't human and aren't smart enough to know that if you change acct_id=100011 in a URL to acct_id=100012 and you get back a valid response with another person's data that it's a big freaking problem. The exploitability rating of this flaw is off the chart. Almost anyone can perform the attack and it is still happening today. Even big companies that pay attention to security like Citibank can succumb.
The bottom line in my opinion is that you can't use one security testing technique and have confidence that your apps are secure. Multiple testing approaches are needed for the best assurance. Obviously, cost is a factor here, but for your most business-critical applications, I would use SAST, DAST, and manual pen testing. Techniques like IAST and RASP are making strides and have much promise as well. Both of these are going to require development teams to be more involved (and accountable) for application security however.
On the call I wanted to better understand how this magical CodeAssure product worked. For example, how could it recognize Insecure Direct Object Reference in a web application? (Actually, that term wasn't even coined yet. Back then it was called Broken Access Control. Come to think of it, I like that name better.) Anyway, I described some of the vulnerabilities I was seeing during my application pen testing where I could edit numerical parameters in the URL or the HTTP request body and gain access to another user's data.
For a moment, there was dead silence on the call. It was one of those times when nobody on their side knew how to answer and they were all hoping that one of their teammates would step up and offer an intelligent response. In the end there was no intelligent response, only dancing around the question as sales people often do. I was a little naive back then to ask the question in the first place. I should have known their product could do absolutely nothing to identify this type of vulnerability.
SAST scanning tools can't be relied upon to identify insecure direct object references. But hey, the same is true for dynamic scanners. DAST tools aren't human and aren't smart enough to know that if you change acct_id=100011 in a URL to acct_id=100012 and you get back a valid response with another person's data that it's a big freaking problem. The exploitability rating of this flaw is off the chart. Almost anyone can perform the attack and it is still happening today. Even big companies that pay attention to security like Citibank can succumb.
The bottom line in my opinion is that you can't use one security testing technique and have confidence that your apps are secure. Multiple testing approaches are needed for the best assurance. Obviously, cost is a factor here, but for your most business-critical applications, I would use SAST, DAST, and manual pen testing. Techniques like IAST and RASP are making strides and have much promise as well. Both of these are going to require development teams to be more involved (and accountable) for application security however.
Friday, May 22, 2015
Bug in WebEx Productivity Tools Exposed Audio Conference Credentials
I recently found a security bug in Cisco's WebEx Productivity Tools. The bug caused your audio conferencing credentials to be sent out in meeting invitations. It was limited in scope to InterCall customers who integrate with WebEx.
Background:
InterCall is an audio conferencing solution and can be used as an alternative to WebEx's built-in audio. My company is starting to roll out WebEx this way. InterCall users have a dedicated conference code and a leader PIN which are your account credentials. The conference code is meant to be public, but the leader PIN is like a password and should be kept confidential. Productivity Tools (PT) is an add-on product for WebEx customers. One of the key features is an integration with Outlook that allows you to create WebEx meetings and send out the invitations from within Outlook.
The Discovery:
First I set up WebEx to use my InterCall account for audio and then downloaded and installed WebEx PT. Next I created a test WebEx meeting from within Outlook and invited one person. Upon clicking "Send", PT securely communicated to the WebEx server to auto-populate the conferencing information in the meetng invite. When the information appeared, I saw my InterCall leader PIN just for a moment before the email was sent. At first I thought it was a mistake, but inspection of my Sent Items folder showed that my PIN was indeed sent. The person who received the invite confirmed he got my PIN as well. Wow! How could no one at Cisco or my company notice this? I was unable to find a work-around except for avoiding PT altogether by logging into the WebEx site and creating a meeting from there.
The WebEx meeting host key was also exposed in the email, but that wasn't too worrisome because it changes with each meeting.
The Fix:
I reported this security threat to Cisco (and InterCall) on April 28th. After pestering them for updates, Cisco Engineering finally confirmed to me on May 14 that it was a defect and that they were working on a fix. I can now confirm that the bug has been fixed in WebEx Productivity Tools Version 2.36.13013.10003, which was released on May 19, 2015. I would like to thank both InterCall support and Cisco PSIRT for their attention to this matter. For reasons that are unclear, Cisco hasn't released a security advisory or security alert about this issue This blog post will have to suffice.
I'd like to be able to say that technical acumen and advanced hacking were needed to find this vulnerability. Alas that was not the case! I was just curious about my new WebEx toy, wanted to understand how it worked, and stumbled upon it. Being curious and questioning things... it's what people in information security tend to do.
Update: On May 28th I received an email from WebEx notifying me about the patch for the vulnerability:
Background:
InterCall is an audio conferencing solution and can be used as an alternative to WebEx's built-in audio. My company is starting to roll out WebEx this way. InterCall users have a dedicated conference code and a leader PIN which are your account credentials. The conference code is meant to be public, but the leader PIN is like a password and should be kept confidential. Productivity Tools (PT) is an add-on product for WebEx customers. One of the key features is an integration with Outlook that allows you to create WebEx meetings and send out the invitations from within Outlook.
The Discovery:
First I set up WebEx to use my InterCall account for audio and then downloaded and installed WebEx PT. Next I created a test WebEx meeting from within Outlook and invited one person. Upon clicking "Send", PT securely communicated to the WebEx server to auto-populate the conferencing information in the meetng invite. When the information appeared, I saw my InterCall leader PIN just for a moment before the email was sent. At first I thought it was a mistake, but inspection of my Sent Items folder showed that my PIN was indeed sent. The person who received the invite confirmed he got my PIN as well. Wow! How could no one at Cisco or my company notice this? I was unable to find a work-around except for avoiding PT altogether by logging into the WebEx site and creating a meeting from there.
The WebEx meeting host key was also exposed in the email, but that wasn't too worrisome because it changes with each meeting.
The Fix:
I reported this security threat to Cisco (and InterCall) on April 28th. After pestering them for updates, Cisco Engineering finally confirmed to me on May 14 that it was a defect and that they were working on a fix. I can now confirm that the bug has been fixed in WebEx Productivity Tools Version 2.36.13013.10003, which was released on May 19, 2015. I would like to thank both InterCall support and Cisco PSIRT for their attention to this matter. For reasons that are unclear, Cisco hasn't released a security advisory or security alert about this issue This blog post will have to suffice.
I'd like to be able to say that technical acumen and advanced hacking were needed to find this vulnerability. Alas that was not the case! I was just curious about my new WebEx toy, wanted to understand how it worked, and stumbled upon it. Being curious and questioning things... it's what people in information security tend to do.
Update: On May 28th I received an email from WebEx notifying me about the patch for the vulnerability:
Sunday, December 7, 2014
I Cut My Payment Card in Half and What I Found Surprised Me
Recently I received an American Express card from Citibank to replace my expiring one. Naturally, I cut the old card in half. My customary procedure is then to discard one of the pieces in a trash receptacle at my house and the other piece in a different trash receptacle. I figure this will keep me pretty safe from dumpster-diving fraudsters because the trash receptacles are typically emptied at different times and go into different plastic trash bags.
This time I decided to examine the pieces of my card. What I found was that having only the right-side piece would allow someone to reconstitute the full 15-digit account number! Given where I cut the card, which was pretty much right down the middle, the front showed the last 7 digits and the back showed the first 8 digits. See the photos below (numbers masked for the protection of me).
What's more, the 4-digit security code appeared on the front side and my full signature was visible on the back (also masked for my protection). At least the security code was different on my new card, so once activated, using the old code should cause a payment authorization failure. Still, many e-commerce sites do not require the security code when making a purchase.
So with just half of my old card, the expiration date is the only unknown to a dumpster diver. That is not a big obstacle to overcome at all. Logically, if someone throws away a payment card, the probable reason is that he/she received a new card to replace the expiring one. What would be the expiration date of the new card? It's very likely to be either two years or four years from now - either the current month or the subsequent month.
This reminds me of the story of the torn-up credit card application that I read about a few years ago. A man named Rob Cockerham taped the pieces back together, filled out the application, and sent it in. Amazingly, a shiny new card arrived in the mail for him a few weeks later.
The bottom line is: Be aware that if you cut up your debit cards or credit cards and throw the pieces away in different receptacles like me, you're not necessarily safe from dumpster diving.
I'm asking for a shredder for Christmas.
This time I decided to examine the pieces of my card. What I found was that having only the right-side piece would allow someone to reconstitute the full 15-digit account number! Given where I cut the card, which was pretty much right down the middle, the front showed the last 7 digits and the back showed the first 8 digits. See the photos below (numbers masked for the protection of me).
What's more, the 4-digit security code appeared on the front side and my full signature was visible on the back (also masked for my protection). At least the security code was different on my new card, so once activated, using the old code should cause a payment authorization failure. Still, many e-commerce sites do not require the security code when making a purchase.
So with just half of my old card, the expiration date is the only unknown to a dumpster diver. That is not a big obstacle to overcome at all. Logically, if someone throws away a payment card, the probable reason is that he/she received a new card to replace the expiring one. What would be the expiration date of the new card? It's very likely to be either two years or four years from now - either the current month or the subsequent month.
This reminds me of the story of the torn-up credit card application that I read about a few years ago. A man named Rob Cockerham taped the pieces back together, filled out the application, and sent it in. Amazingly, a shiny new card arrived in the mail for him a few weeks later.
The bottom line is: Be aware that if you cut up your debit cards or credit cards and throw the pieces away in different receptacles like me, you're not necessarily safe from dumpster diving.
I'm asking for a shredder for Christmas.
Thursday, November 20, 2014
Wordlist for Common Pet Names
If you are testing web applications for security, be sure to examine the Forgot Password functionality and attempt to subvert it. It's another way that users can authenticate to the app and is often less secure than the primary method. First you'll need to enumerate usernames (try the username wordlists I made available a while ago). Once you have some valid usernames, the Forgot Password functionality will often present you with a challenge to answer one of the user's personal security questions.
One of the most common security questions you see is "What was the name of your first pet?". If the application doesn't limit the number of attempts, you have a very good chance at answering this question by iterating through different names with a tool like Burp Intruder. The last time I did this successfully, "Rocky" was the name of the user's pet.
You need big list of common pet names to do this. That's exactly what I'm providing here for your download pleasure. My wordlist currently has over 1,400 pet names.
Click here to get the pet name wordlist
Enjoy! Obviously my list can't cover every conceivable pet name, but please let me know if you think I'm missing a common one.
One of the most common security questions you see is "What was the name of your first pet?". If the application doesn't limit the number of attempts, you have a very good chance at answering this question by iterating through different names with a tool like Burp Intruder. The last time I did this successfully, "Rocky" was the name of the user's pet.
You need big list of common pet names to do this. That's exactly what I'm providing here for your download pleasure. My wordlist currently has over 1,400 pet names.
Click here to get the pet name wordlist
Enjoy! Obviously my list can't cover every conceivable pet name, but please let me know if you think I'm missing a common one.
Thursday, October 30, 2014
Disabling SSLv3 in Firefox
With the recent discovery of the POODLE vulnerability in the SSLv3 protocol, I wanted to change my Firefox configuration to disallow SSLv3. Mozilla released an extension for this called SSL Version Control, but I decided not to install it given its somewhat sketchy reviews.
No problem I thought. Time to open the advanced configuration in Firefox by entering "about:config" in the address bar and make the change there. Searching for "security", will show many configuration settings that start with "security.ssl3". Some of them will be set to true and some to false. You would think setting all the values to "false" here would be the solution. Nope! Don't do it. Although the settings have "ssl3" in their name, they actually apply to both SSLv3 and all three TLS versions (1.0, 1.1, and 1.2). If you change them all to false, both SSLv3 and TLS will be disabled and your browser will be incapable of communicating securely at all.
The correct solution, as described here, is easier. Just set "security.tls.version.min" to 1, which means that TLS v1.0 is the minimum allowed version. When set to 0, it means that SSLv3 is allowed. I hope that helps.
This is a temporary work-around anyway as Mozilla says that SSLv3 will be disabled by default starting with Firefox 34.
No problem I thought. Time to open the advanced configuration in Firefox by entering "about:config" in the address bar and make the change there. Searching for "security", will show many configuration settings that start with "security.ssl3". Some of them will be set to true and some to false. You would think setting all the values to "false" here would be the solution. Nope! Don't do it. Although the settings have "ssl3" in their name, they actually apply to both SSLv3 and all three TLS versions (1.0, 1.1, and 1.2). If you change them all to false, both SSLv3 and TLS will be disabled and your browser will be incapable of communicating securely at all.
The correct solution, as described here, is easier. Just set "security.tls.version.min" to 1, which means that TLS v1.0 is the minimum allowed version. When set to 0, it means that SSLv3 is allowed. I hope that helps.
This is a temporary work-around anyway as Mozilla says that SSLv3 will be disabled by default starting with Firefox 34.
Thursday, July 31, 2014
Building Secure Applications: How Mature Are You?
I was invited again to contribute to the blog of application security company Checkmarx. My second post was published a couple of days ago and covers software security and the Building Security In Maturity Model (BSIMM).
Friday, April 25, 2014
Implementing Forgot Password with Email
It turns out that application developers sometimes need to implement a
forgot password feature but don't have much identity data about the
users in the system. Neither can they always be so flexible as to
require users to establish personal security questions. These things
are a key part of my forgot password security recommendations.
But the reality is that sometimes you don't have any information about a
user except their username and email address. Heck, sometimes email
address IS the username.
In this type of situation, implementing a secure forgot password feature is challenging. Sending a password reset link via email is probably the best option (barring a non-automated solution where users call customer support). So here I will offer up some specific ideas on how to secure the process when using email.
(updated on May 5, 2014 based on some feedback I received)
In this type of situation, implementing a secure forgot password feature is challenging. Sending a password reset link via email is probably the best option (barring a non-automated solution where users call customer support). So here I will offer up some specific ideas on how to secure the process when using email.
- When a user invokes the forgot password process, don't say anything about whether the username entered was recognized or not. It should simply display a generic message such as: "Thank you. If the username you provided is valid, we will send you an email with instructions on how to reset your password".
- Along with the above, don't show the email address where the email was sent. It might give legitimate users a warm, fuzzy feeling but it definitely helps attackers in a number of scenarios.
- The password reset link in the email message should incorporate a GUID or similar high-entropy token. The token could be a parameter in the query string or part of the URL path itself. It doesn't really matter.
- Allow only one valid token per user at any given time.
- Make sure the email message does not include the username.
- Make sure the link can be used only once. In other words, invalidate the token immediately when an HTTP request containing that token is received.
- The link should expire. Depending on your situation, implement logic to invalidate the token 10, 20, or 30 minutes after the email is sent out. Make it a configurable value so it can be adjusted if needed without a code change.
- The password reset page (the one that appears after clicking the link) should force the user to re-enter his username.
- If the username entered is incorrect 3 times in a row, lock the account. Remember, your application knows which username is associated with the token. The person attempting to reset the password should know it as well.
- After a successful password reset, send a confirmation email to the user to notify them it happened. This can alert users to fraud if they didn't initiate it.
- Throughout each step of the process, make sure the application is logging everything that occurs so there's a solid audit trail in case something goes haywire.
(updated on May 5, 2014 based on some feedback I received)
Subscribe to:
Posts (Atom)



