Rebooting responsible disclosure!

I am very proud to see this official blog post out:



I am proud of this post not because it adds a yet another voice in the ongoing debate; I am proud because I think it is important and significant for a major commercial vendor to suck it up - and take a genuine, passionate stand behalf of all users instead.


The rhetoric invoked by most software vendors today is very one-sided, and aims to portray the disclosure debate as a petty feud with selfish, arrogant researchers oblivious to the realities of doing business. I find this disingenuous - and so, I sincerely hope that this blog post sets a brand new stone rolling.


PS. On a related note: it's now $3,133.7!

Guerrilla CNC home manufacturing guide

There are about three people in the world who could possibly ever care about this epic work - so today, I am happy to unveil my least useful project to date: the 70,000 word CNC machining and resin casting guide for hobbyist robot builders:



You can also check out my current project.


Thank you. We now resume our regularly scheduled programming.

Hi! I'm a security researcher, and here's your invoice.

It always struck me as a simple deal: there are benefits to openly participating in the security research community - peer recognition and job opportunities. There is also a cost of doing it as a hobby - loss of potential income in other pursuits. After having made a name for themselves, some people decide that the benefits no longer offset the costs - and stop spending their time on non-commercial projects. Easy, right?


Well, this is not what's on the minds of several of my respected peers. Somewhere in 2009, Alex Sotirov, Charlie Miller, and Dino Dai Zovi announced that there will be no more free bugs; in Charlie's own words:


"As long as folks continue to give bugs to companies for free, the companies will never appreciate (or reward) the effort. So I encourage you all to stop the insanity and stop giving away your hard work."


The three researchers did not feel adequately compensated for their (unsolicited) research, and opted not to disclose this information to vendors or the public - but continued the work in private, and sometimes boasted about the inherently unverifiable, secret finds.


