TSA Follies - Schneier on Security

August 21, 2008 02:30 PM
They break planes: Citing sources within the aviation industry, ABC News reports an overzealous TSA employee attempted to gain access to the parked aircraft by climbing up the fuselage... reportedly using the Total Air Temperature (TAT) probes mounted to the planes' noses as handholds. "The brilliant employees used an instrument located just below the cockpit window that is critical to...

Nice Article on Personal Surveillance - Schneier on Security

August 20, 2008 06:40 PM
Nice article on personal surveillance from the London Review of Books....

A Security Assessment of the Internet Protocol - Schneier on Security

August 20, 2008 01:48 PM
Interesting: Preface The TCP/IP protocols were conceived during a time that was quite different from the hostile environment they operate in now. Yet a direct result of their effectiveness and widespread early adoption is that much of today's global economy remains dependent upon them. While many textbooks and articles have created the myth that the Internet Protocols (IP) were designed...

Mental Illness and Murder - Schneier on Security

August 19, 2008 09:23 PM
Contrary to popular belief, homicide due to mental illness is declining, at least in England and Wales: The rate of total homicide and the rate of homicide due to mental disorder rose steadily until the mid-1970s. From then there was a reversal in the rate of homicides attributed to mental disorder, which declined to historically low levels, while other homicides...

Adi Shamir's Cube Attacks - Schneier on Security

August 19, 2008 07:15 PM
At this moment, Adi Shamir is giving an invited talk at the Crypto 2008 conference about a new type of cryptanalytic attack called "cube attacks." He claims very broad applicability to block ciphers, stream ciphers, hash functions, etc. My personal joke -- at least I hope it's a joke -- is that he's going to break every NIST hash submission...

Cyberattack Against Georgia Preceded Real Attack - Schneier on Security

August 18, 2008 07:11 PM
This is interesting: Exactly who was behind the cyberattack is not known. The Georgian government blamed Russia for the attacks, but the Russian government said it was not involved. In the end, Georgia, with a population of just 4.6 million and a relative latecomer to the Internet, saw little effect beyond inaccessibility to many of its government Web sites, which...

Air Force Suspends Cyber-Command - Schneier on Security

August 18, 2008 12:46 PM
Wow: The provisional, 8,000-man Cyber Command has been ordered to stop all activities, just weeks before it was supposed to be declared operational....

Friday Squid Blogging: Talking Squids in Outer Space - Schneier on Security

August 15, 2008 10:57 PM
An index of fiction. The site was inspired by Margaret Atwood's infamous comment that Oryx and Crake isn't really science fiction, because science fiction is "talking squids in outer space." This prompted a hunt for science fiction which actually did feature talking squids in outer space....

XKCD on Voting Machine Security - Schneier on Security

August 15, 2008 06:55 PM
This comment is absolutely correct....

UK Police Seize War on Terror Board Game - Schneier on Security

August 15, 2008 12:50 PM
They said -- and it's almost too stupid to believe -- that: the balaclava "could be used to conceal someone's identity or could be used in the course of a criminal act". Don't they realize that balaclavas are for sale everywhere in the UK? Or that scarves, hoods, handkerchiefs, and dark glasses could also be used to conceal someone's identity?...

Security is bigger than finding and fixing bugs - The Security Development Lifecycle

August 14, 2008 08:09 PM

I’ve been catching up on various security-related articles that I’ve been meaning to read, and the following article was on the list http://www.itnews.com.au/News/73635,google-shares-its-security-secrets.aspx about Google’s “security secrets.”
 
Quoting from the article:

“In order to keep its products safe, Google has adopted a philosophy of 'security as a cultural value'. The programme includes mandatory security training for developers, a set of in-house security libraries, and code reviews both by Google developers and outside security researchers."

I think it is great that Google has a security program they are willing to talk about and I could not agree more with the ‘security as a cultural value’ philosophy. But isn’t there something really fundamental missing here? Design? There is a lot more to software engineering other than coding and testing.
 
The SDL has a very large set of implementation-related requirements, but there are many design-related requirements also.

Computer security experts have known since the early 1970s that you have to get the design right; and our experiences with the SDL over the last 5 years have taught us that you need to consider security and privacy (but remember, you have to ship too!) very early in the design phase and have a consistent end-to-end process if you truly hope to reduce vulnerabilities and create more secure software. This is how the SDL is helping to create ‘security as a cultural value’ at Microsoft.

