Monday, 26 September 2011

Cyber Security and Kids

As a parent I worry every day about keeping my children safe. As schools and education increasingly becomes more dependent on the internet, cybersafety is a concern which has plagued many parents, including myself.

Each new school year - parents, schools and many volunteer organizations spend a lot of time and resources to review and remind the kids on how to be aware and safe from the various dangers that they may face. From bike safety to playground safety to bullying to drug and alcohol awareness. It struck me that there is not enough taught to kids about online safety and this has to change. The safety issue starts as early as elementary school, as more and more schools are getting connected and the internet begins to play a crucial role in our children's education.

With every new school assignment I find myself loosening the parental controls that I have set on their computer accounts. As I struggle to find the right balance between giving my kids access to what the internet has to offer and keeping them safe, I realize that I cannot isolate them from the dangers that lurk in cyberspace. It seems inevitable that they will at some point encounter a malicious link or website and the best I can do as their parent, is to educate them on cybersecurity and cybersafety.

A great set of resources, tools and age appropriate materials that I recently found to help me get started was on C-SAVE or Cyber Security Awareness Volunteer Education website. Part of the NCSA(National Cyber Security Alliance), it is designed to encourage and support professionals to volunteer their time to bring cybersecurity awareness to as many children as possible. I am hoping to share this at our school, in October, as part of the National CyberSecurity Awareness Month and would like to encourage as many of you as possible to do so as well.

Posted by skamani at 1:42 PM in Random

Sunday, 10 July 2011

Terminator vs. Hacker?

Terminator and Hacker are somewhat, similar, they both look cool and more important, they both come from future.

When we build an application, we build it today, fix all the vulnerabilities we know as of today. However, hackers will attack it tomorrow, or next week, or next year, with techniques that we may not even heard of or aware of as of today.

I initially worked for Fortify as a Security Consultant in Asia. And in 4 years, I only saw a few customers who have streamlined processes to handle applications in “maintenance” mode. The easy part is to setup a process using latest version of Fortify SCA with latest rules to scan “maintenance” applications on regular basis even if there is no change in the program code. But the difficult part is to make sure there is always “someone” responsible for taking appropriate actions, or fixing the code if needed.

The same logic applies to real-time protection as well. For instance, Fortify released a special runtime rule in February for Fortify RTA to protect Java applications from a new type of DoS attack. But unless you updated your rules, Fortify RTA won’t be able to stop hackers from using this attack to “Terminate” you.

Posted by sam at 7:07 PM in Random

Monday, 20 July 2009

It's all about the apps

This month Aviv Raff is running a month of (third-party) Twitter bugs. The majority of these bugs are XSS or XSRF and allow attackers to send tweets on behalf of a victim. These third-party web sites are effectively offering open relays that provide spammers and malware authors with new distribution channels and as Aviv notes, these vulnerabilities can be used to create twitter worms too.

Of course, this class of problem isn't limited to Twitter. For example, Facebook also has an open API that allows third-party developers to write their own applications that run on the Facebook platform. When the Facebook API first came out, I took a quick look at it and remember noticing that they did a decent job of preventing HTML and JavaScript injection (at least they were thinking about security). Instead of allowing developers to insert arbitrary HTML, Facebook forces them to use FBML. However, that can lead to FBML Injection. Facebook even has its own query language FQL (similar to SQL), which opens the door to FQL injection.

In the end, even if your favorite social networking websites were secure and never fell prey to another vulnerability (yeah, right), we still need to contend with all of the third-party apps that use their APIs. API providers should include documentation about security in their developer guides. Twitter recently added a Security Best Practices page in their developer section, but I'd like to see security documentation in-line (explicitly included with code examples) rather than a footnote or reference section.
Posted by elee at 5:07 PM in Random

Saturday, 21 March 2009

Look Who's Reading

Who's reading this blog? The author(s) of Conficker, apparently. Here's the story.

 

Conficker's creators have a Ron Rivest fetish. Conflicker uses RC4, RSA, and MD-6 (details here) all of which are the work of Professor Ron Rivest. Last month we blogged about bugs in SHA-3 reference implementations (MD-6 included). This month Conficker C incorporated the MD-6 fix that Ron's group submitted to NIST.

 

Anyway, hello Conficker crew. F*** you very much for your attention.

Technorati Tags:

