Apple explains how to controll Symbol Visibility in GCC 4.x. The benefits and drawbacks of hiding symbols are outlined. Has example code and compiler switches.
Bruce Perens tells us that patents impede innovation his article, The Monster Arrives: Software Patent Lawsuits Against Open Source Developers:
Patents were created as a means to get inventors to disclose their inventions, rather than keep them secret. The disclosure of an invention was supposed to allow others to more easily build on that invention, thus creating more inventions. But the patent system has evolved into something useless for the purpose of disclosure, and engineers are now instructed to avoid looking at other companies’ patents because if the victim of a patent lawsuit can be shown to have known of a patent, the award to the patent holder is tripled. There have been no reliable studies that show software patenting to have encouraged innovation, and there is much evidence that they actually impede it.
Here’s an interview with Zed Shaw, the author of the Mongrel web server — a web server for the Ruby programming language that is good for use in combination with Ruby on Rails and other Ruby-based web-app frameworks. It’s interesting in that it’s fast, secure, cross-platform, and it’s not a heavyweight solution (compared to Apache). Why is it more secure than Apache at the HTTP protocol level? Mongrel utilizes the Ragel State Machine Compiler
to generate the protocol parser, “and that is very strict and seems to block a huge number of attack attempts simply because it is so exacting.”
“Identity Theft” is societies catchy phrase for impersonation and fraud. Recently, my bank and other financial insututions have mailed advice on how to help prevent fraud, but they don’t ofen explain how to recover from it. This link has useful, step-by-step advice: HOW TO: Get through having your identity stolen.
Why encrypt a hard drive? It makes it safer to dispose of an old hard disk… your data won’t fall into the wrong hands. This only matters if you want data to remain confidential. Laptop owners should consider using hard disk encryption.
When is it a bad idea to encrypt a hard drive? First, if you have a dual-boot computer (Linux and Windows), and you want Linux to be able to access all of the data on the Windows drive. Second, when the data confidentiality is of low concern and the data availability is of high importance.
Bruce Schneier writes about Microsoft BitLocker, which will be available in Windows Vista:
BitLocker Drive Encryption is a new security feature in Windows Vista, designed to work with the Trusted Platform Module (TPM). Basically, it encrypts the C drive with a computer-generated key. In its basic mode, an attacker can still access the data on the drive by guessing the user’s password, but would not be able to get at the drive by booting the disk up using another operating system, or removing the drive and attaching it to another computer.
PGP Disk is a current solution — no need to wait for Vista. On Linux, there are many solutions. The most current is LUKS and dm-crypt:
Update 5 June 2006
Professor Eugene Spafford “is one of the most senior and recognized leaders in the field of computing.” Here’s what he has to say about password security.
In the practice of security we have accumulated a number of “rules of thumb” that many people accept without careful consideration. Some of these get included in policies, and thus may get propagated to environments they were not meant to address. It is also the case that as technology changes, the underlying (and unstated) assumptions underlying these bits of conventional wisdom also change. The result is a stale policy that may no longer be effective…or possibly even dangerous.
Policies requiring regular password changes (e.g., monthly) are an example of exactly this form of infosec folk wisdom.
Read the article for more details.
I was reading about Ekiga (Linux VoIP application) at
LWN and stumbled across this mention of
Worth mentioning is the proprietary Skype protocol, which has some
serious security implications, according to what researchers presented
(PDF) at the Black Hat Europe 2006 conference. Skype clients can be
abused for the purpose of port scanning, distributed Denial of Service
(dDoS) attacks and other unpleasant things.
The PDF says that although the Skype technology is clever, it is
“Impossible to protect from attacks”.
LWN reader “tajyrink” says that Skype “works around [NAT] by being a
P2P program, not just a VoIP program, by using ruthlessly the bandwidth
of other users even without them knowing about it.”
Innovative ways to fool people
Scott Granneman, 2006-05-04
Scott Granneman’s latest column looks at recent security examples where people have been fooled in increasingly innovative ways: from keyloggers used in a massive bank heist and new Trojans that encrypt data and request ransom money, to real financial rip-offs that extend out from online virtual gaming worlds like World of Warcraft.
It’s a fascinating read. Here’s an exerpt:
We now have computer sweatshops appearing in China and Mexico, in which
young men are paid a few dollars per day (or less) to sit and play games
like World of Warcraft and EverQuest for about 12 hours a day,
performing often mind-numbing tasks in order to create virtual wealth.
It was therefore inevitable that bad guys would see an opportunity to
steal money in settings like this. Now someone has.
New and better tools are usually a good thing. So it is when moving from Visual Studio 2003 to the 2005 edition. Advantages of moving C++ development to Visual Studio 2005, Team Edition Developer include…
- Global/shared property sheets allow developers to change a setting in one place and have it apply to all projects. This makes it vastly easier to add new include paths and libraries, etc.
- New /analyze static analysis option goes the extra mile in identifying bugs such as buffer overflow, memory leaks, failure to check return types, etc. This feature is only available in VS 2005 Team Edition Developer.
- Better debugger supports tracepoints and displays STL containers in a human-readable format! See http://blogs.msdn.com/andypennell/archive/2004/06/29/169002.aspx for more information.
- Improved remote debugging.
- More standards-compliant C++ compiler. See http://msdn2.microsoft.com/en-us/library/ms177253(vs.80).aspx
- Built-in profiler.
- Const-correctness checks in functions such as strchr, strstr, etc. help identify and prevent bugs.
- Organize sub-projects into solution folders.
- Can substitute more secure versions of strcpy, strcat, etc. automatically under certain conditions if we define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES. There’s also _CRT_SECURE_NO_DEPRECATE.
- More and better warnings.
- Dependency checking is faster. This means, for example, that cleaning a solution is much faster than with VS 2003.
- Stack smashing protection (the /GS flag) is more robust.
- printf family of functions support the C99 Standard of “%ll” and “%ull” for 64 bit integers in addition to the non-portable, Microsoft-only VS2003 “%I64d” syntax.
Costs of migrating to VS 2005:
- Compiled code size is slightly larger.
- The IDE requires more memory to run.
- Third party libraries and libc
- Template code may need to be modified.
It’s usually not a good idea to migrate a code base immediately, although it could be good way to anger management. Here’s what I recommend:
- Copy your top-level solution mysolution.sln to mysolution.vs2005.sln.
- Copy all sub-projects *.vcproj to *.vs2005.vcproj.
- Edit mysolution.vs2005.sln and chang all .vcproj references to .vs2005.vcproj.
- Open mysolution.vs2005.sln in VS 2005. It will migrate the project automatically.
- Add the new solution and project files to your source control system (Subversion, Perforce, CVS). This way, you won’t affect the day-to-day development operations of the rest of your team. You could write a script to automate the above steps so that it is easier to keep in-sync with the additions, renames and removals of includes, source, and so on from the VS 2003 solution.
- Compile and fix errors gradually.
- You may need a new version of Microsoft’s WTL, which is backwards compatible with VS 2003.
- You may need to fix template syntax issues.
- Fix const-correctness issues.
Eventually your team will become comfortable with VS 2005, and you can switch.
Are you interested in reading quality essays on subjects related to software development? If so, then treat yourself to Neil Kandalgaonkar’s Links to essays in the book Best Software Writing I, or buy the hardcopy.
In the interest of letting people get to the links quickly, I’m copying-and-pasting Neil Kandalgaonkar’s links:
Joel Spolsky – Introduction
- Ken Arnold – Style Is Substance
- Leon Bambrick – Award for the Silliest User Interface: Windows Search
- Michael Bean – The Pitfalls of Outsourcing Programmers
- Rory Blyth – Excel as a Database
- Adam Bosworth – ICSOC04 Talk
- danah boyd – Autistic Social Software
- Raymond Chen – Why Not Just Block the Apps That Rely on Undocumented Behavior?
- Kevin Cheng and Tom Chi – Kicking the Llama
- Cory Doctorow – Save Canada’s Internet from WIPO
- ea_spouse – EA: The Human Story
- Bruce Eckel – Strong Typing vs. Strong Testing
- Paul Ford – Processing Processing
- Paul Graham – Great Hackers
- John Gruber – The Location Field is the New Command Line
- Gregor Hohpe – Starbucks Does Not Use Two-Phase Commit
- Ron Jeffries – Passion
- Eric Johnson – C++ — The Forgotten Trojan Horse
- Eric Lippert – How Many Microsoft Employees Does it Take to Change a Lightbulb?
- Michael “Rands” Lopp – What to do when you’re screwed
- Larry Osterman – Larry’s Rules of Software Engineering #2: Measuring Testers by Test Metrics Doesn’t
- Mary Poppendieck – Team Compensation (pdf)
- Rick Schaut – Mac Word 6.0
- Clay Shirky – A Group is its Own Worst Enemy
- Clay Shirky – Group as User: Flaming and the Design of Social Software
- Eric Sink – Closing the Gap Part 1, Part 2
- Eric Sink – Hazards of Hiring
- Aaron Swartz – PowerPoint Remix
- why the lucky stiff – A Quick (and Hopefully Painless) Ride Through Ruby (with Cartoon Foxes)