We’ve seen a general trend downward in security vulnerabilities in Microsoft products, and the IBM X-Force 2008 mid-year report backs the assertion that we’re making progress; according to the report Microsoft’s share of total vulnerabilities decreased from 3.7% in 2007 (1st place) to 2.5% (that’s 2.5% for all Microsoft products; a more appropriate comparison might be Windows vs Linux vs Mac OSX, or SQL Server vs Oracle vs DB2) in the first 6 months of 2008 (3rd place.) This is an encouraging signal that the SDL is working on a large scale… of course, it might also show that vulnerability researchers are moving to easier targets, which, to me shows the SDL is working too.
 
What do you think?

Kids with Cell Phones in Emergencies - Schneier on Security

August 14, 2008 06:20 PM
In the middle of a sensationalist article about risks to children and how giving them cell phones can help, there's at least one person who gets it. Since the 1999 Columbine High School shootings and the 9/11 terrorist attacks, many parents feel better having a way to contact their children. But hundreds of students on cell phones during an emergency...

Data Mining to Detect Pump-and-Dump Scams - Schneier on Security

August 14, 2008 12:10 PM
I don't know any of the details, but this seems like a good use of data mining: Mr Tancredi said Verisign's fraud detection kit would help "decrease the time between the attack being launched and the brokerage being able to respond". Before now, he said, brokerages relied on counter measures such as restrictive stock trading or analysis packages that only...

The Risk of Anthrax - Schneier on Security

August 13, 2008 08:29 PM
Some reality to counter the hype. The Bottom Line While there has been much consternation and alarm-raising over the potential for widespread proliferation of biological weapons and the possible use of such weapons on a massive scale, there are significant constraints on such designs. The current dearth of substantial biological weapons programs and arsenals by governments worldwide, and the even...

UK National Risk Register - Schneier on Security

August 13, 2008 05:05 PM
The UK has made public its previously classified National Risk Register. The National Risk Register is intended to capture the range of emergencies that might have a major impact on all, or significant parts of, the UK. It provides a national picture of the risks we face, and is designed to complement Community Risk Registers, already produced and published locally...

Security by Restraining Order - Matt Blaze's Exhaustive Search

August 13, 2008 02:58 AM
And their fate is still unlearn'd.

A group of MIT students made news last week with their discovery of insecurities in Boston's "Charlie" transit fare payment system [pdf]. The three students, Zack Anderson, R.J. Ryan and Alessandro Chiesa, were working on an undergraduate research project for Ron Rivest. They had planned to present their findings at the DEFCON conference last weekend, but were prevented from doing so after the transit authority obtained a restraining order against them in federal court.

The court sets a dangerous standard here, with implications well beyond MIT and Boston. It suggests that advances in security research can be suppressed for the convenience of vendors and users of flawed systems. It will, of course, backfire, with the details of the weaknesses (and their exploitation) inevitably leaking into the underground. Worse, the incident sends an insidious message to the research community: warning vendors or users before publishing a security problem is risky and invites a gag order from a court. The ironic -- and terribly unfortunate -- effect will be to discourage precisely the responsible behavior that the court and the MBTA seek to promote. The lesson seems to be that the students would have been better off had they simply gone ahaed without warning, effectively blindsiding the very people they were trying to help.

The Electronic Frontier Foundation is representing the students, and as part of their case I (along with a number of other academic researchers) signed a letter [pdf] urging the judge to reverse his order.

Update 8/13/08: Steve Bellovin blogs about the case here.

Flying Without ID - Schneier on Security

August 12, 2008 06:33 PM
Seems like the procedure has changed: Mr. Peters nodded, and then looked down at the sheet which I had filled out and signed. “I’m going to have to make some calls to verify your identity.” I nodded. He pulled out a cell phone. I had assumed that we would be going to some separate screening room, but that wasn’t the...

Memo to the Next President - Schneier on Security

August 12, 2008 12:36 PM
Obama has a cyber security plan. It's basically what you would expect: Appoint a national cyber security advisor, invest in math and science education, establish standards for critical infrastructure, spend money on enforcement, establish national standards for securing personal data and data-breach disclosure, and work with industry and academia to develop a bunch of needed technologies. I could comment on...