Is this a good strategy? I think it is important to realize that many vendors, being driven by commercial incentives, spend exactly as much on security engineering as they think is appropriate - and this is influenced chiefly by external factors: PR issues, contractual obligations, regulatory risks. Full disclosure puts many of the poor performers under intense public scrutiny, and may force them to try harder and hire security talent (that's you!).


Exactly because of this unwanted pressure, they do not inherently benefit from the unsolicited services, and will probably not work with you to nourish them: if you "threaten" them by promising to essentially stop being a PR problem (unless compensated) - well, don't be surprised if they do not call back soon with a counter-offer.


Having said that, there is an interesting way one could make this work: the "pay us or else..." approach - where the "else" part may be implied to mean:


  • Selling the information to unnamed third parties, to use it as they see fit (with potential consequences to the vendor's customers),


  • Shaming the vendor in public to suggest negligence ("company X obviously values customer safety well below our $10,000 asking price"),


  • Simply tellling the world without giving the vendor a chance to respond if your demands are not met.

There's only one problem: I think these tricks are extremely sleazy. There are good and rather uncontroversial reasons why disclosing true information about an individual is often legal, but engaging in blackmail never is; the parallels here are really easy to draw.


This is why I am disappointed by the news of VUPEN apparently adopting a similar strategy (full article); and equally disappointed by how few people called it out:


"French security services provider VUPEN claims to have discovered two critical security vulnerabilities in the recently released Office 2010 – but has passed information on the vulnerabilities and advice on mitigation to its own customers only. For now, the company does not intend to fill Microsoft in on the details, as they consider the quid pro quo – a mention in the credits in the security bulletin – inadequate.


'Why should security services providers give away for free information aimed at making paid-for software more secure?' asked [VUPEN CEO] Bekrar."


Here's the thing: security researchers don't have to give any information away for free; but if you need to resort to arm-twisting tactics to sell a service, you have some serious soul searching to do.

En klargjøring

I sitt tilsvar til meg i kapital nr 12. forsøker Petter Berge fra Northern Capital å så tvil om de fakta jeg har påpekt om aktiv i forhold til passiv forvaltning. Nok en gang tar Berge stort sett feil.

I sin opprinnelige kommentar skrev for eksempel Berge om Deutsche Banks (DB) kostnadsfrie indeksfond at ”selv om de ikke tar forvaltningshonorar, så beholder de utbyttet fra aksjene selv”. Men som Nikolai Gemerott fra DB forklarer: ”… Hence we do not retain dividends from the fund as this would be illegal.”

Når jeg så påpeker at Berges opplysninger er feil, endres argumentasjonen til at DB bruker en feil referanseindeks som ikke er utbyttejustert. Det er noe uklart for meg hvordan feil referanse i seg selv kan skade investor. Det kan naturligvis få fondet til å se bedre ut enn det i virkeligheten er, men avkastningen bestemmes jo av forvaltningen av selve fondet. Berge trår uansett feil også her. I kilden han bygger på står det: ”The indices are calculated as either price or total return indices. The difference is based on the different treatment of dividend payments on the Index Securities”. En kan altså velge mellom to indeksfond; ett der utbyttene reinvesteres og ett der de utbetales. For sistnevnte fond brukes naturligvis en prisindeks som ikke er utbyttejustert som referanse.

Litt informasjon om fondet kan man finne i denne artikkelen. Som man vil se er det lite sannsynlig at bruk av derivater er en stor kostnadsdriver for fondet siden det har slått indeksen med 0,61% siden oppstart i 2007 frem til august 2009.

Så mener Berge at Vanguards VITPX fond ikke er relevant fordi det kun representerer en liten del av markedet, men fondet følger en indeks som representerer 99,5% av markedskapitaliseringen til amerikanske børsnoterte selskaper. Dette er ikke er hentet fra utdatert reklamemateriell som Berge later til å tro, men fra fondets ”Fact Sheet” som kan lastes ned fra den tilhørende hjemmeside. Jeg legger naturligvis til grunn at de opplysninger som Vanguard oppgir om sine produkt er korrekte.

Berge reiser også et helt nytt argument. Det viser seg nemlig at Vanguards verdensindeks VTWIX koster 0,25%, hvilket er mer enn det oljefondet har. Betyr det at passiv forvaltning ikke fungerer for en verdensindeks? Kanskje, men den mest nærliggende forklaringen er at VITPX er 140 ganger større enn verdensfondet. I motsetning til aktiv forvaltning er det betydelige stordriftsfordeler i passiv forvaltning. Om en må fordele de samme kostnadene på noen promille av kapitalen blir naturligvis kostnaden høy. For oljefondet er det likevel all grunn til å tro at en investering i VTWIX vil kunne gjøres til betydelig lavere kostnad. Vanguard har antydet overfor meg at global forvaltning kan gjøres for 0,01-0,02% dersom investeringsbeløpet er av oljefondets dimensjoner.

Hele denne debatten hadde imidlertid vært unødvendig dersom finansdepartementet bestemte seg for å sette ut deler av forvaltningen til et eksternt passivt fond slik som Vanguard. På den måten hadde vi visst nøyaktig hva kostnadene ved passiv forvaltning var, og man kunne også fortsatt med aktiv forvaltning i NBIM. Mon tro hvorfor det er så stor motstand mot en slik enkel løsning?

Den virkelige verden

Dette er et innlegg publisert i Kapital nr. 11 2010 som svar på et innlegg i nr. 9 av Petter Berge i North Capital 


I en gjestekommentar i Kapital nr. 9 i år skriver Petter Berge i North Capital at passiv forvaltning ikke er et reelt alternativ fordi det ikke er mulig å oppnå indeksens avkastning. Berge mener i den forbindelse at eksempler jeg har gjengitt på min blogg på passive fond som slår indeksen og indeksfond uten kostnad er lite representative eller direkte feilaktige. En bør derfor velge aktive forvaltere, slik som North Capital antar jeg. Nå er Berges påstander stort sett feil, noe som på en utmerket måte illustrerer fordelene med passiv indeksforvaltning.

Det jeg er enig med Berge i er at aktive investorer er helt nødvendig for å korrigere priser slik at markedet kan fungere. Det er likevel så mange av dem at omtrent all empirisk forskning viser at de taper i forhold til indeksfond. Dette skyldes én ting – høye kostnader. Før kostnader slår faktisk den gjennomsnittlige aktive forvalter markedet så vidt.

Det er derfor ingen grunn for hverken oljefondet eller andre å bekymre seg for at det blir for få aktive forvaltere. Det er bra å ta etisk ansvar for kinesiske tekstilarbeidere, men finanshusene på Wall Street får greie seg selv som best de kan.

Berge argumenterer så videre for at indeksforvaltning i realiteten er dyrt og vanskelig. Han viser til at Vanguards hovedfond, som jeg har brukt som eksempel, kun gjenspeiler en meget likvid del av det amerikanske markedet. Fondet måles imidlertid mot en indeks som representerer 99,5% av amerikanske børsnoterte selskaper. Berge mener at en ikke effektivt kan indeksforvalte små selskaper, men Vanguard har slike fond og slår indeksen også her. Berge mener Deutsche Banks (DB) kostnadsfrie fond i realiteten koster 2,5% fordi DB tar utbyttet selv, men det har DB bekreftet overfor meg at er feil. Bergs forvirring her skyldes at investor kan velge om utbyttet skal utbetales eller legges til fondet. Berge bagatelliserer dette som to enkeltstående eksempler, men for oljefondet er jo investering i Vanguards fond et reelt alternativ. Oljefondet ville bare utgjøre om lag 25% av Vanguards totale portefølje.

Intrusion detection: doing it wrong

Quite a few thick volumes have been written on the topic of securing corporate environments - but most of them boil down to the following advice:


  1. Reduce your attack surface by eliminating non-essential services and sensibly restricting access to data,
  2. Compartmentalize important services to lower the impact of a compromise,
  3. Keep track of all assets and remediate known vulnerabilities in a timely manner,
  4. Teach people to write secure code and behave responsibly,
  5. Audit these processes regularly to make sure they actually work.


We have an array of practical methodologies and robust tools to achieve these goals - but we also have a pretty good understanding of where this model falls apart. As epitomized by Charlie Miller's goofy catchphrase, "I was not in your threat model", the reason for this is two-fold:



  • You will likely get owned, by kids: reasonably clued people with some time on their hands are (and for the foreseeable future will be) able to put together a fuzzer and find horrible security flaws in most of the common server or desktop software in a matter of days. Modern, large-scale enterprises with vast IT infrastructure, complex usability needs, and a diverse internal user base, are always extremely vulnerable to this class of attackers.


    As a feel-good measure, this discussion is often framed in terms of high-profile vulnerability trade, international crime syndicates, or government-sponsored cyberwarfare - but chances are, the harbinger of doom will be a bored teenager, or a geek with an outlandish agenda; they are less predictable than foreign governments, too - so in some ways, we should be fearing them more.

  • Compartmentalization will not save you: determined attackers will take their time, and will get creative if needs be. Compartmentalization may buy a couple of days, but simply can't be designed to keep them away forever, yet keep the business thriving: as witnessed by a number of well-publicized security incidents, design compromises and poor user judgment inevitably create escalation paths.



Past a certain point, proactive measures begin to offer diminishing returns: throwing money at the problem will probably never get you to a point where a compromise is unlikely, and the business can go on. This is not a cheering prospect - but something we have to live with.


The key to surviving a compromise may lie in the capability to detect a successful attack very early on. The attackers you should be fearing the most are just humans, and have to learn about the intricacies of your networks, and the value of every asset, as they go. These precious hours may give you the opportunity to recover - right before an incident becomes a disaster.


This brings us to the topic of intrusion detection - a surprisingly hard and hairy challenge in the world of information security. Most of the detection techniques at our disposal today are
inherently bypassable; this is particularly true for bulk of the tricks employed by most of the commercial AV, IDS, IPS, and WAF systems I know of. And that's where the problem lies: because the internals of these tools are essentially public knowledge, off-the-shelf intrusion detection systems often amount to a fairly expensive (and often by itself vulnerable!) tool to deter only the dumbest of attackers. A competent adversary, prepared in advance or simply catching the scent of a specific IDS toolkit, is reasonably likely to work around it without breaking a sweat.


The interesting - and highly contentious - question is what happens when the design of your in-house intrusion detection system becomes a secret. Many of my peers would argue this is actually harmful: in most contexts, security-by-obscurity does nothing to correct the underlying problems, and merely sweeps them under the rug. Yet, I am inclined to argue that in this particular case, it offers a qualitative difference. Here's why:


Let's begin by proposing a single, trivial anomaly detection rule, custom-tailored for our operating environment (and therefore, reasonably sensitive and unlikely to generate false positives); for example, it could be a simple daemon to take notice of execve() calls with stdin pointing directly to a network socket - a common sign of server-targeted shellcode. When the architecture is not shared with common commercial tools, external attackers stand a certain chance of tripping this check, and a certain chance of evading it - but this is governed almost solely by having dumb luck, and not by their skill. The odds are not particularly reassuring, but are a starting point.


(Now, an insider stands a better chance of defeating the mechanism - an unavoidable if less common problem - but a rogue IT employee is an issue that, for all intents and purposes, defies all attempts to solve it with technology alone.)


Let's continue further down this road: perhaps also introduce a
simple tool to identify unexpected interactive sessions within encrypted and non-encrypted network traffic; or even a tweaked version of /bin/sh that alerts us to unusual -c or stdin payloads. Building on top of this, we can proceed to business logic: say, checks for database queries for unusual patterns, or coming from workstations belonging to users not usually engaged in customer support. Each of these checks is trivial, and stands only an average chance of detecting a clued attacker. Yet, as the chain of tools grows longer, and the number of variables that needs to be guessed perfectly right increases, the likelihood of evading detection - especially early in the process - becomes extremely low. Simplifying a bit, the odds of strolling past ten completely independent, 50% reliable checks, are just 1 in 1024; it does not matter whether the attacker is the best hacker in the world or not (unless also a clairvoyant).


For better or worse, intrusion detection seems to be an essential survival skill - and I think we are all too often doing it wrong. A successful approach on the uniqueness and diversity - and not necessarily the complexity - of the tools used; the moment you neatly package them and share the product with the world, your IDS becomes a $250,000 novelty toy.


Sadly, large organizations often lack the expertise, or just the courage, to get creative. There is a stigma of low expectations attached to intrusion detection in general, to security-by-obscurity as a defense strategy, and to maintaining in-house code that can't generate pie charts on a quarterly basis.


But when you are a high-profile target, defending only against the dumb attackers in a world full of brilliant ones - some of them driven by peculiar and unpredictable incentives - strikes me as a poor approach in the long run.

Yeah, about that address bar thing...

As promised, here's another interesting browser bug, showing the perils of being user-friendly.


You are probably familiar with the usual behavior of the address bar: when you click on a link, the browser keeps showing the old location up until the new content is retrieved and actually replaces the previous page. Only Safari behaves differently, always showing the new destination - which I think can be deceptive:


<input type=submit value="Click me!" onclick="clicked()">
<script>
function clicked() {
w = window.open("", "_blank");
w.document.body.innerHTML = "Where do I come from?";
w.location = 'http://1.2.3.4/';
}
</script>

I don't like this behavior, but it perhaps does not constitute an outright security flaw: the spinning throbber is a weak, but visible indicator of foul play.


But to the point! If you look carefully at the remaining browsers, you may also notice a curious exception to the rule: when a link is opened in a new window or a tab, most browsers will put the destination URL in the address bar right away. Why? Apparently, usability is the reason: doing this seemed more user-friendly than showing about:blank for a couple of seconds.


Alas, this design decision creates an interesting vulnerability in Firefox: the about:blank document actually displayed in that window while the page is loading is considered to be same origin with the opener; the attacker can inject any content there - and still keep his made up URL in the address bar.


Well, the spinning throbber is there, right? As it turns out, you can make it go away. The harder way is to use an URL that legitimately returns HTTP 204; the easier way is to simply call window.stop():



<input type=submit value="Click me!" onclick="clicked()">
<script>
var w;
function clicked() {
w = window.open("http://1.2.3.4/", "_blank", "toolbar=1,menubar=1");
setTimeout('w.document.body.innerHTML = "Fake content!";w.stop();', 500);
}
</script>


Reported early April, CVE-2010-1206; Mozilla addressed the glitch in release 3.6.7.