Posted by bchess at 1:02 PM in Random

Monday, 12 January 2009

CWE/SANS Top 25 Most Dangerous Programming Errors

Over the last few months I have worked with a group of software security experts to develop the CWE/SANS Top 25 Most Dangerous Programming Errors. Working on this project has got me thinking about a key point that we make in Secure Programming with Static Analysis: Most of the people who build software are focused on things other than security (writing code, running test cases, deploying applications, and so on). These people are making security-critical decisions on a daily basis, but they can't afford to become security experts--they've got other things to worry about.

Security is a complicated field and we can't expect everyone to become experts. Software developers and architects, quality assurance testers, and operations engineers all have a wide range of responsibilities. As an industry, our best chance to develop secure software is to get non-experts making meaningful contributions.

We must enable non-experts to get security right. This means arming them with the right processes (building security into the software development lifecycle from the ground up), skills (teaching people to ask "What could go wrong?", not arcane security specifics), and tools (deploying static analysis in development, runtime analysis in QA testing, and active defenses in deployment).

The winds of change are blowing in the right direction. Top universities across the country are beginning to offer courses that either address or focus entirely on software security. Fortify currently works with over 50 universities by helping them incorporate software security into their course offerings and by granting them unrestricted academic licenses for classroom and research purposes. This offer is open to any college or university who wishes to participate.

Despite a sunny outlook, most people building software today have received no formal training on software security. Projects like the OWASP Top 10 and the CWE/SANS Top 25 focus attention on the problems that are causing the most pain, serve as fodder for training programs, and generally increase awareness among non-experts. Let's hope that projects like these continue to carry the banner for software security into the 21st century.

Posted by jwest at 6:27 PM in Random

Reality Check

Masochist McGraw has gone and signed himself up for a second podcast: Reality Check. I was an early victim of his original Silver Bullet series: listen here. Reality Check is all about practitioners, and the first interview is with Steve Lipner. Steve runs the SDL group at Microsoft. A strong way to get started.

Posted by bchess at 4:40 PM in Random

Sunday, 4 January 2009

Tomcat Does Not Love You

Java String objects are immutable, so you can't guarantee sensitive data is removed from memory if you put that sensitive data in a String object. Once data is in a String, it's up to the VM to deallocate the object and then put it back into play as something else, and that might happen sooner, later, or not at all.

That's why paranoid Java programmers don't put secrets (passwords, crypto keys) into String objects. Instead, they treat them as arrays of bytes or characters so they can manually zero out the juicy stuff. At first blush, it appears that Tomcat supports this level of paranoia in the org.apache.catalina.Realm interface:

    public Principal authenticate(String username, byte[] credentials) 

But the RealmBase class, the base class that everyone actually uses, just yanks the rug right out from under your feet:
org/apache/catalina/realm/RealmBase.java:
  342       public Principal authenticate(String username, byte[] credentials) {   343      344           return (authenticate(username, credentials.toString()));   345      346       } 
Yup, that's right, it converts your credentials (read: password) from a byte array into a String. It would be unthinking for Tomcat to provide no way to authenticate without using a String, but providing an interface and then intentionally subverting it seems like calculated cruelty.
Posted by bchess at 10:20 PM in Random

Tuesday, 23 December 2008

Kingdom of the Future

Microsoft has an excellent security culture. Case in point: Michael Howard posted an in-depth explanation of the latest Internet Explorer bug including the key piece of code involved. Read it. Most organizations go to extraordinary lengths to bury a failure as quickly as possible, but Microsoft seems to understand that they have to really understand their failures if they hope to avoid repeating them.

But the big news here is the bug itself. It was use-after-free caused by a thread safety problem. C++ failed twice in one fell swoop: first, the programmer was forced to do direct memory management, and surprise surprise, eventually an object gets freed while there's still a pointer to it. Second, the use-after-free allowed an attacker to execute arbitrary code. That's a pretty high price to pay for a mistake in code that wasn't supposed to have anything to do with pulling in outside instructions, but that's the way it goes in C++.