Bypassing Microsoft Vista's Memory Protection - Schneier on Security

August 11, 2008 10:26 PM
This is huge: Two security researchers have developed a new technique that essentially bypasses all of the memory protection safeguards in the Windows Vista operating system, an advance that many in the security community say will have far-reaching implications not only for Microsoft, but also on how the entire technology industry thinks about attacks. In a presentation at the Black...

Amber Alerts As Security Theater - Schneier on Security

August 11, 2008 01:59 PM
Interesting analysis: Since its birth 12 years ago after a fatal kidnapping in Texas, Amber Alert has quickly become one of the best-known tools in the national law enforcement arsenal. The warnings are familiar to anyone who watches cable TV news, especially during the summer, when the drumbeat of abduction stories seems to increase. Last year, 227 alerts were issued...

Friday Squid Blogging: Squid Fables - Schneier on Security

August 08, 2008 10:37 PM
Squids will be Squids....

Are the Chinese Olympics a Trap? - Schneier on Security

August 08, 2008 08:10 PM
The Onion reminds us that we can never be too careful....

DMCA Does Not Apply to U.S. Government - Schneier on Security

August 08, 2008 05:32 PM
According to a recent court ruling, we are all subject to the provisions of the DMCA, but the government is not: The Court of Federal Claims that first heard the case threw it out, and the new Appellate ruling upholds that decision. The reasoning behind the decisions focuses on the US government's sovereign immunity, which the court describes thusly: "The...

UK Electronic Passport Cloned - Schneier on Security

August 08, 2008 10:59 AM
The headline says it all: "'Fakeproof' e-passport is cloned in minutes." Does this surprise anyone? This is what I wrote about electronic passports two years ago in The Washington Post: The other security mechanisms are also vulnerable, and several security researchers have already discovered flaws. One found that he could identify individual chips via unique characteristics of the radio transmissions....

Indictments Against Largest ID Theft Ring Ever - Schneier on Security

August 07, 2008 06:45 PM
It was really big news yesterday, but I don't think it's that much of a big deal. These crimes are still easy to commit and it's still too hard to catch the criminals. Catching one gang, even a large one, isn't going to make us any safer. If we want to mitigate identity theft, we have to make it harder...

Hacking Mifare Transport Cards - Schneier on Security

August 07, 2008 12:07 PM
London's Oyster card has been cracked, and the final details will become public in October. NXP Semiconductors, the Philips spin-off that makes the system, lost a court battle to prevent the researchers from publishing. People might be able to use this information to ride for free, but the sky won't be falling. And the publication of this serious vulnerability actually...

Security Idiocy Story - Schneier on Security

August 06, 2008 07:52 PM
From the Dilbert blog: They then said that I could not fill it out -- my manager had to. I told them that my manager doesn't work in the building, nor does anyone in my management chain. This posed a problem for the crack security team. At last, they formulated a brilliant solution to the problem. They told me that...

NSA Forms - Schneier on Security

August 06, 2008 01:26 PM
They're all here: Via a Freedom of Information Act request (which involved paying $700 and waiting almost 4 years), The Memory Hole has obtained blank copies of most forms used by the National Security Agency. Most are not very interesting, but I agree with Russ Kick: They range from the exotic to the pedestrian, but even the most prosaic form...

Laptop with Trusted Traveler Identities Stolen - Schneier on Security

August 05, 2008 06:09 PM
Oops. A laptop with the names of 33,000 people enrolled in the Clear program -- the most popular airport "trusted traveller" program -- has been stolen at SFO. The TSA is unhappy. Stealing databases of personal information is never good, but this doesn't make a bit of difference to airport security. I've already written about the Clear program: it's a...

Italians Use Soldiers to Prevent Crime - Schneier on Security

August 05, 2008 12:36 PM
Interesting: Soldiers were deployed throughout Italy on Monday to embassies, subway and railway stations, as part of broader government measures to fight violent crime here for which illegal immigrants are broadly blamed. [...] The conservative government of Silvio Berlusconi won elections in April while promising to crack down on petty crime and illegal immigrants. The new patrols of soldiers, who...

Gary McKinnon - Schneier on Security

August 04, 2008 06:58 PM
Good perspective on Gary McKinnon's extradition to the United States....

