<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-35979354</id><updated>2024-09-01T08:29:03.524Z</updated><category term="developer"/><category term="security"/><category term="users"/><category term="output filtering"/><category term="xsrf"/><category term="spicon"/><category term="xss"/><category term="good habits"/><category term="other"/><category term="OWASP Top 10"/><category term="uxss"/><category term="browsers"/><category term="customers"/><category term="groovy"/><category term="repost"/><category term="offtopic"/><category term="phishing"/><category term="politics"/><category term="blackhat"/><category term="defcon"/><category term="libraries"/><category term="pen testing"/><category term="resources"/><category term="spam"/><category term="web 2.0"/><category term="SANS"/><category term="books"/><category term="class"/><category term="clickjacking"/><category term="eclipse"/><category term="giac sans gssp"/><category term="injection"/><category term="iphone"/><category term="mozilla"/><category term="owasp"/><category term="passwords"/><category term="qa"/><category term="rails"/><category term="wasc"/><category term="xpfa"/><category term="xslt"/><title type='text'>Sylvan von Stuppe</title><subtitle type='html'>Web Application Security.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default?start-index=26&amp;max-results=25'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>176</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-35979354.post-289851952250252754</id><published>2009-11-19T02:20:00.000Z</published><updated>2009-11-19T02:20:52.069Z</updated><title type='text'>A Non-Technical Rant</title><content type='html'>First, if you&#39;re looking for a post that is exemplary in its technical merit, this isn&#39;t it.&lt;br /&gt;
&lt;br /&gt;
Second, my apologies for the long silence.  I&#39;ve been working on exciting stuff, but that&#39;s no excuse for posting nothing for this long of a period.&lt;br /&gt;
&lt;br /&gt;
Now for our regularly-scheduled complaint...&lt;br /&gt;
&lt;br /&gt;
I received some news today that was very disturbing.  The thing in the news that bothered me was not that the person who sent the news disagreed with me - I&#39;m not bothered by that.  I tend to embrace being a bit different.&lt;br /&gt;
&lt;br /&gt;
But what bothered me was a statement in the end of the message.  The end of the message said that the team I was working with needed to spend more time researching ways to make defensive coding completely invisible to developers.  The people who made this statement were way smarter than me, so I must be completely in the dark here.&lt;br /&gt;
&lt;br /&gt;
Defensive coding should be automatic, yes.  Invisible?  Never.  Similarly to shielding your children from every bacteria and virus that might come their way, only to find they spend the remainder of their life sick, these people think that the way to have more defensive code is to make it totally invisible to developers.  Developers should be trained less on defensive programming so that when new attack vectors come out, the &lt;strong&gt;only&lt;/strong&gt; people who can rescue them are security professionals.  (Security professionals - what&#39;s our track record so far when we do things our way?)&lt;br /&gt;
&lt;br /&gt;
So the gist of the statement was this - developers are too stupid to write defensive code.  Functional code is no problem, but defensive code is serious business that we need to leave to the security professionals.&lt;br /&gt;
&lt;br /&gt;
You trust developers to handle your income tax returns, but don&#39;t trust them to use prepared statements on purpose?&lt;br /&gt;
&lt;br /&gt;
You trust developers to navigate the space shuttle, but doing some proper input validation is too complex for them?&lt;br /&gt;
&lt;br /&gt;
You trust developers with sensitive health care information, but think that they&#39;re too dull to properly obfuscate it when logging?&lt;br /&gt;
&lt;br /&gt;
See, this is exactly what the problem is right now.  We security people think that everybody else is too stupid to get it, and that we have to rescue them.  We can&#39;t possibly hold people accountable for gaining new knowledge?  Look - the security vulnerabilities we find today aren&#39;t new.  People had to program defensively long before there was a security industry.  But now that there&#39;s a security industry, the best thing we can do is make writing good code transparent?  Pshaw!  If the coders aren&#39;t doing things right, raise your standards.  If you are or know a programmer, you know the way to motivate them - tell them it can&#39;t be done.  That will show you who the real programmers are.  (But I&#39;m still convinced that a decent blacklist simply cannot be written.)&lt;br /&gt;
&lt;br /&gt;
A previous group I worked with used a set of tools I had written as a benchmark for hiring people.  This isn&#39;t to say that what I wrote was rocket science - it just took some time, reading, and mostly tinkering.  Nobody we hired was able to crack the nut in a reasonable amount of time - but we weren&#39;t looking for the people who could figure it out in an hour - the people we hired were the ones who tried - who weren&#39;t scared of a challenge - who were convinced it &lt;strong&gt;could&lt;/strong&gt; be done, and who were determined to find a way to do it.&lt;br /&gt;
&lt;br /&gt;
There do exist people with that mindset.  The real programmers are those people.  And they&#39;re not so stupid that you have to make everything invisible to them.  They&#39;re smart enough that once you make the need clear to them, they will do the right thing automatically - because it&#39;s the right thing.  They&#39;re the ones who will program defensively when there aren&#39;t automated tools around making their code defensive without them knowing it.&lt;br /&gt;
&lt;br /&gt;
EORant.</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/289851952250252754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2009/11/non-technical-rant.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/289851952250252754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/289851952250252754'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2009/11/non-technical-rant.html' title='A Non-Technical Rant'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35979354.post-3350335405065923262</id><published>2009-06-16T13:19:00.000Z</published><updated>2009-06-16T13:19:10.679Z</updated><title type='text'>50 Ways to Inject Your SQL</title><content type='html'>&lt;div style=&quot;text-align:center&quot;&gt;&lt;object width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/5pSsLnNJIa4&amp;hl=en&amp;fs=1&amp;&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/5pSsLnNJIa4&amp;hl=en&amp;fs=1&amp;&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;br /&gt;
If I had to rate it, it&#39;d be an A+ on musicianship (I mean - who can&#39;t get an A+ for a parody of a Paul Simon song?), an A+ on lyrics (that&#39;s not the easiest song in the world to write new lyrics to), and a B+ on technology - only because with a video that short, it&#39;s really difficult to demonstrate receiving the results out of band - like in PDF, images, or by forcing the database server to do DNS lookups and logging the DNS events.  But it&#39;s still good fun.</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/3350335405065923262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2009/06/50-ways-to-inject-your-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/3350335405065923262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/3350335405065923262'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2009/06/50-ways-to-inject-your-sql.html' title='50 Ways to Inject Your SQL'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35979354.post-631237324484479526</id><published>2009-03-05T02:42:00.000Z</published><updated>2009-03-05T02:42:01.176Z</updated><title type='text'>Building Security In Maturity Model</title><content type='html'>It&#39;s no secret I&#39;m a big fan of the work that Gary McGraw, Brian Chess, and Sammy Migues have done on the Building Security In Maturity Model (BSIMM).  The idea of any maturity model is to have a set of criteria in any process that demonstrate how maturely the process is being run.  While it&#39;s not an exact science, it is a pretty good comparative model, and for any process that is not fully matured or innovating, it gives some idea what the &quot;next steps&quot; are to improving the process.  The good news about the BSIMM is that they didn&#39;t just make up the criteria for the model - they dealt with ten companies from several industries to get a picture of what some of the mature practices are out there.&lt;br /&gt;
&lt;br /&gt;
One of the great things about the results of their research is that they&#39;ve released the results under the &lt;a href=&quot;http://creativecommons.org/licenses/by-sa/3.0/&quot;&gt;Creative Commons Attribution - Share Alike 3.0 License&lt;/a&gt;.  But it&#39;s also good to know that the run-time testing is not limited to penetration testing by the software security group, but includes fuzzing and failure or abuse cases in QA.&lt;br /&gt;
&lt;br /&gt;
Anyway, I can&#39;t provide any more valuable information that what&#39;s in the model itself.  &lt;a href=&quot;http://www.bsi-mm.com/&quot;&gt;So go take a look.&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/631237324484479526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2009/03/building-security-in-maturity-model.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/631237324484479526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/631237324484479526'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2009/03/building-security-in-maturity-model.html' title='Building Security In Maturity Model'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35979354.post-2744603652122137276</id><published>2009-02-22T22:24:00.000Z</published><updated>2009-02-22T22:24:21.050Z</updated><title type='text'>Dealing with SQL Injection Part I</title><content type='html'>It turns out the new cool way of spreading malware is by SQL Injection.  SQL Injection is also my favorite way of getting almost every piece of data available in the application.  But I&#39;m a solutions guy, and this is a solutions blog, so let&#39;s learn how to deal with it.&lt;br /&gt;
&lt;br /&gt;
As Jeremiah said in his &lt;a href=&quot;http://jeremiahgrossman.blogspot.com/2009/02/sql-injection-eye-of-storm.html&quot;&gt;excellent post&lt;/a&gt; on the subject, a way (not necessarily the best way) of finding injection points is by outside in penetration testing.  Trying particular sets of metacharacters might yield a database error, and you can often tell if the application is giving the error or if the database is giving the error.  There are a couple of flaws with this approach:  1) programmers know errors are bad, and often do what they can to hide those, so you might not get adequate enough information to formulate a good attack.  2) Black-box penetration testing will only find a subset of the problems.  If a particular injection is only exploitable on Tuesday, for instance, if it&#39;s not exercised on a Tuesday, it&#39;s never found.  (These are called &amp;quot;corner cases&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The best place to fix SQL Injection vulnerabilities is in the source code.  And if you have access to the source code, the absolute best method of finding SQL Injection points is by source code analysis - preferably a combination using automated static analysis tools and manual analysis.  The way static analysis tools work to find the injection points is by marking data that enters the application as tainted or untrusted.  Expensive tools can trace the taint through the application, through API calls, assignments, etc. until the data goes into a function that&#39;s not trusted.  SQL Injections happen when untrusted data is concatenated into a query to be used in a prepared statement or query.  Some example API&#39;s include in .NET &lt;span style=&quot;font-family: monospace&quot;&gt;DbCommand.CommandText&lt;/span&gt; (and children), or JDBC &lt;span style=&quot;font-family: monospace&quot;&gt;Statement.execute*&lt;/span&gt; or &lt;span style=&quot;font-family: monospace&quot;&gt;Connection.prepareStatement&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
Here&#39;s a quick example from a web application:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;Connection conn = DBUtil.getConnection();
Statement stmt = conn.createStatement();
String sql = &quot;SELECT id, surname, givenName FROM person WHERE surname = &#39;&quot;
  + request.getParameter(&quot;surname&quot;)
  + &quot;&#39;&quot;;
ResultSet rs = stmt.executeQuery(sql);
&lt;/pre&gt;&lt;br /&gt;
There are two things that need to be corrected in the code above:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Rather than using a concatenated query, we should use a prepared statement, parameterized query, bind variables statement, whatever you want to call it.  This allows the database driver to properly escape and transmit data to the query.  For repeated queries, it also &lt;strong&gt;substantially&lt;/strong&gt; improves performance.&lt;/li&gt;
&lt;li&gt;Some sort of input validation needs to take place on the request parameter &amp;quot;surname&amp;quot; to verify that it&#39;s a legal surname syntax according to our syntax.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
Here&#39;s the improved code using the first item:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;Connection conn = DBUtil.getConnection();
String sql = &quot;SELECT id, surname, givenName FROM person WHERE surname = ?&quot;;
PreparedStatement stmt = conn.prepareStatement(sql);
stmt.setString(1, request.getParameter(&quot;surname&quot;));
ResultSet rs = stmt.executeQuery();
&lt;/pre&gt;&lt;br /&gt;
It&#39;s important to note that using PreparedStatement doesn&#39;t immediately make the code immune.  You have to use them properly by using bind variables.  The syntax for using them differs from driver to driver and RDBMS to RDBMS, but question marks are pretty common.  Some things can&#39;t be bound, however.  Only constant values can be bound, so if you&#39;re depending on the user to provide table or column names, you need to make sure it is exactly one of the allowed values, or use a lookup method such as a map to map integers to the column names.  Also, LIKE statements seem to cause people grief - you need to concatenate the percent signs to the bind variables like &amp;quot;&lt;span style=&quot;font-family:monospace&quot;&gt;WHERE foo LIKE &#39;%&#39; + ? &#39;%&#39;&lt;/span&gt;&amp;quot; or &amp;quot;&lt;span style=&quot;font-family:monospace&quot;&gt;WHERE foo LIKE CONCAT(&#39;%&#39;,?,&#39;%&#39;)&lt;/span&gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
As above, the other thing that needs to happen is input validation.  I picked surname on purpose because the most common SQL metacharacter first used for injection is the apostrophe.  An apostrophe might also be allowable in a surname.  So it becomes a perfect example of why prepared statements work so well - it doesn&#39;t mean that you don&#39;t have to use apostrophes.  Here&#39;s an updated version that takes pretty complex US-ASCII surnames including apostrophes, but still gets those safely to the query later.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;String search = request.getParameter(&quot;surname&quot;);
if (search == null || !search.matches(&quot;^([A-Za-z][a-z]*[&#39; ])?[A-Z][a-z]+(-([A-Za-z][a-z]*[&#39; ])?[A-Z][a-z]+)?$&quot;)) {
  rejectInput();
}
Connection conn = DBUtil.getConnection();
String sql = &quot;SELECT id, surname, givenName FROM person WHERE surname = ?&quot;;
PreparedStatement stmt = conn.prepareStatement(sql);
stmt.setString(1, search);
ResultSet rs = stmt.executeQuery();
&lt;/pre&gt;&lt;br /&gt;
Also, it&#39;s worth noting that simply using stored procedures &lt;strong&gt;does not&lt;/strong&gt; remove SQL Injection vulnerabilities.  There are two ways that injection can still take place - either by the way the statement is called from the code (with an EXEC with user data concatenated into it), or if the stored procedure uses concatenation to build a dynamic query - all you&#39;ve done is moved the injection attack into the stored procedure, effectively using the prepared statement to safely transport the attack there.</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/2744603652122137276/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2009/02/dealing-with-sql-injection-part-i.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/2744603652122137276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/2744603652122137276'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2009/02/dealing-with-sql-injection-part-i.html' title='Dealing with SQL Injection Part I'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35979354.post-805699878546881560</id><published>2009-02-13T03:29:00.022Z</published><updated>2009-02-13T03:57:40.598Z</updated><title type='text'>Mmmm...Springtime!</title><content type='html'>Can you smell that?  sssnnnnnnifffffff.....  Aahhhh yes.  It&#39;s that time of year.  Yeah, regardless of what &lt;a href=&quot;http://en.wikipedia.org/wiki/Groundhog_Day&quot;&gt;Punxsutawney Phil&lt;/a&gt; might have had to say, it&#39;s springtime!  (You folks in the colder parts of the Northern Hemisphere that won&#39;t thaw until June will just have to bear with the analogy - sorry).  Yeah - it&#39;s the time of year when we clean up and clean out.  &lt;a href=&quot;http://blackhat.com/&quot;&gt;Black Hat&lt;/a&gt; is about to start their rounds, &lt;a href=&quot;http://www.shmoocon.org/&quot;&gt;SchmooCon&lt;/a&gt; just wrapped up, and all the new sales pitches start.&lt;br /&gt;
&lt;br /&gt;
But I think this spring is bound to be a much more delightful one.  I&#39;ve become somewhat disgruntled in the AppSec industry because for a couple of years, we&#39;ve not been focused on app security, but app &lt;strong&gt;in&lt;/strong&gt;security.  I think we left short.  I personally think that finding weaknesses is only good if you have one of two end goals in mind:  either you intend to exploit the weakness for fun and profit (or friends), or you identify them so that you can fix them.  For a couple of years, the industry has grown rapidly, but sadly, mostly to the end that we&#39;re getting really good at identifying weaknesses, but leaving developers with no indications whatsoever about what to do about their problem.  With no solutions, we&#39;ve left our developers with two options: give up and cross your fingers hoping the bad guys never find out, or second, give up and pull the plug on your project.&lt;br /&gt;
&lt;br /&gt;
But there are lots of things going on in AppSec right now which are very promising for those of us who actually want things to get better:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://gartner.com&quot;&gt;Gartner&lt;/a&gt; is releasing a &lt;a href=&quot;http://www.fortify.com/magicquadrant/&quot;&gt;Magic Quadrant on Static Analysis tools&lt;/a&gt;.  While static analysis tools identify weaknesses, they identify them in such a way that developers can actually &lt;strong&gt;do&lt;/strong&gt; something about the problems.  (Please don&#39;t read that the wrong way.  I&#39;m not arguing that static analysis is &amp;quot;better&amp;quot; than blackbox/greybox testing.  Lots of other people have those fights.  Not for me).  This is great news because an industry researcher has put a lot of effort into finding out from the industry what the best tools are in particular areas.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.whitehatsec.com/home/services/waf.html&quot;&gt;WhiteHat Security is providing WAF integration&lt;/a&gt; as one of their many services.  While WAF&#39;s are not a silver bullet, when you don&#39;t have the source code, or a lot of cycles to fix issues, WAF&#39;s are a good stand-up solution to many semantic types of flaws, and a few logical ones, too.  It&#39;s a step in the right direction.&lt;/li&gt;
&lt;li&gt;Gary McGraw, Brian Chess, and Sammy Migues spent a great deal of time working with businesses learning about how they&#39;re dealing with application security, and have put together a &lt;a href=&quot;http://www.informit.com/articles/article.aspx?p=1315431&quot;&gt;Software Security Maturity Model&lt;/a&gt; to help businesses identify where they are in terms of baking in security, and where they need to go next.  My favorite surprise of their investigation?  The one thing that all their subjects said was most important in their program was training.  And not just training on identifying weaknesses, but developing solutions.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://ha.ckers.org/&quot;&gt;RSnake&lt;/a&gt; and others are working with browser vendors to work out solutions to the whole clickjacking thing.  I hate to see the standards-compliant focus of the browsers over the past few years go to back to the browser wars, but the slow-movement of the standards have crippled the advancements of browsers that are helpful in protecting users.&lt;/li&gt;
&lt;li&gt;I&#39;m personally doing a little bit of research on developing securely, and might actually get some work done on the project at some point and have a paper to prove it.  But right now, it&#39;s all just theoretical.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
If you&#39;re new to the blog, I&#39;m passionate about fixing issues.  Certainly, the first step to recovery is admitting you have a problem, but at some point you have to move beyond admitting you have a problem, and working on overcoming the problem.</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/805699878546881560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2009/02/mmmmspringtime.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/805699878546881560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/805699878546881560'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2009/02/mmmmspringtime.html' title='Mmmm...Springtime!'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35979354.post-5882868360597624858</id><published>2009-01-07T22:24:00.000Z</published><updated>2009-01-07T22:35:30.178Z</updated><title type='text'>Twitter Continues to Be Caught With Their Pants Down</title><content type='html'>flee over at &lt;a href=&quot;http://www.fortify.com/&quot;&gt;Fortify&lt;/a&gt; has an excellent analysis of the recent incidents with Twitter where very high-popularity profiles have been hijacked.  The analysis is exceptional, but I have one question:&lt;br /&gt;
&lt;br /&gt;
Does anybody take Twitter seriously?  I mean....really?&lt;br /&gt;
&lt;br /&gt;
Yes, certain brands use it as a means to remind deliberate followers that the brand is indeed still alive.  In fact, is there really a better way to receive notification of the daily &lt;a href=&quot;http://woot.com/&quot;&gt;woot&lt;/a&gt;?  But on the other hand, do followers really trust that Twitter has validated the authenticity of the people sending them tweets?&lt;br /&gt;
&lt;br /&gt;
I suppose that unfortunately, the answer is yes.  Or to be more accurate, I suppose that users have not really thought about it.  In fact, I suppose that a few security-savvy users depend on it as &lt;a href=&quot;http://www.schneier.com/&quot;&gt;Bruce Schneier&lt;/a&gt; thought it necessary to &lt;a href=&quot;http://www.schneier.com/blog/archives/2008/12/schneier_on_twi.html&quot;&gt;clarify&lt;/a&gt; that &lt;a href=&quot;http://twitter.com/bruceschneier&quot;&gt;@bruceschneier&lt;/a&gt; is not &lt;a href=&quot;http://www.schneier.com/&quot;&gt;Bruce Schneier&lt;/a&gt;.  (Or at least not the &lt;a href=&quot;http://www.schneier.com/&quot;&gt;Bruce Schneier&lt;/a&gt; that runs &lt;a href=&quot;http://www.schneier.com/&quot;&gt;schneier.com&lt;/a&gt;.)  And by not thinking about whether Twitter truly authenticates the source of tweets, users implicitly trust the source.&lt;br /&gt;
&lt;br /&gt;
Expect to see a &lt;a href=&quot;http://www.gnupg.org/&quot;&gt;GPG&lt;/a&gt; plugin for &lt;a href=&quot;http://laconi.ca/trac/&quot;&gt;laconica&lt;/a&gt; soon.  (And yes, I do realize how silly of a statement that is.)&lt;br /&gt;
&lt;br /&gt;
And while you&#39;re here, be sure to subscribe to the &lt;a href=&quot;http://blog.fortify.com/&quot;&gt;Fortify Blog&lt;/a&gt;.  Those are all folks who do development and security, and do them both pretty well.</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/5882868360597624858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2009/01/twitter-continues-to-be-caught-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/5882868360597624858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/5882868360597624858'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2009/01/twitter-continues-to-be-caught-with.html' title='Twitter Continues to Be Caught With Their Pants Down'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35979354.post-4251896010637315353</id><published>2009-01-07T00:13:00.000Z</published><updated>2009-01-07T00:36:18.104Z</updated><title type='text'>New Year Rundown</title><content type='html'>I&#39;ve been away from the blog for a bit lately, mostly because of work on a couple of projects that have not necessarily taken all my free time, but they&#39;ve not lent themselves cleanly to a bloggable idea.&lt;br /&gt;
&lt;br /&gt;
For security experts, there&#39;s no real news here.  For developers, some of these tidbits may be of interest.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;There&#39;s a big debate about &lt;a href=&quot;http://blog.fortify.com/blog/fortify/2008/12/15/Penetration-Testing-is-Dead-Long-Live-Penetration-Testing&quot;&gt;whether pen-testing is dead, dying, evolving, or thriving&lt;/a&gt;.  If you really want my opinion on the matter, pen testing is no less important than it has ever been.  However, I think that enterprises need to shift focus from picking their jaw up off the floor to seeing how they can actually correct the issues.  Pen testing will always find flaws that no other form of testing can.  And it can provide good &amp;quot;shock value&amp;quot;.  But pen testing doesn&#39;t solve problems.  For those who have pen testers in the enterprise, they need to understand that the pen test is not the end game - more defensive applications are the goal.  In fact, I don&#39;t think the focus-shift that&#39;s necessary reduces the need for pen-testing, but rather &lt;b&gt;increases&lt;/b&gt; the need for good pen-testers with good documentation ability.&lt;/li&gt;
&lt;li&gt;Gary McGraw and Brian Chess did a superb job culling metrics from nine different enterprises to develop a maturity model for where enterprises are in their application security programs.  As you&#39;ve seen me say before, it&#39;s time for us to get the information that&#39;s in the security experts&#39; hands and properly translate it to developers who are responsible for fixing findings.  &lt;a href=&quot;http://www.informit.com/articles/article.aspx?p=1315431&quot;&gt;See the report here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Every so often I get to work on another scenario for clickjacking.  It really, really scares me.  Certainly, the victim audience would be somewhat smaller than the general XSRF audience, but to think that you can use clickjacking to work around XSRF protections (including CAPTCHA) is frightening.  If you&#39;re in control of it, make sure your site has some framebusting code.  And even that&#39;s not 100% effective.  (Considering IE can force an iframe to load at a particular security zone).&lt;/li&gt;
&lt;li&gt;Regarding the &lt;a href=&quot;http://arstechnica.com/news.ars/post/20081231-theoretical-attacks-yield-practical-attacks-on-ssl-pki.html&quot;&gt;MD5-collision-fake-CA attack&lt;/a&gt; demonstrated at 25C3:  It&#39;s a &lt;b&gt;very&lt;/b&gt; cool attack.  And it completely negates the purpose of CA&#39;s - to validate the authenticity of a site.  &lt;b&gt;But&lt;/b&gt; who are the victims in a successful attack?  The victims would be the people who are susceptible to phishing scams or DNS poisoning, but actually verify the authenticity of certificates.  Sure, the browser will be fooled, but even without properly faking a CA, how many people who fall for phishing attacks don&#39;t click &amp;quot;Yes, I really want to do this foolish thing&amp;quot; when the browser warns them?&lt;/li&gt;
&lt;li&gt;Regarding &lt;a href=&quot;http://arstechnica.com/news.ars/post/20090105-twishing-attacks-steal-data-in-140-characters-or-less.html&quot;&gt;twishing&lt;/a&gt;:  nifty idea.  I wish it were mine.  You can actually see the day that people got twished by the sudden change in their posts that have URL&#39;s in them.  So why is twishing more severe than making thousands of fake twitter accounts?  There are two reasons:  1) Twitter promptly disables ID&#39;s it deems to be automated spam accounts.  Normal user accounts that are suddenly used for sending spam will pass more heuristics for legitimate use, and 2) real people already follow (and trust) the real users who got twished.&lt;/li&gt;
&lt;li&gt;Attackers are continuing to use open redirects in Flash for new phishing attacks.  Yes, just like Java applets or ActiveX controls, your Flash movies need to be analyzed for potential security flaws.  Although there are lots of nifty attacks involving Flash, the simplest are still the most effective.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
And...oh yeah!  Happy New Year!  It&#39;s a delightful time to be in the security industry, and a very good time to be a developer who understands defensive programming.</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/4251896010637315353/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2009/01/new-year-rundown.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/4251896010637315353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/4251896010637315353'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2009/01/new-year-rundown.html' title='New Year Rundown'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35979354.post-8932357913106954178</id><published>2008-11-21T17:07:00.001Z</published><updated>2008-11-21T20:19:48.722Z</updated><category scheme="http://www.blogger.com/atom/ns#" term="clickjacking"/><title type='text'>CAPTCHA-Jacking</title><content type='html'>&lt;a href=&quot;http://ha.ckers.org&quot;&gt;RSnake&lt;/a&gt; and &lt;a href=&quot;http://jeremiahgrossman.blogspot.com&quot;&gt;Jeremiah Grossman&lt;/a&gt; did a really good and thorough job of going over clickjacking and many different ways that it can take place.  And until I sat up one night and made my own example, I didn&#39;t consider how easy and how serious it was.&lt;br /&gt;
&lt;br /&gt;
Before reading on, please note two things:  1) I&#39;m not claiming to have discovered something new, and 2) I&#39;m not recommending a new name or anything.  Rsnake and Jeremiah did all the work and listed a whole series of things that could happen that they admitted were not exhaustive.&lt;br /&gt;
&lt;br /&gt;
However, the most common way to work clickjacking is by completely hiding the target site in a transparent (0.0 opacity) iframe over &amp;quot;the red candy-like button&amp;quot;.  A teammate and I worked through a proof of concept, though where the idea was to make the target site &lt;b&gt;visible&lt;/b&gt; and then use div&#39;s above the iframe to hide all the parts you don&#39;t want.  The most common example would be to have the user solve a CAPTCHA.  There are plenty of sites that explain that using a CAPTCHA is a great way to eliminate XSRF and clickjacking all at once.&lt;br /&gt;
&lt;br /&gt;
RSnake and Jeremiah were right - the best way to avoid clickjacking is by using framebusting code.  That solves a couple of other problems (although because with IE you can specify a security zone for an iframe it&#39;s not bulleproof, but at least you could have noscript that warns the user they might be getting clickjacked) such as dealing with DNS binding attacks.  And if users were better about using different passwords for different sites, you can always ask for their password for sensitive actions.</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/8932357913106954178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/11/captcha-jacking.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/8932357913106954178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/8932357913106954178'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/11/captcha-jacking.html' title='CAPTCHA-Jacking'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35979354.post-721972728965785682</id><published>2008-08-29T11:09:00.000Z</published><updated>2008-08-29T11:30:14.960Z</updated><category scheme="http://www.blogger.com/atom/ns#" term="iphone"/><title type='text'>Favorites Scmavorites</title><content type='html'>Okay, a hundred sites have posted information on the iPhone exploit where you can bypass the security code required to unlock the phone.  I don&#39;t think as I was playing with it last night that I discovered anything that nobody else has discovered.  But I&#39;ll give a run-down of all the nifty things I was able to do with it once I got to the favorites screen:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;If a single favorite has a URL, you can tap that and get Safari - the full shebang, so go to a jailbreak site.  Game over.  I think the security code is stored on the SIM, however, so this wouldn&#39;t necessarily bypass that - but since the phone is jailbroken, you should be able to run a telnet or ssh service in the background (good luck following that IP address for long, though).&lt;/li&gt;&lt;li&gt;If the favorite has a physical address, tap that to get to maps.  More on that later&lt;/li&gt;&lt;li&gt;From Maps, put in the name of a company you know has a website.  When the pin comes up for it, follow the link - back in Safari.  Game over - as above.&lt;/li&gt;&lt;li&gt;From Maps, you can also see the home address of every contact on the phone.  Or overwrite the contact information for every contact on the phone.&lt;/li&gt;&lt;li&gt;If a Favorite has an email address, you can tap the email addy to get to a Mail compose window.  Cancel the message, and you have *full* mail access.  Also, if there are links...&lt;/li&gt;&lt;li&gt;Hit Text Message and you go to the SMS composer window.  Cancel that SMS message, and you can read all their previous SMS messages.&lt;/li&gt;&lt;li&gt;If the victim&#39;s Home button is configured to go to iPod, then you get full iPod controls.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
Now, before you think I&#39;ve gone all gloom and doom on you, I haven&#39;t.  That&#39;s a very targeted attack against a single person.  The most common way this would happen would be as a social engineering attack.  I often get asked if somebody can use my phone because their ride hasn&#39;t shown up at the bus stop yet.  The Emergency Call feature is what that&#39;s for - press Emergency Call and tap the numbers you need, but you don&#39;t get access to all the other junk.  So this is a one person at a time sort of attack.  This isn&#39;t some freaky remote exploit (not that it couldn&#39;t be).&lt;br /&gt;
&lt;br /&gt;
There are a couple of things I haven&#39;t experimented with on this.  First, I&#39;ve only got one iPhone and not a budget for doing research on the iPhone, so jailbreaking it while it was locked could brick my phone at my own personal expense.  If somebody else wants to hit a jailbreak site with a &quot;locked&quot; phone, be my guest.  Second, some websites are able to open Maps from Safari - this works just like opening Youtube.  Can you also open Stocks?  Notes?  Arbitrary other app on the phone?&lt;br /&gt;
&lt;br /&gt;
And of course, Apple will probably have this fixed in the next rev of firmware (putting off copy/paste yet again).  And until that time, you can either make new favorites with just phone numbers, or you can remove all your favorites, or you can change the home button behavior to go to the home screen instead of favorites.  Or you can avoid getting your iPhone into the hands of strangers.</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/721972728965785682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/08/favorites-scmavorites.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/721972728965785682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/721972728965785682'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/08/favorites-scmavorites.html' title='Favorites Scmavorites'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35979354.post-4707941173598733970</id><published>2008-07-23T23:39:00.000Z</published><updated>2008-07-24T00:04:43.246Z</updated><title type='text'>On Source Code Review</title><content type='html'>First of all, &lt;a href=&quot;http://jeremiahgrossman.blogspot.com/&quot;&gt;Jeremiah Grossman&lt;/a&gt;&#39;s periodic &lt;a href=&quot;http://jeremiahgrossman.blogspot.com/2008/07/web-application-security-professionals.html&quot;&gt;Web Application Professional&#39;s Survey&lt;/a&gt; is online - so &lt;a href=&quot;http://www.surveymonkey.com/s.aspx?sm=NrpObLY9LJYz5NIqM7g8ow_3d_3d&quot;&gt;go take it&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
That being said, I&#39;ve kept quite silent on the value of static source code analysis for awhile now because I&#39;m pretty sure what the reaction will be, but one of the questions on the survey was regarding which measures to application security go first.&lt;br /&gt;
&lt;br /&gt;
There have been several places where static analysis has gotten a dissed, where it might not be necessary.  Most notably of which, I think Fortify Software did their own software a disservice at the Iron Chef Blackhat edition at Black Hat last year.  The competition was between some of their source code analyzers and some of their dynamic analyzers.  The application testers won hands down.&lt;br /&gt;
&lt;br /&gt;
Before I begin, know that I believe that there is &lt;b&gt;no&lt;/b&gt; silver bullet to application security.&amp;nbsp; Nor do I think static source code analysis is the &quot;best&quot; method of finding vulnerabilities.&amp;nbsp; Here are some of the valid or most important reasons that static analysis should not stand alone:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Static analysis is really best at finding semantic flaws - bad API use or failure to use certain API&#39;s, etc.&lt;/li&gt;
&lt;li&gt;Static analysis doesn&#39;t give compelling pretty pictures and videos of your application giving up information.&amp;nbsp; The results of a static analysis are only meaningful to developers, and then, only meaningful to developers who understand the real risk of the types of findings.&lt;/li&gt;
&lt;li&gt;Static analysis almost always requires really expensive tools to do a really, really good job.&amp;nbsp; There are grep types of analyzers, but they don&#39;t follow taint through an application.&lt;/li&gt;
&lt;li&gt;Static analysis may analyze components of your code that don&#39;t get used.&amp;nbsp; There are still prioritization decisions to be made.&lt;/li&gt;
&lt;li&gt;Static analysis tools can&#39;t find logical flaws such as privilege escalation or XSRF.&lt;/li&gt;
&lt;li&gt;Static analysis has different requirements than black box testing:&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Developers who understand the code and can fix it&lt;/li&gt;
&lt;li&gt;The source code&lt;/li&gt;
&lt;li&gt;For many tools, the code needs to at least build (doesn&#39;t have to run)&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;However, there are some really, really good reasons static analysis should be a part of your security toolbelt:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt; Static analysis can find vulnerabilities that dynamic analysis can&#39;t - corner cases.&amp;nbsp; &quot;This cross-site scripting flaw only exists on Tuesdays&quot; - if your application was tested in a running state on Monday, you won&#39;t know that the flaw exists.&amp;nbsp; Thread safety issues are &lt;b&gt;very&lt;/b&gt; bad for an application, but a black box test of an application might never cause one to come up, and if it does, it&#39;s nearly impossible to reproduce, and the results don&#39;t say to the oracle that it was that type of vulnerability.&amp;nbsp; (For example, the application gave you access even though you used the wrong password.)&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;The results of static analysis are meaningful to developers.&amp;nbsp; They get lines of code back where untrusted data enters the application, where it flows through the application, and when it exits the application.&amp;nbsp; These are the exact lines that the developers need to fix, which a black box test alone can&#39;t give you.&lt;/li&gt;
&lt;li&gt;Since the results of a static analysis are geared toward the developers, it provides &quot;instant training&quot; for developers.&amp;nbsp; &quot;What does it take to make this shut up?&quot;&amp;nbsp; (While I prefer developers understand &lt;b&gt;why&lt;/b&gt; you want it to shut up, finding all the places is pretty good, too.)&lt;/li&gt;
&lt;li&gt;Static analysis can happen much earlier in the development process, long before the application is functional.&amp;nbsp; This gives black box testers more time to test the really cool stuff that static analysis can&#39;t find.&lt;/li&gt;
&lt;li&gt;Static analysis can take place as part of a build process, automatically generating problem tickets and/or preventing the promotion of code with high-probability, high-risk findings.&amp;nbsp; This can be done with automated black-box tools, but it requires a running environment - many more moving parts. &lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;So I&#39;m convinced that as long as Iron Chef Blackhat is run the same way as it was last year, static analysis will always lose simply because to a spectator, the results are just &lt;b&gt;boring&lt;/b&gt;.&amp;nbsp; However, that doesn&#39;t mean that it shouldn&#39;t be a very, very vital part of the development process.</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/4707941173598733970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/07/on-source-code-review.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/4707941173598733970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/4707941173598733970'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/07/on-source-code-review.html' title='On Source Code Review'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35979354.post-6825211356905704136</id><published>2008-07-02T22:44:00.000Z</published><updated>2008-07-02T22:54:46.340Z</updated><title type='text'>Coding is a Science, not an Art</title><content type='html'>This has more to do with coding than engineering - two different phases of development.&lt;br /&gt;
&lt;br /&gt;
When I&#39;ve done code reviews, when I very clearly see a flaw and point it out, the first response is denial.  (See &lt;a href=&quot;http://jeremiahgrossman.blogspot.com/2007/03/5-stages-of-web-application-security.html&quot;&gt;The Five Stages of Web Application Security Grief&lt;/a&gt; - the devs have the same initial phase.)  Developers are so quick to point out the really old defenses (it&#39;s a hidden form field; we validate that the drop down list only contains the values we expect when we render it).  When you clearly explain the failures of those defenses, they move on to pure denial (&quot;you have to show me&quot;).  Then you show them.&lt;br /&gt;
&lt;br /&gt;
It doesn&#39;t have to be this hard.&lt;br /&gt;
&lt;br /&gt;
Coders, know that writing code is not an art.  It is a science.  If it&#39;s a science, a found failure is not a comment on your value as a human being.  It&#39;s a comment on your tendency to make typos, not press the right key, or simply to not have adequate information to execute the problem at hand.  If I were to say that your &lt;strong&gt;theory&lt;/strong&gt; has a flaw - that hurts.  You&#39;ve really invested something of yourself into that.  But if I simply point out that you failed to carry a 1 or to consider the null hypothesis, or to turn the knob before pressing the button, it hurts much less.&lt;br /&gt;
&lt;br /&gt;
Engineering is different.  But if coders (myself included) were far less defensive about their code and actually valued it enough to take recommendations on how to make it better, we could get to the making it better part much, much sooner.  Value your skill enough to allow others to help you make that skill better.  Even the most elite of ninjas need training.</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/6825211356905704136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/07/coding-is-science-not-art.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/6825211356905704136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/6825211356905704136'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/07/coding-is-science-not-art.html' title='Coding is a Science, not an Art'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35979354.post-4102667105882852597</id><published>2008-06-29T23:49:00.000Z</published><updated>2008-06-29T23:52:43.105Z</updated><title type='text'>Drive By Password Changing</title><content type='html'>Just glancing at some sites that I use day to day, I&#39;ve found yet another that not only doesn&#39;t require the old password to change the password, but also has no other evident controls to prevent XSRF.  And this one is a pretty big one, too.  I notified them, but I&#39;m sure I&#39;ll get a canned help desk response &quot;to change your password, click on the Change Password link and enter your new password twice&quot;.&lt;br /&gt;
&lt;br /&gt;
While I don&#39;t totally disagree with Billy Hoffman&#39;s paranoia of all things Web 2.0, you would think that the more Web 2.0 sites would actually be more concerned about security.  Password issues aren&#39;t specific to Web 2.0, nor is XSRF.  But you would think the people working on implementing new methods would have already figured out how to do the old methods right.</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/4102667105882852597/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/06/drive-by-password-changing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/4102667105882852597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/4102667105882852597'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/06/drive-by-password-changing.html' title='Drive By Password Changing'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35979354.post-8631815013659033168</id><published>2008-06-12T00:03:00.002Z</published><updated>2008-06-12T00:08:00.575Z</updated><title type='text'>Data Destruction</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://blog.makezine.com/upload/2008/06/slaggingHDs061008.jpg&quot;&gt;&lt;img style=&quot;float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px;&quot; src=&quot;http://blog.makezine.com/upload/2008/06/slaggingHDs061008.jpg&quot; border=&quot;0&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;And I thought I was doing the right thing with tools like &lt;a href=&quot;http://dban.sourceforge.net/&quot;&gt;DBAN&lt;/a&gt; (when I only have a little time) or &lt;a href=&quot;http://unixhelp.ed.ac.uk/CGI/man-cgi?shred+1&quot;&gt;shred&lt;/a&gt; so I can set my own paranoia level high.  I suspect at temperatures this high, that there&#39;s little magnetic remnant of the data.  But you have to do this in a secure place (or shred first, melt later).</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/8631815013659033168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/06/data-destruction.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/8631815013659033168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/8631815013659033168'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/06/data-destruction.html' title='Data Destruction'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35979354.post-8238034344891440745</id><published>2008-05-28T02:44:00.003Z</published><updated>2008-05-28T03:05:53.791Z</updated><category scheme="http://www.blogger.com/atom/ns#" term="xpfa"/><title type='text'>XPFA in Hollywood</title><content type='html'>Well, it turns out that Cross-Personality Framing Attacks (XPFA) aren&#39;t just fact, they make good fiction, too.  While &lt;a href=&quot;http://schneier.com/&quot;&gt;Bruce Schneier&lt;/a&gt; asks his readers to come up with &lt;a href=&quot;http://www.schneier.com/blog/archives/2006/06/movieplot_threa_1.html&quot;&gt;movie plot threats&lt;/a&gt;, the writers for &lt;a href=&quot;http://cbs.com/&quot;&gt;CBS&lt;/a&gt; (at the very least) are up to the same.  I saw an episode of &lt;a href=&quot;http://www.cbs.com/primetime/without_a_trace/&quot;&gt;Without a Trace&lt;/a&gt; tonight (Season 4, Episode 5 - or 75 &amp;quot;Honor Bound&amp;quot;) where an XPFA ends up being a very pivotal plot point in the show.  Certainly, there are other fictional shows where similar things happen.&lt;br /&gt;&lt;br /&gt;It&#39;s unfortunate, however, that it doesn&#39;t just make for good fiction.  These types of image-destroying attacks take place all the time, and real peoples&#39; lives are being impacted because of them.  And there&#39;s simply no real defense against it.  Sadly, the only real victims are the people being attacked, and it&#39;s rare that the people who &amp;quot;fall for it&amp;quot; are inconvenienced.  So there&#39;s little incentive for people who read fake profiles and ads to disbelieve what they read.  This one really depends on people to be responsible, and just don&#39;t believe everything you read.</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/8238034344891440745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/05/xpfa-in-hollywood.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/8238034344891440745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/8238034344891440745'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/05/xpfa-in-hollywood.html' title='XPFA in Hollywood'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35979354.post-6592569923921245582</id><published>2008-05-22T22:55:00.002Z</published><updated>2008-05-22T23:25:26.370Z</updated><title type='text'>Maintainable Code</title><content type='html'>I watched a fairly old &lt;a href=&quot;http://video.yahoo.com/watch/568351&quot;&gt;talk by Nicholas Zakas on Maintainable JavaScript&lt;/a&gt; today, and even though it&#39;s not new information by any stretch, it&#39;s certainly relevant.  And you might think that maintainability has nothing to do with security, but maintainability has a substantial impact on security.&lt;br /&gt;&lt;br /&gt;First, a couple of statements about the talk.  While most of the code samples are in Javascript, and some of the discussion is specific to JavaScript, it is certainly relevant to folks writing any type of code - er. except dead-end code that will never go to production, I suppose.  (Unfortunately, you may think it&#39;s not going to production, but alas it will).&lt;br /&gt;&lt;br /&gt;He mentions the following attributes as being fundamental to maintainable code:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Understandable&lt;/li&gt;&lt;li&gt;Intuitive&lt;/li&gt;&lt;li&gt;Adaptable&lt;/li&gt;&lt;li&gt;Extendable&lt;/li&gt;&lt;li&gt;Debuggable&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;These things certainly make it easier to add security to applications that don&#39;t have it.  While some believe that web application scanning and a web application firewall can cure all that ails you, they&#39;re only part of a complete solution - fixing source code and writing good code from the beginning are critical to code defensiveness. &lt;br /&gt;&lt;br /&gt;Another couple of attributes that Nicholas didn&#39;t mention specifically (but he certainly emphasized them) are consistency and testability.&lt;br /&gt;&lt;br /&gt;Consistency is not only making a decision about code formatting (although cosmetic things like that make code review much easier), but consistency should apply to design patterns and library use.  Consistency in design patterns helps code reviewers - once they&#39;ve seen a pattern and how it&#39;s used once, they can begin to see &amp;quot;patterns in the patterns&amp;quot; - when particular algorithms are used and when they&#39;re not.  A code reviewer can provide a much more valuable report when the developers use the same patterns.  Consistency in libraries is critical to properly tuning static analysis tools as well as making recommended solutions that fit within the one scheme of frameworks in use.&lt;br /&gt;&lt;br /&gt;Before I talk about testability, I&#39;ll talk about tests.  Unit tests for code are very helpful during code review because they reveal how methods are supposed to behave.  Not only should unit tests test for functionality, but also boundary cases and exceptions.  If a function is supposed to take a number between 1 and 1,000, what happens when 0.999 is passed or 1,001 or 1000.001?  Does the function fail gracefully?  These types of tests help to reveal deficiencies in the functions themselves, and are helpful in revealing the desired functionality of those components.  So if code is written in a way that it can&#39;t properly be tested (say, it&#39;s hard-wired to production data sources), there&#39;s a good guarantee that the tests are not being written or executed.  And if they&#39;re not being written or executed, then you&#39;re missing two components - the guarantees that negative cases fail gracefully, and the external technical documentation about the desired functionality.&lt;br /&gt;&lt;br /&gt;It was an excellent talk, however I don&#39;t totally agree with him on all points - most notably the use of closures.  While I agree that closures don&#39;t solve everything, in many languages, they actually help the readability and understandability of the code.  Simple is generally better, and closures properly applied can greatly simplify logic.  (Yes, they can be mis-applied).  And I&#39;m undecided on extending objects you don&#39;t own.  Javascript strings need a trim() function, and I&#39;ve become pretty fond of Groovy - and it adds lots of functions I didn&#39;t know I needed (many of which take a closure as an argument).&lt;br /&gt;&lt;br /&gt;So, go watch the video.  And figure out where you can make things more maintainable.  But like in all things - take small steps.</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/6592569923921245582/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/05/maintainable-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/6592569923921245582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/6592569923921245582'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/05/maintainable-code.html' title='Maintainable Code'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35979354.post-826246619619463889</id><published>2008-05-13T23:39:00.002Z</published><updated>2008-05-13T23:52:15.142Z</updated><title type='text'>Somebody Changed My Password!</title><content type='html'>Okay, not really.&lt;br /&gt;&lt;br /&gt;On a very popular website the other day, I went to change my password.  It had two of the three really common boxes required for changing a password:  New Password, and Repeat New Password.  Yes, they fail to prompt the user for their &lt;span style=&quot;font-weight:bold;&quot;&gt;current&lt;/span&gt; password.&lt;br /&gt;&lt;br /&gt;And this is on a site that not only allows, but encourages users to stay logged in.  Their documentation is pretty sparse as it is, but I&#39;ve not found anything on the site explaining to the ordinary user that they shouldn&#39;t stay logged in from a shared computer (where it&#39;s even more likely that just anybody could change my password).&lt;br /&gt;&lt;br /&gt;So I sent in a support request.  I understand there was a lot of talk in my support request about passwords and stuff, so any automated tool would probably think that I wanted to change my password and didn&#39;t know how.  The only problem is, this &quot;automated&quot; tool took two days to reply to me - so I don&#39;t know if it&#39;s an automated response after all.&lt;br /&gt;&lt;br /&gt;The response it took them two days to conjure started with:&lt;br /&gt;&lt;blockquote&gt;Thanks for your email. To change your password:&lt;/blockquote&gt;&lt;br /&gt;So it took two days for a response, making me believe that a human being looked at my support request - and this is what they came up with?!&lt;br /&gt;&lt;br /&gt;Now, most people probably already know the site in question.  I won&#39;t say the site, but this makes it really easy to execute another good &lt;a href=&quot;http://sylvanvonstuppe.blogspot.com/2008/01/social-networking-threat-xpfa.html&quot;&gt;XPFA&lt;/a&gt; against somebody.&lt;br /&gt;&lt;br /&gt;As a side note, I find it really interesting that there are evident XSRF guards in the change password form, but not the most basic of guards - the current password.</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/826246619619463889/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/05/somebody-changed-my-password.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/826246619619463889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/826246619619463889'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/05/somebody-changed-my-password.html' title='Somebody Changed My Password!'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35979354.post-6885694034819652941</id><published>2008-04-26T00:28:00.002Z</published><updated>2008-04-26T00:52:09.216Z</updated><title type='text'>Combination Attacks and Metrics</title><content type='html'>I think the most important benefit of blackbox and graybox application testing is the screenshots.  It&#39;s actually not very helpful to a developer to just tell them &quot;you had x number of XSS&quot;, but to show them the steps that were taken in order to do something really condemning to the application (steal credentials, money, install malware, start a worm, etc.) in order that those who receive it get a better picture of how it really impacts them.&lt;br /&gt;&lt;br /&gt;However, at some point, metrics have to be made.  Somebody has to know if site A is &quot;better&quot; than site B, or if site A is improved over last year.&lt;br /&gt;&lt;br /&gt;But do combination attacks change the picture?  When measured alone, 9.76% of websites were vulnerable to HTTP Response Splitting attacks, but only a trace had Insufficient Authentication, Authorization, or Session Expiration problems.  I would assume Session Fixation would lie in one of those three.  But how many sites actually had both?  Where an attacker can send a URL to a victim with a known session iD, the client takes that ID because of a response splitting (actually, header injection in this case) problem, and the attacker waits for the victim to authenticate (not receiving a new session ID).  Either of the problems alone is pretty bad.  But in combination, that&#39;s very serious.&lt;br /&gt;&lt;br /&gt;Another example would be cross-site scripting and key exposure.  If a site has key exposure problems where an authenticated user can find the email address of all the users in the system by enumerating key numbers, there&#39;s an opportunity for spearphishing.  But if you combine that with an anonymous, reflected Cross-site Scripting exploit, you can make a very compelling attack against users you know to be legitimate users.&lt;br /&gt;&lt;br /&gt;How do folks roll those combinations into their metrics?  I suppose that&#39;s where a consistent scoring algorithm such as CVSS (maybe not CVSS exactly) that takes multiple factors (combinations of vulnerabilities, for example) into account is helpful in keeping metrics that still show the weight of combined problems.</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/6885694034819652941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/04/combination-attacks-and-metrics.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/6885694034819652941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/6885694034819652941'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/04/combination-attacks-and-metrics.html' title='Combination Attacks and Metrics'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35979354.post-4961979478583803654</id><published>2008-04-26T00:27:00.000Z</published><updated>2008-04-26T00:28:47.765Z</updated><title type='text'>Simpson&#39;s paradox</title><content type='html'>Evidently, it has other names, but Simpson&#39;s paradox is a statistical phenomenon such that the combination of success rates is the reverse of the individual success rates.  For example, in each of 1995, 1996, and 1997, David Justice had a better batting average than Derek Jeter.  But the combined batting average of Derek Jeter was better than that of David Justice.&lt;br /&gt;&lt;br /&gt;It happens when one part of the sample is out of proportion to the remainder of the sample.  For example, if the two had similar batting averages over the three year period, except one year, David Justice had three at bats and reached twice.  His batting average for the year would be .667, but it basically gets &quot;lost in the wash&quot;.&lt;br /&gt;&lt;br /&gt;Now I truly understand why they say that you can make statistics say anything you want.</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/4961979478583803654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/04/simpsons-paradox.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/4961979478583803654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/4961979478583803654'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/04/simpsons-paradox.html' title='Simpson&#39;s paradox'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35979354.post-8288091439217166227</id><published>2008-04-13T00:24:00.002Z</published><updated>2008-04-13T00:35:47.950Z</updated><category scheme="http://www.blogger.com/atom/ns#" term="SANS"/><title type='text'>SANS Summit</title><content type='html'>This week I&#39;ll be in Orlando at a SANS summit warmup before the &lt;a href=&quot;http://sans.org/sans2008/?portal=dbebd98e0d80a2df024e989a5d06e245&quot;&gt;training courses&lt;/a&gt;, which are next week.&lt;br /&gt;&lt;br /&gt;I&#39;m very excited about this one because we&#39;ll get to spend a lot of time talking, among other things, about how to roll defensive engineering and programming into the educational process for technology students.&lt;br /&gt;&lt;br /&gt;Security is so easily exploited now because we never learned to program defensively (or never enforced it).  So now, we&#39;re trying to go back and patch the dam.  This is a great opportunity to discuss how we start to make brand new dams that don&#39;t need patching.  And while I don&#39;t know if I would agree with IBM that the &lt;a href=&quot;http://www.darkreading.com/document.asp?doc_id=150830&quot;&gt;Security Business is out of business&lt;/a&gt;, I do agree that we need to make systems that are impervious to attack from the beginning.&lt;br /&gt;&lt;br /&gt;Maybe I&#39;ll get Micky&#39;s autograph while I&#39;m there...</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/8288091439217166227/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/04/sans-summit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/8288091439217166227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/8288091439217166227'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/04/sans-summit.html' title='SANS Summit'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35979354.post-7203465805407425229</id><published>2008-03-21T21:18:00.002Z</published><updated>2008-03-21T21:39:05.744Z</updated><category scheme="http://www.blogger.com/atom/ns#" term="giac sans gssp"/><title type='text'>Not a Failure</title><content type='html'>I can&#39;t go into a whole lot of detail about the exam, but my results for the SANS GSSP-Java came in and I passed.  The exam is still quite young, but some great minds are working on it - &lt;a href=&quot;http://www.ouncelabs.com/company/team.asp&quot;&gt;Ryan Berg&lt;/a&gt; and &lt;a href=&quot;http://www.greebo.net/&quot;&gt;Andrew van der Stock&lt;/a&gt;, as well as having the backing of SANS.&lt;br /&gt;&lt;br /&gt;My hope for the GSSP exams in the future is that they are actually affordable enough that a person without employment can actually get it.  I know that accumulating, writing, and editing questions costs a lot of money, as well as securing an exam location, transmitting exams, scoring exams, communicating back to the people taking the exam, and managing the website.  But for a corporation to pay for their people to take the exam in the first place does little for the corporation unless they&#39;re investing in the training of the employees as well.  But it could serve as an excellent baseline for entry into a lot of shops, but for it to be effective as such, it needs to not cost a year&#39;s salary to study for and take the exam.  I&#39;m not certain at this point what SANS hopes to be the perfect place for the exam.&lt;br /&gt;&lt;br /&gt;Take a look at SANS and see if you can &lt;a href=&quot;http://www.sans-ssi.org/upcoming.php&quot;&gt;schedule an exam date&lt;/a&gt;.  The exam still needs some work, but testers can only help at this point because you have a chance to give input.</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/7203465805407425229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/03/not-failure.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/7203465805407425229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/7203465805407425229'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/03/not-failure.html' title='Not a Failure'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35979354.post-5309679255235490140</id><published>2008-03-17T23:59:00.004Z</published><updated>2008-03-18T00:13:24.946Z</updated><title type='text'>AntiSamy</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://ecx.images-amazon.com/images/I/21frV-RV-7L._AA115_.jpg&quot;&gt;&lt;img style=&quot;float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 200px;&quot; src=&quot;http://ecx.images-amazon.com/images/I/21frV-RV-7L._AA115_.jpg&quot; border=&quot;0&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;To be added to my list of ways to effectively allow HTML without allowing javascript, enter &lt;a href=&quot;http://owasp.org&quot;&gt;OWASP&lt;/a&gt;&#39;s &lt;a href=&quot;http://www.owasp.org/index.php/Category:OWASP_AntiSamy_Project&quot;&gt;AntiSamy library&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;AntiSamy uses home-grown methods of being very specific about what is and is not allowed to come into the application.  And what&#39;s very nice about it is that it already includes configuration for several profiles - online sites that allow HTML.  These profiles somewhat match the profiles of those websites.  For example, the slashdot profile is pretty restrictive, while the MySpace profile allows quite a bit more.&lt;br /&gt;&lt;br /&gt;To be honest, I don&#39;t know how much better AntiSamy is than using a DTD, Schema, or RelaxNG to validate the HTML, *except* that there are additional rules that have to be validated with logical tests.&lt;br /&gt;&lt;br /&gt;One thing that occurred to me while working on a mock-up of using XML validation to perform this validation is that &amp;lt;img tags (or anything with a remote URL) requires special consideration to deal with the possibility of XSRF against other sites.  For example, if an attacker finds an XSRF vulnerability against some site, it&#39;s in their interest to get that URL injected in as many places as possible.  One way to do this is with &amp;lt;img tags in sites that allow them to come from remote sites, or url() constructs in style attributes where a url is permissible.  In order to deal with these, the best way I came up with is to have the server fetch the resource when the tag is entered, then when the page is rendered, to reference the URL locally.  (This also gives the user the benefit of having a static version of an image, even when it expires off the original site).&lt;br /&gt;&lt;br /&gt;Anyhow, cheers again to OWASP.</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/5309679255235490140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/03/antisamy.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/5309679255235490140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/5309679255235490140'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/03/antisamy.html' title='AntiSamy'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35979354.post-5491675630435123916</id><published>2008-02-11T00:00:00.000Z</published><updated>2008-02-11T00:28:16.544Z</updated><category scheme="http://www.blogger.com/atom/ns#" term="passwords"/><category scheme="http://www.blogger.com/atom/ns#" term="security"/><category scheme="http://www.blogger.com/atom/ns#" term="users"/><title type='text'>Password:  Impossible</title><content type='html'>&lt;a href=&quot;http://blogs.securiteam.com/index.php/archives/author/aviram/&quot;&gt;Aviram&lt;/a&gt; had a post on how he thinks password complexity rules are a bad thing.  To a degree, I agree with the post - the more complex you make password requirements, the more likely your users are to try to find some way to subvert that requirement (like Aviram did - change your password a bunch of times so that you can go back to the original).&lt;br /&gt;&lt;br /&gt;Unfortunately, however, passwords are a core part of application security.  Until two-factor systems become convenient for the user and cost-effective for the provider, password complexity rules are a fact of life.  Right now, if a user wants to use two factor authentication, they&#39;re left carrying (or hooking up a webcam to) several RSA tokens, carrying a card in their wallet, and ensuring their cellphone is always on.  Now, I like the idea of using SMS as a two factor verification as the odds of me losing my phone and my wallet (which has all my passwords) at the same time is pretty slim.&lt;br /&gt;&lt;br /&gt;So, how I really feel about password requirements is that I do like them.  For the time being, if all sites used really low-threshold password requirements, it allows users to reuse passwords.  So what if an attacker can&#39;t brute force their way into your bank account?  Do you use that password on some other system?  If that site doesn&#39;t enforce a lockout or a change policy, then how likely is it that the attacker is going to be able to find out that you use that other system?  Do you use the same identity on multiple systems?&lt;br /&gt;&lt;br /&gt;So what is a user to do?  For the typical user, I honestly don&#39;t know.  I use a password safe with about a hundred entries in it.  That password safe is on an SD/USB device I keep in my wallet.  It&#39;s encrypted using AES, and a really long passphrase.  I&#39;m down to a very small number of passwords that I actually remember and know anymore.  But it&#39;s a major inconvenience for anybody who&#39;s using passwords all day every day on different systems.  To really protect your passwords, your safe needs to have a long passphrase and a short lock timeout.  And that doesn&#39;t mean that attackers can&#39;t get the passwords from the clipboard or submitted forms.  For an ordinary user, the first response is probably &quot;why bother?&quot;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Apple_Keychain&quot;&gt;Keychain&lt;/a&gt; is getting close to the level of system integration that makes it easy for users to use.  However, not everything on Mac uses Keychain.  &lt;a href=&quot;http://1passwd.com/&quot;&gt;1Password&lt;/a&gt; adds quite a bit of functionality to extend the ease of use.  But that&#39;s still mac only.  On Windows, there&#39;s &lt;a href=&quot;http://keepass.info/&quot;&gt;KeePass&lt;/a&gt;, which has some nice system integration and some additional features (like TAN&#39;s) that make it really nice.  And since it&#39;s open source, there are alternatives for &lt;a href=&quot;http://www.keepassx.org/&quot;&gt;Mac&lt;/a&gt;, &lt;a href=&quot;http://www.keepassx.org/&quot;&gt;Linux&lt;/a&gt;, and &lt;a href=&quot;http://keepasssd.sourceforge.net/&quot;&gt;mobile&lt;/a&gt; &lt;a href=&quot;http://keepassserver.info/&quot;&gt;devices&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;But I still don&#39;t think that gets the reach to all users the way it needs.  Remembering to back up my password safe is a pain - I need to back it up at a few locations in the event that I lose my device, and I won&#39;t put it on the web where it becomes available for anybody else to download and bang on forever until they unlock it.  I would have to protect the download with a really strong password, but then where am I going to keep &lt;span style=&quot;font-weight: bold;&quot;&gt;that&lt;/span&gt; password?&lt;br /&gt;&lt;br /&gt;And regarding the 90 day change policy - that &lt;span style=&quot;font-weight: bold;&quot;&gt;is&lt;/span&gt; a good thing.  Once an account is compromised, it could be months before it&#39;s actually used because, particularly with financial accounts (credit cards, online bank accounts, etc.), they tend to be sold in lots on the open market.  The person who compromised the account is highly unlikely to be the one to ultimately gain from the account compromise - it&#39;s just an asset to be sold to the highest bidder.</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/5491675630435123916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/02/password-impossible.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/5491675630435123916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/5491675630435123916'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/02/password-impossible.html' title='Password:  Impossible'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35979354.post-6029172797033888376</id><published>2008-01-30T00:32:00.000Z</published><updated>2008-01-30T00:57:33.526Z</updated><category scheme="http://www.blogger.com/atom/ns#" term="users"/><category scheme="http://www.blogger.com/atom/ns#" term="web 2.0"/><title type='text'>Social Networking Threat: XPFA</title><content type='html'>Okay - I didn&#39;t find a new kind of vulnerability or identify some brand new threat.  We&#39;ve seen lots and lots of cases like these:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A teacher fired for material they had on their MySpace page&lt;/li&gt;&lt;li&gt;People not getting a job because of information they put on their Facebook profile&lt;/li&gt;&lt;li&gt;People complaining that somebody close to them got their password and changed information on their social networking profile&lt;/li&gt;&lt;/ul&gt;What surprises me is that actually exploiting the &lt;span style=&quot;font-weight: bold;&quot;&gt;non-existence&lt;/span&gt; of a profile isn&#39;t more prevalent.  The idea that employers are looking at employees&#39; or candidates&#39; social networking profiles is no surprise.  And if many people know that it&#39;s common, why don&#39;t we see more hijacking of a non-existent identity?  If a person doesn&#39;t have a Facebook profile, but they have enemies, why aren&#39;t enemies falsifying profiles?&lt;br /&gt;&lt;br /&gt;This has two benefits for attackers.  The first is the revenge or get-even factor.  If I can falsify somebody&#39;s private life and prevent them from getting a job, promotion, or even a date, is that of value to me?  Depending on the job, promotion, or date at stake, the profile stalker could gain financially - think of all the domain squatting that took place in the early to mid 90&#39;s.  Will we see a similar trend in individuals to protect their &quot;personal brand&quot;?  Will we see indie rock bands have to change their band name when a disgruntled ticket buyer makes a fake version of their site on the social networking site du-jour?&lt;br /&gt;&lt;br /&gt;The consequences of this to the victimized person are clear.  Their name has been slandered by somebody who knew enough information about the victim to make a convincing (yet false) page.  They will have to take time to build a new, true identity.  They will have to take the time to explain to potential employers that there&#39;s a fake out there.&lt;br /&gt;&lt;br /&gt;But companies are at risk as well.  Companies who use this practice could potentially miss the best candidates, or be relying on false information.  They could get rid of the best employees by relying on information they don&#39;t know to be real.  This is the same story as small town teachers getting fired because parents found liquor bottles in the teacher&#39;s trash bin on Tuesday night (whether it was put there by the teacher or not).  And I don&#39;t think we know for sure there won&#39;t be litigation in early termination or whatnot because of falsified social networking information.  (Most states are &quot;right to work&quot; states, meaning you can be fired for no reason, so the potential for this is low).&lt;br /&gt;&lt;br /&gt;All that being said, a couple of colleagues and I came up with a new name for the vulnerability:  Cross-Personality Framing Attacks or XPFA.  We&#39;ll find out if the name gets any traction.&lt;br /&gt;&lt;br /&gt;So how do ordinary users protect themselves?  For those who &lt;span style=&quot;font-weight: bold;&quot;&gt;do&lt;/span&gt; use social networking sites, I recommend using a different password for that site than any other, and change it frequently.  Of course, I recommend this anyway.  And limit the visibility of the information on the site.  And don&#39;t put anything on there you wouldn&#39;t want your mom to see.&lt;br /&gt;&lt;br /&gt;For those who don&#39;t use social networking sites (or the most popular ones), I&#39;m not sure how much protection there really is other than claim your spot early.  The problem is that you&#39;d have to keep your profile public and up-to-date with completely benign information in order to get it linked high in search engines.  Which is sad - the way to protect yourself from a fake social networking profile is to use social networking?&lt;br /&gt;&lt;br /&gt;Perhaps the best solution for users is not to make enemies.  And the best solutions for companies is to make sure they know the site is for real before trusting it.&lt;br /&gt;&lt;br /&gt;Incidentally, I neither condone nor condemn employers using this practice.  I don&#39;t necessarily like it, but in general, it &lt;span style=&quot;font-weight: bold;&quot;&gt;is&lt;/span&gt; information that people want for the public to be aware of.  If I were hiring somebody who had written a book, I would probably at least skim the book before hiring them.  Is this that much different?</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/6029172797033888376/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/01/social-networking-threat-xpfa.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/6029172797033888376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/6029172797033888376'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/01/social-networking-threat-xpfa.html' title='Social Networking Threat: XPFA'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35979354.post-7759609323581859605</id><published>2008-01-09T20:10:00.001Z</published><updated>2008-01-09T20:25:01.281Z</updated><title type='text'>Using Web 2.0 to Identify Phishing</title><content type='html'>&lt;a href=&quot;http://blogs.securiteam.com/index.php/archives/author/noam/&quot;&gt;noam&lt;/a&gt; at &lt;a href=&quot;http://www.securiteam.com/&quot;&gt;SecuriTeam&lt;/a&gt; has started an experiment with searching for a sender of an email to possibly identify spam.  I had had a couple of ideas with regards to phishing (not spam in general) to help combat it, but haven&#39;t spent a lot of cycles on it.&lt;br /&gt;&lt;br /&gt;Currently, most phishing site detection is dependent on a RBL to identify a phishing site.  But botnets are beginning to be the front door into those phishing networks, so you could actually have hundreds of thousands of users follow a phishing link before the same web server is used twice.  Also, because of the famous security question with the same responses as expired/mismatched certificates, the user&#39;s natural response (&amp;quot;Click Yes if you want to do this dumb thing&amp;quot;) is actually the wrong one.&lt;br /&gt;&lt;br /&gt;I had come up with a couple of anti-phishing techniques, but it would require buy-in from frequently-phished companies who wanted to cut back on their own fraud.&lt;br /&gt;&lt;br /&gt;The first idea centered around using heuristics to determine if a site is trying to look like the victim site.  If XYZ.com is the real site we&#39;re trying to lure users from, XYZ.com knows what their look and feel is - the colors they use, the fonts, spacing, key phrases they use, logos, etc.  Browsers actually have enough information when rendering a site to do a lot of these heuristics.  Now, when a user visits a site, and the color scheme closely matches, and there&#39;s an XYZ.com logo, and some words similar to XYZ.com, and a login form, but the host is not in XYZ.com&#39;s address space, the user is warned.  Only now, since we know that the phisher was trying to lure XYZ.com customers and not ABC.com customers, we can give the user three choices:  1) Click YES if you want to go to XYZ.com (the real correct answer), 2) Click NO to do nothing, or 3) Click this &quot;I understand this is silly and I wish to go to ECKSYZ.com&quot; box and click You&#39;ve Been Warned to go to the phishing site.  It&#39;s not perfect, attackers would change just enough to go below the threshold, but depending on how much they wanted to reduce fraud, XYZ.com can change either their heuristics or the threshold score.  Or the user could change the confidence level.&lt;br /&gt;&lt;br /&gt;Another idea I bounced around with a colleague centered around using the user community to make a determination about the legitimacy of a site.  If you visit a site that has a login form, the browser does a check against del.icio.us or Alexa or even Google to determine if the target site has been bookmarked before, or is highly-ranked, or if it&#39;s been searched yet.  The warnings on these, unfortunately, would tend to be a little less clear.  &quot;Nobody has ever bookmarked this site, are you silly enough to be the first?&quot; or &quot;Hmm...this site isn&#39;t very popular - sure you want to do this?&quot;  And of course, attackers can create lots of fake social bookmarking accounts and bookmark their own phishing site.&lt;br /&gt;&lt;br /&gt;So for you plugin developers with gobs of time, go write those so we can see how ineffective they really are.</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/7759609323581859605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/01/using-web-20-to-identify-phishing.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/7759609323581859605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/7759609323581859605'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2008/01/using-web-20-to-identify-phishing.html' title='Using Web 2.0 to Identify Phishing'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35979354.post-3255984677947265150</id><published>2007-12-27T00:55:00.000Z</published><updated>2007-12-27T00:58:58.462Z</updated><category scheme="http://www.blogger.com/atom/ns#" term="mozilla"/><title type='text'>Mozilla Prism</title><content type='html'>Mozilla Prism is another Experiment in the Mozilla labs right now.  The idea is to make desktop launchers for web-based applications where you launch a prism application, and you&#39;re in a browser totally dedicated to that application, which will provide a little better interactivity with the desktop, making web applications feel more like desktop applications.&lt;br /&gt;&lt;br /&gt;As a security tester, I love the idea.  But the one benefit I would hope to get from it (each webapp being sandboxed, so you can have multiple logins to the same application) is still on the to-do list.&lt;br /&gt;&lt;br /&gt;That being said, didn&#39;t Java Web Start die already?</content><link rel='replies' type='application/atom+xml' href='http://sylvanvonstuppe.blogspot.com/feeds/3255984677947265150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2007/12/mozilla-prism.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/3255984677947265150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35979354/posts/default/3255984677947265150'/><link rel='alternate' type='text/html' href='http://sylvanvonstuppe.blogspot.com/2007/12/mozilla-prism.html' title='Mozilla Prism'/><author><name>Sylvan von Stuppe</name><uri>http://www.blogger.com/profile/08678576815667492639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>