But even with a better programming language, thread safety is a tough problem. If you're writing in Java or C# or Ruby a thread safety problem probably won't cause you to end up with a vulnerability that allows arbitrary code execution, but you might inadvertently allow one user to see another user's data, and that's plenty bad. Back in 2005, Katrina Tsipenyuk, Gary McGraw, and I wrote a paper titled Seven Pernicious Kingdoms: A Taxonomy of Software Security Errors. We lumped this kind of race condition together with errors caused by distributed computation and called them problems related to "time and state". In the presentations I gave on the paper, I always referred to Time and State as the kingdom of the future, because we're only headed for more CPU cores, more threads, and more interconnected systems, and that means more opportunities for getting out of sync.

Posted by bchess at 11:48 PM in Random

Monday, 15 December 2008

Penetration Testing is Dead, Long Live Penetration Testing

Last week, in a CSO magazine article titled Penetration Testing: Dead in 2009, I said that penetration testing is undergoing a transformation - it's going to die and be reborn as part of a more tightly integrated approach to security. This week Ivan Arce responded in defense of penetration testing in a CSO article titled Twelve Reasons Pen Testing Won't Die. Ivan is a class act, which is why his article isn't titled "12 Reasons Brian Chess is a Ninny." But Ivan doesn't address the core of my original argument, so I'm going to further explain myself here. Let me start by saying this: if you misread the original article to mean "on Jan 1, 2009 all penetration testers are going to go out Jonestown-style", then you need to keep reading.

It's December. For me that usually means my travel schedule winds down, I spend more time doing family stuff, and I start thinking about what I'm going to do next year. This year the travel hasn't let up, and as for the future, all I can think about are the things Gary McGraw, Sammy Migues and I have learned interviewing executives at some the world's top software security programs. We're in the process of building a maturity model out of the data we collected, but some of the stuff we learned is too good to wait. We wrote up a Letterman-style Top 10 Surprises article this month. Check it out.

For me the biggest surprise was about penetration testing. Penetration testing is one of the first things many organizations do when it comes to software security. I believe it to be universally true that if you're not paying attention to security, you have security problems, but it seems most people like to pay a penetration tester prove it to them. Now here's the surprise: as organizations get better at software security, their emphasis on penetration testing diminishes. In most cases it doesn't disappear, but it does get wrapped into a much larger and much more comprehensive approach to improving security. The best initiatives balance the yin and the yang of attack and defense.

We passed an inflection point last year. People are now spending more money on getting code right than they are on proving it's wrong. (More on that here.) This isn't the end of the road for penetration testing, but it does change things. Rather than being a standalone "product", it's going to be more like a product feature. Penetration testing is going to cease being an end unto itself and reemerge as part of a more comprehensive security solution. This kind of thing happens all the time in high-tech. The first PC spell checkers were standalone programs, but the market for stand-alone spell checkers died when they became a standard part of any word processor. These days spell checkers are everywhere (even in my IDE), but there is no market for a standalone spell checker. Proof positive: there aren't even any Web 2.0 or iPhone spell checker startups!

Alright, so why 2009? The time is right because back in 2007, IBM bought a company named WatchFire and HP bought a company named SPI Dynamics. The acquired companies both made web application penetration testing products. IBM and HP spent serious money for these companies'not crazy dotcom prices, but even at HP and IBM you have to have to tell a good story before you get to spend north of seventy million dollars. The good story was that the acquired technology would work together with other products and services to fuel a broad entrée into a rapidly growing software security market. It takes a little while to digest any acquisition, but by now it's been long enough. 2009 will be the year this strategy comes together, and when we look back, it will be the year when most of the world began thinking about penetration testing as part of a larger offering. There will always be boutique security consulting companies with funny names and exotic services, but the industry will grow by integrating security yin and yang. If you'd like a sneak preview of what the future holds, check out the work White Hat Security has done to integrate their vulnerability measurement service with Web application firewalls. This is attack and defense working together in a creative new way.

More than ever before, people understand the software security challenge, and penetration testing deserves credit for helping spread the word. But knowing a security problem exists is not the same as knowing how to fix it. In other words, penetration testing is good for finding the problem and bad for finding the solution. Just like the venerable spell checker, it's going to die and come back in a less distinct but more pervasive form.

Posted by bchess at 3:39 PM in Random

Friday, 12 September 2008

Space Race

McGraw has published his roundup for the software security space in 2007. Lots of juicy numbers. Here it is.

Mark 2007 on your calendar--it was a turning point. It was the first year there was a bigger market for products that help you get code right than there was for products that help you demonstrate a problem exists.

Posted by default at 11:02 PM in Random