Random Killing on a Canadian Greyhound Bus - Schneier on Security

August 04, 2008 12:19 PM
After a random and horrific knife decapitation on a Greyhound bus last week, does this surprise anyone: A grisly slaying on a Greyhound bus has prompted calls for tighter security on Canadian bus lines, despite the company and Canada's transport agency calling the stabbing death a tragic but isolated incident. Greyhound spokeswoman Abby Wambaugh said bus travel is the safest...

Schneier Misquote - Schneier on Security

August 02, 2008 04:44 PM
There's a quote attributed to me here: Well-known author and expert on security, Bruce Schneier, born in 1963, maintains "Terrorists can only take my life. Only my government can take my freedom." I don't think I've ever said that. It certainly doesn't sound like something I would say. It's not in any of my books. It's not in any of...

Friday Squid Blogging: Jumbo Squid Photo - Schneier on Security

August 01, 2008 10:44 PM
Pretty. It was the National Geographic Photo of the Day on June 16th....

U.S. Government Policy for Seizing Laptops at Borders - Schneier on Security

August 01, 2008 06:21 PM
Amazing. The U.S. government has published its policy: they can take your laptop anywhere they want, for as long as they want, and share the information with anyone they want: Federal agents may take a traveler's laptop or other electronic device to an off-site location for an unspecified period of time without any suspicion of wrongdoing, as part of border...

Suspect in 2001 Anthrax Attacks Kills Self - Schneier on Security

August 01, 2008 01:00 PM
Fascinating stuff, although this early story leaves me with more questions than answers....

Terrorists Using Open Wireless Networks - Schneier on Security

August 01, 2008 12:46 PM
Remember when I said that I keep my home wireless network open? Here's a reason not to listen to me: When Indian police investigating bomb blasts which killed 42 people traced an email claiming responsibility to a Mumbai apartment, they ordered an immediate raid. But at the address, rather than seizing militants from the Islamist group which said it carried...

What do you want to know about SDL threat modeling? - The Security Development Lifecycle

August 01, 2008 12:27 AM

Adam Shostack here. I'm working on a paper about "Experiences Threat Modeling at Microsoft" for an academic workshop on security modeling. I have some content that I think is pretty good, but I realize that I don't know all the questions that readers might have.

So, what questions should I try to answer in such a paper? What would you like to know about? No promises that I'll have anything intelligent to say, but I'd love to know the questions you're asking. So please. Ask away!

Improve Security with "A Layer of Hurt" - The Security Development Lifecycle

July 31, 2008 07:13 PM
Hello, Michael here.

I got a lot of interesting comments from my TechEd 2008 presentation entitled, "How To Review Your Code And Test For Security Bugs," but the most comments and questions were reserved for fuzz testing; I was blown away by the number of people who thought fuzz testing was hard, or that you only left fuzz testing to ‘leet hackers.

