The Peon's Guide To Secure System Development
libertynews writes "Michael Bacarella has written an article on coding and security. He starts out by saying 'Increasingly incompetent developers are creeping their way into important projects. Considering that most good programmers are pretty bad at security, bad programmers with roles in important projects are guaranteed to doom the world to oblivion.' It is well worth the time to read it."
The P.Eng has one thing right - we need 'software engineers' or 'computer engineers' that are liable for their work (and the company that uses them are liable for too).
If Microsoft's products are so good, why do they disclaim liability on it?
Of course it isn't just microsoft doing this either. The whole licensing thing. If a 'license' is supposted to give you the privledge to do or use something, then in most things you are completely liable for your actions. For example, I have a drivers license, I kill somebody it is my fault. If Acme's Nuclear Control Software 2002 goes faulty and blows up part of the states - they would probably claim no fault (bad example I know - special case currently probably).
What we see depends on mainly what we look for. -- John Lubbock Now search for that bug slave!
They're just paying for what they get. I tend to believe that its not so much bad programmers as it is a general apathetic attitude that good programmers have now. If there's no incentive to bust your balls, you're not going to!
He read a few books on the subject, and summarized the most simple concepts in an article.
Nothing new here.
Head to Amazon and find some books
Software Project Survival Guide by Steve C McConnell (Paperback)
Writing Solid Code: Microsoft's Techniques for Developing Bug-Free C Programs by Steve Maguire (Paperback)
The Mythical Man-Month: Essays on Software Engineering, Anniversary Edition (2nd Edition) by Frederick P. Brooks (Paperback)
The Pragmatic Programmer: From Journeyman to Master by Andrew Hunt, et al (Paperback)
A non-Windows system is not a guarantee of invulnerability, but keeping a Windows system is guaranteed to put you at risk.
The real world seems to agree with him on these.
I work for an IT security company that does works some pretty secure systems. When we come across custom apps we are amazed time and time again how the logic was put into developing them, not just security. Its one thing to code, its another to do it well. My favorite catch was an SQL developer who created a hyperlink to care and feed his system that simply had to many bugs and pushed to production. Its important that companies have good end to end IT polices, apps, usage and security, but in large part managements dont recognize the risk until its to late.
The coders are still shackled to the management that are trying to push it out as soon as it compiles and runs.. management doesnt CARE about stability or security and sales/marketing doesn't even care if it works.
until you can get the COMPANY liable for their software claims. and make their claims open and public, not buried in legalease.. I.E. if you dont want to be liable for it not working then the packaging must state "MIGHT NOT WORK" on the front in big letters.
until then it will not change... not in commercial software anyways...
Do not look at laser with remaining good eye.
?????
While I have taken this out of context, its not worthwhile to dispense with systems coding issues - thats exactly where most security problems start and need to be stopped. Anyone can be safe in a sandbox.
When I look back at my programming classes in college, the majority of the people didn't have a freakin clue. I don't think most of them could install a program on their own. Unfortunately the teachers all walked them through it, and they ended up passing, because they had their hands held the entire way. Its scary to think that some of them could end up in high places.
I found 2 quotes particularly enjoyable:
Call yourself a computer professional? Congratulations. You are responsible for the imminent collapse of civilization.
and
The user is pure evil.
Very true and sometimes misunderstood bits of information.
Fully licensed blockchain psychiatrist
the real question that any developer needs to ask...
"What you need doing? Daboo!"
going back to minding my fortress now...
m-
You catch enchiladas by picking them up behind the head and holding them underwater until they don't kick anymore -VeGas
I used to work at a software house, and I noticed our code always adapted to whatever the organization cared about. When they cared about timeliness, we gave it to them, but the bug count went up. When they cared about a low defect rate, we gave it to them, but the volume of code (completed feature set) went down. When they cared about maintainability too, they got that, but app performance suffered.
Most competent programmers can probably make meaningful conributions to secure apps, especially if the efforts are led by good architects. Not everyone has to be the best. The only thing is, whoever is commissioning the software has to rank security (which includes a low defect rate) above timeliness and feature count. If that's done, most programmers can rise to the challenge.
Don't blame the programers. They're just adapting to their environment. They do have to put food on the table after all, so they'll do what their companies value.
It should be a crime to teach people C/C++.
High level languages like Ruby, Python, or even Java are strongly recommended for all new projects.
How about a high level, compiled language with static typing like Ocaml. More speed, more protection, and it's been officially certified as "The programming tool of choice for discriminating hackers".
Ocaml
# (/.);;
- : float -> float -> float =
This "technologist" is carrying on about bad programmers and security? Wow - I assume he's a seasoned professional with many large-scale projects under his belt?
With such trenchant insights as "Don't use C/C++"! "Don't use Windows!" "Watch out for user input"!.
Wow. How truly insightful. I'm not even going to bother pointing out the utter absurdity of claiming that using or not using C/C++ has anything to do with it, or the added security problems with using high level languages (do you trust the implementation?).
I'm just going to say I've had bloody poops with more useful information in them than this article.
Everyone knows peons don't care about security. They just go around doing whatever they're told to do. Half the time, they're just standing around because there's nothing for them to do. They are oblivious to security breaches... I can't tell you how many peons I've seen getting hacked to death without them even noticing! And if they do notice, all they ever respond with is "Stop poking me!!!"
Peons, indeed
Nosce te Ipsum
Open source systems offer this power to the end user (you), that is their real strength. You can tell the difference between a developer who gets it and one who doesn't because the developer who doesn't get it is content to build a custom system using closed source components that they cannot understand, let alone keep secure.
.NET. I am so out of here as soon as possible.
That's precisely why the IT deparment of my company is setting themselves up to fall apart. My group's lead tech (lead not because of higher knowledge, but because he's hung around a while and sold himself) is convinced closed source is better. His arguments come from quoting Microsoft's advertising and web sites (which are basically just more advertising). Without even trying anything open source my company has whole-heartedly adopted
Ignorance may be bliss, but only for the person who's ignorant. They're happy... I'm not.
Developers: We can use your help.
"...Considering that most good programmers are pretty bad at security, bad programmers with roles in important projects are guaranteed to doom the world to oblivion..."
My!
We are the important little center of the universe, aren't we!
Oh! this is just book-marketing bullshit?
Or maybe hyperbole, if the author is literate to know what that word means...
t_t_b
I'm on PJ's "enemies" list! Are you?
Gotta agree with him on this one. I finally got out of a multi-year project where we used a gigantic POS graphics package as the back end. It added unnecessary complexity and over a year of hacked code to what should have been a month-long project (had we coded the graphics functions ourselves).
We got stuck with the package because the client chose it, and refused to admit they were wrong. When the project when 10X over budget and people got fired, they still stayed with the graphics package and even upgraded it to the 2.0 version.
The only way out was to quote them an astronomical figure for upgrading our software to match the POS and hope they wouldn't bite. I cheered when they politely declined.
It's good to have a job where you can choose your clients.
and the color of the sky in your world is?
Florescent....
Poor soul.. you need to get out more..
Tournament Management Online &
I agree whole-heartedly with the first of 2 non-superfluous statements the author makes: Why do you think Java and, to a lesser extent, C# are so popular right now? ESPECIALLY for teaching? Because with Java and C#, it's very, very hard to write code that can break the system it's running on. I also agree to some extent with his position on cyptography...most serious (non-IE/Outlook) insecurities aren't based on cracked crypto - they're in buffer overflows, and weak points in code. I don't pretend to be anything but a pathetic first year java student, but I can see where this author is coming from just be reading this website once a week...
------- "From bored to fanboy in 3.8 asian girls" ----------
I guess we better throw out everything other language, since these are "strongly recommended for all new projects." Here's a better idea: why not just write the software in the language best suited for the job, or that you're more familiar with, and code it to check for unexpected data.
If the people care about security now, you can bet the companies that succeed over the next decade will be the ones that satisfy that demand.
Wouldn't your wife's in-laws be your parents?
Sorry, couldn't resist... :-)
-B
Ash and Hickory, straight-grained and true, make excellent bludgeons, dandy for the cudgeling of vegetarians.
It should be a crime to teach people C/C++.
This guy is a little rough I think.
High level languages like Ruby, Python, or even Java are strongly recommended for all new projects.
This sentence should be continued "..for mediocre programmers.". Professional experts should use whatever language they are best at as long as it's reasonable for the project.
This article looks like he's giving advice on how to take a group of wanna-be progammers and try and get useful results from them. I think that's the wrong approach. What you should do is hire real experts. That way all the wanna-be programmers won't be able to get jobs and so they might realize "hmm.. maybe I should go back to school and get some real skills". Then we wont have as many of the problems that this guy talks about. Though maybe the schools aren't teaching the skills properly, but that's a different topic.
Aw crap, ninjas!
I guess you shot out of the womb with coding skills (doubtful). Everyone has to learn in their own way. In the end if someone wants to learn to program well, they will. Otherwise they'll just coast along until it's required.
I was a shitty programmer out of college and after moving between various jobs I learned along the way.
Business works by getting the most for the least amount of cash. Unfortunately most businesses don't have competent managers that can tell the difference between anything applicable in the real world and a buzz word they just read on CNet (most technical conversations are over their heads). That is my experience anyway.
>High level languages like Ruby, Python, or even >Java are strongly recommended for all new >projects.
All of these languages use a C program to
run.(interperter, VM).
First this guy suggest against useing
close source components are components
that you do not understand.
Well, what are these high level languages that
he is suggesting. There just a convinent
ways to write C. (Java excluded)
Maybe he thinks that you should read through
the ruby and python source before you
start using these languages?
I think he's suggestion is the reason
we have bloated unsecure software,
everyone trust that there languages
is in a little black box just because
it has a VM. What if the VM has a security
flaw, isn't this just like running a
secure program on top of windows.
Just keeping a developer from using pointers
is no way to insure a projects security.
During the 1980s, I developed software for ICBM command and control systems and for ICBM targeting. One of these systems ran on a Rolm 16-bit computer and was programmed in Jovial, assembly and Fortran. At the time, this computer was already 5 to 10 years behind the commercial state-of-the-art. However, it worked and almost all of the bugs in the computer and the compilers were known, and THAT is the key to developing secure software.
Don't use the latest and greatest. Use something that has been in production for several years and has had the bugs worked out. The military used to do this on critical systems. Did I hate coding in Jovial on a machine that only had 64K? Yes. But I also knew the machine inside and out and had hand-checked the compiler's assembly code generation to make sure that it wasn't doing silly things. It didn't, because 5 years in production had wrung out all of the bugs.
You know, theres something to be said for ignoring articles written in a degrading way towards its audience. It does make an interesting read if you imagine the comic book shop guy from the Simpsons was the author... worst article ever...
This is one of the best all-around security articles I've read in a long time. If even 10% of the world's programmers read this and take it to heart, the world will be a measurably better place.
11*43+456^2
If something like Windows plays any part at all in your system design, you should probably give up now. Despite being closed source, holes are discovered constantly.
I hate to break it to this guy, but this article is basically a big rant of his personal opinions. Not that I have anything against that, but I feel anyone heeding this person's advice unerringly would be making just as big a mistake as if they didn't listen to any of his advice.
Open-source, closed-source, it doesn't goddamn matter. The fact is, code is written by humans, and is therefore imperfect. Realize that now and save yourself a lot of time. Open-source continues to have just as many flaws in it as closed-source. How many times has the bind package been updated in recent memory? And don't start the "many eyes" thing again, we all know it and we're all tired of it, and I realize open source gets fixed faster.
My point is, when I first got into Linux, I took a default install of Red Hat and threw it on there. I had read all sorts of advice that if I wanted a secure server, I should use *nix, so I did. Yeah... rooted. Rebuilt the box, using a way newer distro... rooted. My failing was trusting the code implicity based on what other people said. Old versions of open source stuff are just as vulnerable as old versions of closed source stuff! And you know what? I guarantee that this will always continue to be true.
Constant vigilance is your only safe-guard. The open-source/closed-source argument is secondary to this. If you can build, deploy and maintain a closed-source based system much easier/cheaper/faster than an open-source one, well, balance that against your security requirements.
I moderate "-1, Fool"
The article is a nice read, but it is obvious that the author have little experience in commercial software production.
Quality and security of a commercial software product is a financial decision, not a technical. Much like how software architecture is a strategic and not a technical decision, which many software developers do not realize.
When the cost of continuing to improve quality and security exceeds the income from support contracts, you have to draw the line. If you don't provide or charge for support, you draw the line when your investment exceeds your targeted income projections.
There are software products that are secure and virtually bug-free, but you and I can't afford them. They run nuclear plants, space shuttle command centers, etc etc. Hundreds of millions of dollars have been spent on that software, and it is not a question about "the user is evil". It's about having a thorough and mature development process and organization, preferable at CMM level 5.
So, I really don't know where the article would apply. Maybe when writing simple VB games for your website. Absolutely not when writing commercial grade software.
Oh, I can't help quoting you because everything that you said rings true
For my application, I have made a special string library which is resistant to buffer overflows. Instead of a string being a simple pointer to a string of characters, terminated by a null, a string is a structure with the following information:
- The current length of the string
- The maximum possible length for the string
- The encoding of the string
- The length, in octets, of a single piece of data in the string
I then make sure that any manipulations to the string library always check to make sure we do not exceed the maximum length; I also have a three-byte cusion in every sllocated string to insure that one-byte buffer overflows do not happen.Some other practices:
- Sam
The secret to enjoying Slashdot is to realize that it should not be taken too seriously.
Qualifications?
Let's see...
Wow! Pretty exceptional, don't you think?
'bout the only thing going for the guy is he *doesn't* have a blog...
How the f*ck did this nonsense get put up on /. anyway?
What changed hands to get this deal done?
t_t_b
I'm on PJ's "enemies" list! Are you?
Not to mention Windows own unique security flaws.
Yet, his article appears on the front page of /., the very "home" of the people he offends. To quote Michael:
No it is definitely not.
Mother is the best bet and don't let Satan draw you too fast.
Most programmers graduate from state universities with no real-world experience in security, hacking, and so forth and no connections to anything that's going on -- it's simply a pass from the university of a student molded from the dirt-poor standards of a mainstream college system to a corporate programming world of laziness and no liabilities.
However, these people who are no more qualified to write code than a third worlder with no previous formal schooling trained to be an H1B in a cert mill -- yet are paid much more, for no good reason.
If anything, regular programmers who would ever, for example, use PHP's fopen() for a proxy like the article described should be paid like H1Bs and school teachers -- about $35,000 a year, at the most.
However, the ones who really know their shit -- like Mr. Bacarella -- should be the ones making $100,000 a year or more.
Now how many Ocaml coders are there out there? Five thousand? Actually that number is probably generous. Just fess up that no one cares about this language regardless of its benefits. Its added to the list of Lisp, Haskell, and all of the other languages that could save the world if we just adopted them.
Even then, Ocaml does nothing to secure the monstrous existing C/C++ code base.
When coders run out of answers, they often resort to blanket claims of utopia delivered by a mysterious and obscure language.
Why do you think Java and, to a lesser extent, C# are so popular right now? ESPECIALLY for teaching? Because with Java and C#, it's very, very hard to write code that can break the system it's running on.
It's also very hard with C/C++. The most you break on any system without very broken protection-handling is the faulty program itself.
The reason Java is taught as an introductory language is that it was stylish about 5 years ago. The reason C# is taught as an introductory language is that Microsoft threw a lot of money at universities to teach it, and at marketing to attempt to make it stylish.
It boggles my mind that people in second-year programming courses at my university don't know what a pointer is, because it wasn't covered in their first-year programming course (which used Java).
Languages with built-in safeguards are great, if that's your primary concern, but programming courses in university are supposed to teach you about all aspects of programming that you might reasonably encounter. If someone graduates without knowing how to debug memory errors and then has to maintain a C++ program, God help us all. This is also why we're forced to learn Lisp/Scheme and exposed to Fortran at some point - exposure to the concepts is what's important.
As far as what's used in industry is concerned, first likelihood is whatever the shop has used for the past several years (anything from VC++/VB down to Cobol, depending on where you're working), and second likelihood is whatever the industry fad was when upper management was setting up specifications.
High level languages are great for high level problems. Low level langauges are great for low level problems. Use the right tool.
When all these half-trained Java-based "CS major"s have to deal with real systems of all types, including those that require memory management by hand?
This is precisely why Java and C# SHOULDN'T be the primary teaching language at any serious institution. It doesn't just encourage bad habits in memory management, it breeds ignorance of the CONCEPT of memory management. I'm extremely glad I had a good background in C/C++ (and even some Pascal before those) before I ever learned Java or Python, or I wouldn't have a clue about half the concepts that a good C background forces you to learn.
Added to which, using outdated hardware is never an option in industry. You must write to you user's platform.
Guess what, every choice every entity makes regarding anything is a compromise. Security is no exception and so long as it costs money and takes time, it will never be THE ONLY FACTOR as this guy thinks it should be.
What does he expect? One security expert per I.T. staff to watch over their shoulder and make sure they never do anything insecure? Maybe we should train everyone on the planet as a security expert, and dedicate 100% of every available resource we have to securing software.
I understand what he's saying, but give it a rest. We take chances all the time and adjust according to the outcome.
-... ---
Horsehockey.
Bull fucking shit.
It should be a crime to *start* students on a protected environment like Java. Programmers who start on Java begin with less understanding of what's going on, because it sweeps too much complexity under the carpet.
I realize this argument was made for assembler when C was introduced. BUT! There was a massive shift between assembler and C, which is why that argument is not valid.
C and Java both have pointers/references. They both have functions, etc. But Java's references are hidden from the user, and most students don't have a clue about a reference.
Asm. vs. C was a big difference, but Java and C++ share so much, but Java sweeps all that complexity under the carpet. If a programmer who's only used Java gets into a C++ project, he'll fsck it up so fast it'll make your head spin.
It should be a crime to teach Java as a beginners language. It's not a bad language, but under no circumstances could it conceivably be considered a beginner's tool.
Dude.
I learned how to learn when I was in college. Circumstances forced me to drop out, and I applied that ability to learn, to move forward and upward.
I don't know about anyone else, but I have had -no- problem finding new jobs in this crap economy. Why? Becuase I'm not keeping my skillset static, and I can prove I have the skills, and the experience, to get the job done.
Franky, that's what employers are looking for, right now: the skills -and- the knowledge on how to most appropriately apply those skills.
Just because you know a dozen programming languages doesn't mean that you know when to use one language over the other, or one design philosophy over another.
experience? there is no substitute for experience.
Many have already commented on the claim of supposed security of not using C/C++. So following his "logic" - you shouldn't increase the length the length of code by 4-8 times by using C++ (my paraphrase) -- but you should write all of your own code?
Sorry, but if I agree that one person can not make Oracle (by this I assume he means the database) secure - then wouldn't multiple people on the project at least help? Maybe they can see the things that I cannot see? AFAIK, the more that can find flaws in software the quicker it gets more secure (as in nothing will sever be completely secure)
If you blog it...
But you have to have a verified design. Actually MS does offer solutions like this, inderictly, with Windows Datacentre. With a Datacentre server you can get things like gaurenteed uptime and so on. What happens is you contact an SI that is authorised to sell it, and you work with them to design the hardware and software you are going to use. They build and test the whole thing, and then sell you a gaurentee with the system and service contract. You then can't mess with the system. You can't go and install whatever software you want, because the software might break the system.
Real verified reliable design are, by necessity, very unflexable. You have to verify all the components and make sure they work together to insure that one won't cause problems. You then can't change the components, with out reverfing.
This just doesn't work for a desktop, where the user expects to be able to operate the system as they desire. that means that peopel can, and will, find combinations of software adn hardware that will fail. Hence, a software company can't gaurentee reliability in that situation.
You don't need secure clients, you only need secure servers.
Tell me, what is the compelling business reason for using windows that prevents me from using anything else in a corporate environment?
There is only one answer (or is it three?):
"Fear, Uncertainty and Doubt"
And that's one feature we can all do without!
There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
Earlier in this article, we see the inflammatory statement: It should be a crime to teach people C/C++. But later in the very same article: Whenever possible, use industry standards. For example: POSIX, ANSI C, OpenGL, SQL, etc. Beg pardon? If we use C or C++ (industry standards, I believe), should we then be imprisoned or lauded? Or is it just possible that the author is getting a little carried away with himself? "Programming languages without mandated security don't break systems. Bad code written in programming languages without mandated security breaks systems." Kelcey
I wonder if the image links on the page, eg:
file:///usr/share/latex2html/icons/nx_grp_g.png
are intentionally broken to show how easy it is to screw up.
I dunno.
Bah, it's only hard to do your job because you don't know what your job is. Your job is to make the environment the way the coders want it. If that means leaving everything open so the hackers can walk in, that's what you should do. Then you get all the shitty coders fired, you hire new, good coders, and you respect thier opinions and don't force them to come up with cheesy hacks like web services because you refuse to open up anything except port 80.
I've been wondering if there's much difference between C and C++ in security. C seems to be most used language for system and server programming nowadays, especially in Open Source projects.
C++ has many features that forgive your mistakes. With proper string, buffer, and other basic data type classes your bounds are always checked so there can't be buffer overflows which seem to be most common source of problems. In addition, automatic destruction of objects eases memory leaks.
You can, of course, do all the same things in C, but it's always syntactically more complex than in C++. You need to learn dozens of different coding rules just to avoid trivial problems. Often you forget to apply them; each time you create a risk.
For example, just today I noticed a dangerous situation when I initialized a callback function table with:While this works quite nicely, it's secure only if the struct always contains the two items. If a new item is added to the struct, all uses of the structure would have to be updated, but the compiler might not warn about this situation. In this case, the result would probably be a program crash. A more secure way would be:This is much safer. However, in C++, this problem simply wouldn't exist because structs are typically never used and classes have constructors that always initialize them properly and user doesn't have to care so much about possible changes in the classes.
This is just one example. There are plenty more.
On the other hand, stuff is more often allocated from heap in C++ rather than stack. Memory might therefore fragment more easily in C++ than in C.
that's the thing you see, trusting the client is plain wrong and assumptions made with that model will get you in trouble.
plan9 offers a model that doesn't require trusting the client. It runs a dedicated authentication server and a dedicated CPU server and a dedicated file server. The three talk to each other behind the client's back.
http://plan9.bell-labs.com/sys/doc/auth.html
There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
This is missing the point. Security is not a destination to be reached, but a room tempature set to the preferences of the occupants. Do you ever lock your car doors when driving through the bad part of town? Do you think that we secure our homes the way we want our airports secured? Can you not acknowledge that we all tolerate specific levels of risk in many areas of our lives? Some one had a great point when they pointed out that Nuclear power plants, the space shuttle, ICBM warz are all very secure and mature systems. Do you really think that when Joe Bloggs starts designing an autopart inventory control system, that he is thinking about preventing unauthorized access to the extent of a powerplant? Or that the building engineer for a 12x12 parking lot PhotoMart cares about making his hut as difficult to enter as a bank?
He lost me right here,
"If something like Windows plays any part at all in your system design, you should probably give up now."
Just another piece of FUD from an OS elitist, who apparently has amnesia about the numerous past exploits in Apache, BIND, Sendmail, OpenSSH, etc. Nevermind the fact that every single Fortune 500 company uses Windows in some form. I guess they all need to give up now, their systems will never be fully secure.
Furthermore, the article says it's for developers but it seems to be filled with information for IT people - don't trust your firewall, watch out for Oracle, watch out for Apache, don't use Windows. I thought I was going to be reading an article on software best practices, instead I'm just reading a guy ranting about why IT pros should use open source. Bleh.
He thinks it's a crime to teach C++. He says Ruby is much better. His arrogance is equaled only by his ignorance.
C++ has its faults. But at least it means something to say that a program is written in C++. The language and its library are reasonably well-defined. Not perfectly, but well enough that in almost all practical situations, it's possible to say with certainty what a well-written piece of C++ code should do, by reading the said piece of code and the specification of the C++ language and its library.
This is certainly not the case for Ruby. The only way to find out what many Ruby programs are supposed to do is to run them. You then know what they do under one specific release of the interpreter, on your particular machine. Ruby isn't a programming language, it's a learning experience for its author and a toy for its users.
Any "programmer" who used it for anything that mattered deserves to be fired on the spot.
> One can be hacked on any operating system by someone more clever than themselves.
Well, like the parent post said, a non-windows system is not a guarantee of invulnerability. Granted, I wouldn't call MS=security risk insightful either- it's just common knowledge.
I've got a mind like a steel trap - it's got an animal's foot stuck in it.
Shrug, you're running into the classic problem of security vrs convenience. And thats actually a policy decision, so either you have that power and it's not hard, you just tell em they can't do that, or someone else makes the decision that they can, and you better give them what they ask for. Sounds like your problem is a screwed up org chart more than the skills of your people.
I am personally aware that one of the largest internet traffic servers there is (top 10 or so) was written in C++ by a programmer with no training who might rate as an intermediate coder.
That system, despite being a big name, has never been compromised. Ever. [I wont name them so as to not encourage hackers to prove me wrong]
The reason for this is security through obscurity. The code is proprietary, and the code is completely custom. Hackers totally fail because they have no information about how the system works.
The system is immune to worms too, again because it is totally non-standard. Any system built with any turnkey system is going to be vulnerable.
Thus I know of a case that roundly contradicts the author's idea that C++ in the hands of beginners is dangerous.
From the article: "Considering that most good programmers are pretty bad at security,"
I don't necessarily accept this assumption. Most good programmers are good at coding up the design and requirements they've been given. The customer/architect/business analyst/technical lead needs to identify security requirements before they can be coded. It's very expensive to leave identifying security requirements to programmers. Not every project has the same needs. Sure, the programmer could guess. But each programmer on the project would end up spending a different amount of time and money on the security aspect if it's not clearly prioritized.
Likewise, if security requirements are not specified well enough, a security test-plan cannot be written or executed. If you need security, ensure it's somebody's explicit JOB on the project to ensure security gets into the design & QA.
Security costs money before a single line of code is written. Decide how much you need, where it's to be applied, and ensure it becomes a critical requirement through coding and testing. You can't expect security to just "happen" simply by hiring some "good programmers" as the author says.
It seems that Security aware coding is moving towards a situation akin to the bean counters that decide whether to recall a certain model of a car ...
People didnt set out to write insecure code. But usually thay have a set of requirements to meet in order to get paid. Apart from a few industries where large sums of money or human life were directly involved , meet the requirements ASAP and get paid...
Even "closed source" development projects have Quality Assurace processes where some dude checks your code (whether they know what they are looking for is another issue)...
But particularly with bespoke code, people write according to a set of requirements. "I want it to do this, I want it to do that..". If it doesnt I can sue/refund/get free upgrades, if it gets hacked by some snotty nosed kid , tough, that kid wasn't in your requiremnets. Security is not easily specified as a requirement and is hard to insure against (financially) .. so pretty soon you will see the emergence of "security support contracts".
This is the direction Micro$oft are going in ..
(sustainable revenue is good for any business)
Yes, there is a wide range of programmers with varying abilities. but (apart from open source products), certain companies have realiazed they can/will charge big bucks for more security oriented support contracts, so what do they care.
For non-opensource companies lack of security/defensive programming has changed from being a liability to a profit generator.
Either they'll make a lot of money or open source will prevail.
Also expect a lot of specialist code review/certification/QA companies to pop up
"This product is independantly DeadBolt certified"
and hence costs $30 more + $30 a year for the latest security upgrades...."
(multiply those figures as appropiate!)
ACM's position on software engineering is that software engineers should not be licensed as professional engineers. Follow the link for lots of reasons.
My own opinion is that liability can exist without licensing. Companies working on safety-critical projects should be careful about people they pick to work for them. They should have adequate quality control procedures in place and should be held liable for negligent behavior. On top of that you could have regulation addressing specific safety concerns as you do for car and medical equipment manufacturers.
"In prison you just have to shut your eyes and take it. Here you have to shut your eyes and give it."
If you want to learn how to write secure programs for Linux or Unix systems, read my freely-available book, Secure Programming for Linux and Unix HOWTO. You can get it from http://www.dwheeler.com/secure-programs.
- David A. Wheeler (see my Secure Programming HOWTO)
Also, it isn't cynicism, it's experience that says that Windows guarantees a security risk. It's an intrinsically unstable, risky platform.
So the bashing was hardly gratuitous.
sorry about the clueless
On reflection I'll retract that
There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
1) 1) Users are pure evil.
We don't know if there could be sources of evil outside of Users.
2) Civilization is made up of users.
We don't know that Civilization is made up solely of users.
3) Computer professionals are responsible for the collapse of civilization.
That we are responsible for the collapse of civilization does not mean that we destroyed all users.
4) Computer professionals will therefore destroy all evil
The assumption is made that Evil is a non transferable entity. For example, a user could corrupt a system administrator via constant abuse. The sa then gets the evil idea of deleting all home directories. Even if Users contained all Evil in #1, the switch to future tense in #4 invalidates #1 as a given. Users are pure evil means that NOW users are evil. It doesn't say anything about whether or not they will be pure evil in the future.
He kind of sounds like a bit of an a$$hole, to be utterly honest. He repeatedly slams just about every computer professional on the planet (except himself, of course) for everything from writing bad code to not knowing ALL the details of EVERY service running on EVERY machine they have responsibility for. I can, off the top of my head, mention a hundred organizations who are so small they cannot possibly afford a person of this depth of knowledge.
He also ignores the facts of the world, choosing instead to think that everyone else needs to bend. Programming languages are being written insecurely by everyone alive? Don't whine about it, try to come up with a better way that won't make it so hard to write secure code with the available workforce out there. Let's face it; the infrastructure that exists needs supporting, and we can't wait until all the monkeys out there learn the One True Way(tm) of making everything secure. Telling everyone that they need to know everything is a stupid way to tackle the problem.
For your security, this post has been encrypted with ROT-13, twice.
If something like Windows plays any part at all in your system design, you should probably give up now. Despite being closed source, holes are discovered constantly. The Windows system is also far too massive, complex, and user unfriendly for human beings to have any hope in securing it.
It should be a crime to teach people C/C++.
This isn't an attack on the language itself (although there are plenty). The problem is that people use it to write high level applications....High level languages like Ruby, Python, or even Java are strongly recommended for all new projects.
Actually, I think you are a troll. You read the article, know about the boycot on Amazon, and wrote the most infuriating and leat informative thing you could. Thanks.
For those of you just tuning in, I like C, but the author's got point about using it to write high level stuff.
Friends don't help friends install M$ junk.
IMHO the vast majority of todays problems stemm from the fact that we have an increasing need for computer programmers, so we build systems that an idiot can run. So, we DO have idiots running and maintaining computers.
.Net Studio and start thier "Wizards..." (OK, so I had to deal with a MBA guy who decided he wanted to program in Java...for about 3 years and I couldn't take it anymore...the guys was thicker than a BRICK WALL when it came to Software Design.)
.Net (Beta 3) for COM, DCOM, Active X and .Net C# code is just plain BAD.
.Net Studio software, in 3 different languages, with thier nice little wizards and three years from now exclaim: "Hey, we reused our Cobol, C, and Visual Basic code we invested in....Oh whats that? Yeah, we have 3 different guys here maintaining the same software our competitors use only 1 person to do the same Job because they ditched all those environments and used Java instead."
Case and point, Microsoft Products.
Microsoft Windows and its philosophy of design to try and make systems easy to use by making it a snap to put servers up and running in a jiffy with a minimal background of how any of the services actually works, is a HUGE problem.
No DNS admin of a Windows box I personally have run into actually understands how DNS works. They use Wizards to setup the DNS server and well, presto, usually a wrong DNS server with malformed records or BAD zone lists.
The problem with this approach, is that computing is not that simple.
It never will be that simple of a system, computing in general that is.
Microsoft's seeming objective is to code every possible wizard configuration for a Word processor, server or whatever so that it "just works". This enables people to turn services on without understanding Jack or Jill.
Why even Aunt Emma can be a XP server administrator.
The point is, that when you have computer code making decisions increasingly, you run into systems that are hugely monolithic, and dangerous form a security perspective. People make mistakes as IS, but making security policy from service Wizards that are designed by people is a recipe for DISASTER.
Case and point, even small changes or patches to such systems can have unintended consequences. Microsoft products are HUGELY monolithic, and the enourmous amount of computer code built into them making decisions automagically for the system operator through Wizard based services setup can get one into big trouble.
Linux is TOTALLY OPPOSITE. Linux is NOT monolithic. In fact, you can strip Linux down very easily because services are in affect partitions, seperate software packages that have NOTHING TO DO with kernel or OS services.
Linux is inherently, no, not inherently, IT IS more secure because you can strip it down to the bare essentials and have a smaller running server with fewer lines of code. Fewer lines of code, means fewer execution pathways and unintended bugs that could compromise security. Plus a human is at the helm and 100% in control. Not a wizard making all sorts of setup decisions automagically.
Out of the box, inherent in its design, Linux is more secure because you can run it with fewer lines of code to do many of the same things. In fact, you can run Linux without a video card, and many people do if you are building a router. (You use your wireless Zaurus to ssh into the box for example.) You can run Linux as a DNS server and not have a login keyboard of any kind, no Applications running or EVEN LOADED for that matter.
Fewer lines of code means the server is also simpler to maintain and recover. Hugely monolithic installs like Microsoft Windows XP means longer backup times and longer still restore times.
Whats more lots of software running in the background means you have to have very complex backup daemons running, using backup obscura kinda methods to unlock secret systems files by the THOUSANDS and all sorts of party dancing to get a server backed up. No WONDER it is a very complex and very expensive endeavor to backup and restore a Windows machine so that it actually WORKS if you lose the hard disk...
Linux is just the opposite. Since the system can be stripped and customized by the admin, Linux backups become a simple file system backup. The kernel doesn't interfere with your decisions to load or unload applications. In fact it couldn't care less.
In the end, I find Linux prevents many MBA's for example from waking up in the morning and saying "Oh, I am bored with my job. I think I will be a programmer..." Presto, they load up a Visual
The final point I would like to make is that automated software construction makes for REALLY BAD software. Case N Point, more Wizards.
I certainly don't mind SOME help, but some of the drag and drop code I have seen in for examples, Microsoft's Visual Studio
But it is OK because it allows you to put together an application in 2 hours? More and more I hear Microsoft Balmer explaining: "We have the finest tools that bring value to the development process, that our competitors can't match. TCO (Total Cost of Ownership) is far lower because you can build systems much faster with Windows than Linux."
Man, don't get me started!
Anyone who knows anything about software engineering studies will tell you, the cost of owning software isn't in the design or construction portion, its the debug and MAINTANCE cycles of the softwares life span which is most expensive.
The code that these wizards pump out is not something I would like to try and maintain...
GOD HELP YOU if you should ever LOOSE the Visual Studio software because debugging the crap would drive any sane person to the old folks home for crazy and insane, burned out programmers!
(Note: Alot of the Java wizard tools for Swing are just as bad...maybe even worse than Visual Studio's code output...)
Most of the code output by Wizards is not very intelligible. Maintaining it is an invitation to a nightmare and cost that only a fool who would buy into that sort of argument.
Not too difficult anyway if you are already paying for Microsoft products, so fools are in good company long after they build
Hack
Got Geometrodynamics? Awe, too hard to figure out? Too bad.
I need something that can be compiled
The vast majority of Java VMs compile the performance-critical stuff at least down to native machine code. For faster startup time (and sometimes faster running time) you can use gcj, but only for non-GUI stuff.
Swing GUI performance was just about acceptable when I started using it five years ago - and since then it's got faster and is running on much faster CPUs. However, bad coding processes, like running long non-GUI computations in the GUI thread, can make Swing seem much slower than it "really is".
can offer some type of event-driven operation,
Yep. addActionListener etc.
will work with a GUI toolkit of some sort
You have a big choice! AWT, Swing, SWT, OpenGL and more... Qt/KDE bindings are currently out of date and therefore broken but I'm hoping they will be updated soon. Anyway, I would recommend Swing - it seems to be the most flexible.
and is "safer" than C++
Yep. No pointers, no segmentation faults (in theory), no array overflows (unless you turn off checking in gcj for performance), etc.
I don't need the candy-coated interface, but I do need a language that will provide those things in a reliable fashion.
JDK 1.4 has a really appalling bug that makes it crash on 24-bit mode on some Linux distros (the workaround is to use JDK1.3 or lower IIRC), but apart from that I've found it to be pretty reliable.
There is a big choice of IDEs, including some free ones like NetBeans (but that's quite bloated and slow).
Female Prison Rape in NY
A non-Windows system is not a guarantee of invulnerability, but keeping a Windows system is guaranteed to put you at risk.
/. posted that article by someone who wanted Oracle to rewrite their server in Perl.
Let's parse this sentence for actual meaning:
"If you don't use Windows you are at risk, if you do use Windows you are at risk".
The entire article can be summarized in one sentence: "C is too difficult for me, and I've heard it's cool to bash Windows". Looking at his pages, he no commercial experience, and not even a CS degree. There are people writing on software quality, like Yourdon and McConnell, who have more experience than this kid's been alive. The fact that this article got posted at all speaks volumes for the editor's own software engineering expertise. Baracella is full of contradictions, like don't use C, but use C to verify the underlying platform. What? Or his ideas on reinventing the wheel, how are you supposed to do that if you on;y have high-level scripting languages? I haven't read so much rubbish since