During the presentation I mentioned in some depth how to perform fuzz testing, and what parts of an application should be fuzz testing targets. I also introduced an idea (that's not new) to help people who have never performed fuzz testing begin fuzz testing with very little cost and friction. The idea is to add a small layer of code to an application to automatically mutate untrusted data as it comes into an application; I called that code layer "a layer of hurt."

Before I continue, I want to point out that fuzzing is an SDL requirement, but the idea in this blog post is not an SDL requirement, it's just another way to help meet SDL fuzzing requirements.

Adding a layer of hurt, as shown in the picture below, is pretty simple as it involves adding code to an application to tweak data as it comes into an application. You can work out where to place the fuzzing code by looking at your threat models to see where data crosses trust boundaries. You could also simply grep the code looking for APIs that read data, for example:

  • Read from files: fread, ReadFile
  • Reading from sockets: recv, recvfrom
  • For .NET code, any stream.Read

You get the picture.

The fuzzing code should appear right after the API that reads that data.

For example, C or C++ code that reads from a UDP socket and then fuzzes the data before it's consumed by the rest of the application might look like this:

char RecvBuf[1024];
int  BufLen = sizeof(RecvBuf);

int result = recvfrom(
   RecvSocket,
   RecvBuf,
   BufLen,
   0,
   (SOCKADDR *)&SenderAddr,
   &SenderAddrSize);

#ifdef _FUZZ
   Fuzz(RecvBuf,&BufLen);
#endif

Or, in C#, code that reads from an untrusted file:

FileStream fileStream = new FileStream(filename, FileMode.Open, FileAccess.Read);
uint len = (uint)(fileStream.Length);
byte[] fileData = new byte[fileStream.Length];
fileStream.Read(fileData, 0, (int)len);
fileStream.Close();

#if _FUZZ_
  Malform pain = new Malform();
  fileData = pain.Fuzz(fileData);
#endif

In both code examples, Fuzz() mutates the incoming data. In the C++ case, the fuzzing code looks like this:

void Fuzz(_Inout_bytecap_(*pcbBuf) char *pBuf,
          _Inout_ size_t *pcbBuf) {

  if (!pcbBuf || !pBuf || !*pcbBuff || *pBuf) return;
  if ((rand() % 100) > 5) return; // fuzz about 5% of Buffers

  size_t cLoop = 1 + (rand() % 4);

  for (size_t j = 0; j < cLoop; j++) {

    size_t i=0, 
      iLow = rand() % *pcbBuf, 
      iHigh = 1+rand() % *pcbBuf,
      iIter = 1+rand() % 8;

    if (iLow > iHigh) 
      {size_t t=iHigh; iHigh=iLow; iLow=t;}

    char ch=0;
    switch(rand() % 9) {

      case 0 : // reset upper bits
        for (i=iLow; i < iHigh; i++) 
          pBuf[i] &= 0x7F; 
        break;

      case 1 : // set upper bits
        for (i=iLow; i < iHigh; i++) 
          pBuf[i] |= 0x80;
        break;

      case 2 : // toggle all bits
        for (i=iLow; i < iHigh; i++) 
          pBuf[i] ^= 0xFF;
        break;

      case 3 : // set to random chars
        for (i=iLow; i < iHigh; i++) 
          pBuf[i] = (char)(rand() % 256); 
        break;

      case 4 : // set NULL chars to (possibly) non-NULL
        for (i=iLow; i < iHigh; i++) 
          if (!pBuf[i]) 
            pBuf[i] = (char)(rand() % 256);
        break;

      case 5 : // swap adjacent bytes
        for (i=iLow; i < __max(iHigh-1,iLow); i+= iIter) 
          {char t=pBuf[i]; pBuf[i] = pBuf[i+1]; pBuf[i+1]=t;} 
        break;

      case 6 : // set to random chars every n-bytes
        for (i=iLow; i < __max(iHigh-1,iLow); i+= iIter) 
          pBuf[i] = (char)(rand()%256);
        break;

      case 7 : // set bytes to one random char
        ch=(char)(rand() % 256); 
          for (i=iLow; i < iHigh; i++) 
            pBuf[i] = ch; 
        break;

      default: // truncate stream
        *pcbBuf = iHigh; 
        break;
     }
   }
}                         

The sample C# and C++ fuzzing code is available as a ZIP file at the end of this post.

This code is an example of dumb-fuzzing, which is fuzzing with little or no regard for the data structure being manipulated. If you've never performed any kind of fuzz testing in the past, then you will probably find bugs with this simple fuzzing technique. Once you have weeded out the low-hanging bugs, you may need to turn your attention to smarter fuzzers. For example, in theory, this code would find few if any bugs in a PNG parser, because PNG files have a built in check-sum, so if you fuzz a PNG file, you'd have to recalculate the checksum to get decent code coverage.

When I showed this code during my presentation, I urged people to add it to their applications today if they currently don't do fuzz testing, and simply run their applications through their normal testing processes. Within three days of my presentation I received emails from people saying they had found bugs. I have no doubt others did too.

One of the comments I made during the session was,"If you can't spend the time on great fuzzing, fuzz anyway" and adding a "layer of hurt" is a reasonable start.

Please feel free to sound off if you have ideas to help improve the code and let us know what you think, either through email or comments to this post.

Why You Should Never Talk to the Police - Schneier on Security

July 31, 2008 06:52 PM
This is an engaging and fascinating video presentation by Professor James Duane of the Regent University School of Law, explaining why -- in a criminal matter -- you should never, ever, ever talk to the police or any other government agent. It doesn't matter if you're guilty or innocent, if you have an alibi or not -- it isn't possible...