Slashdot Mirror


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."

49 of 326 comments (clear)

  1. Engineers (again...sorry) by jpt.d · · Score: 5, Interesting

    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!
    1. Re:Engineers (again...sorry) by ergo98 · · Score: 3, Informative

      How absurd. This whole certification thing is such a tired argument, though it's one that the IEEE is revving up as a new source of income (and I'm an IEEE member, but that doesn't mean that I agree with ridiculous certifications). Certifications and licensing are not, in most cases, a guarantee of quality. In reality in many cases these licensing boards turn into self-protective entities that allow their members to get away with things that they would never get away with if not surrounding by the shroud of, err, "persona responsibility" (see some of the medical boards that act more like shields against personal responsibility). Did you know that one of the P.Eng criteria, at least here in Ontario, is that you cannot discredit another P.Eng?

      Most certifications are nothing more than an economic barrier to entry: A club, if you will, whose membership betrays zero information about the capabilities of their members, but rather excludes those who haven't signed up. P.Eng is a particularly notorious one because they've tried to get their grubby hands on virtually all aspects of society, while provably offering nothing in return. No thank you. I don't need a "P.Eng of Burger Making" to make my Big Mac, even if that does help Bob get his friends a job through his exclusive club.

    2. Re:Engineers (again...sorry) by aero6dof · · Score: 5, Insightful

      If Microsoft's products are so good, why do they disclaim liability on it?

      Because the customers don't want to pay the added cost of reliability beyond what they need. If you want absolutely, positively bulletproof software, you're going to have to pay a higher development cost (mostly in testing, but in extra liability insurance for the company too). For safety-critical applications, customers are willing (or should be willing anyway) to pay for the additional cost , but it's ridiculous to pay for it when you don't need to. Do some googling on the cost of the space shuttle software for instance...

    3. Re:Engineers (again...sorry) by esarjeant · · Score: 3, Informative

      I think this is the link; a good read:

      Why Mainframes Rarely Crash

      --

      Eric Sarjeant
      eric[@]sarjeant.com

    4. Re:Engineers (again...sorry) by SerpentMage · · Score: 3, Interesting

      Sorry but there I think you are absolutely wrong. I happen to be an engineer, not because of an economic barrier, but because I managed to study x years in a University.

      And since you are in Ontario, which is where I got my engineering degree you should know that money is not the issue to getting an education.

      Also engineering certification does not mean quality. It means that you studied so many years and have gone through specific procedures. Just like police people and fire people. Some police people are good and some are baffoons, but regardless you know that they have gone through police trainning....

      When engineers become liable for stuff that they design, people design very DIFFERENTLY. This is not to say that everybody has to be an engineer to work on software. Just like in a custom machinery shop not everybody is an engineer. You just need enough engineers to sign off legally on designs.

      --

      "You can't make a race horse of a pig"
      "No," said Samuel, "but you can make very fast pig"
  2. So basically... by vasqzr · · Score: 5, Informative



    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)

    1. Re:So basically... by Anonymous Coward · · Score: 4, Funny

      Writing Solid Code: Microsoft's Techniques for Developing Bug-Free C Programs by Steve Maguire (Paperback

      Also holds the world record for "Shortest Book".

    2. Re:So basically... by Koyaanisqatsi · · Score: 3, Informative

      Writing Solid Code: Microsoft's Techniques for Developing Bug-Free C Programs by Steve Maguire (Paperback)

      Why do I find that title funny?

      Seriously now, I had the good luck to find and buy that book about 4 years ago, ever since I always go back and check some of the insights there. There's pretty much everything you need to write solid C code that's bullet-proof and easy to maintain/upgrade. Too bad they don't use the book in-house more often.

  3. If something like Windows plays any part at all .. by burgburgburg · · Score: 5, Interesting
    in your system design, you should probably give up now.

    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.

  4. It wont matter much by Lumpy · · Score: 5, Insightful

    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.
  5. Useless advice? by Ars-Fartsica · · Score: 3, Insightful
    To quote "It should be a curse to teach C/C++"

    ?????

    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.

    1. Re:Useless advice? by Subcarrier · · Score: 5, Insightful

      He's contradicting himself here:

      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.

      when he goes on to say that

      High level languages are usually more secure than C/C++ ...

      High level languages are built on layers and layers of things written by other people, things that you know nothing about. If you use C or assemlber, you're much more likely to be in control of the security of your code.

      I guess the comment about C/C++ is aimed at coders who suck more than average; they're certainly better of using code written by other people.

      --
      "I have opinions of my own, strong opinions, but I don't always agree with them." -- George H. W. Bush
  6. a good read by lactose99 · · Score: 5, Funny

    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
    1. Re:a good read by Digital+Mage · · Score: 5, Funny

      1) Users are pure evil.
      2) Civilization is made up of users.
      3) Computer professionals are responsible for the collapse of civilization.
      4) Computer professionals will therefore destroy all evil. ;^)...Cool!

    2. Re:a good read by Tack · · Score: 3, Funny

      This is almost true, unfortunately I must ammend 2) and 4):

      1) Users are pure evil. (Given.)
      2) Civilization is made up of users and computer professionals. (Assumption)
      3) Computer professionals are responsible for the collapse of civilization. (Given.)
      4) Computer professionals will therefore destroy all evil and take themselves out in the process. (Conclusion.)

      Jason.

  7. Of course... by ultramk · · Score: 3, Funny

    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
  8. You get what you measure by Max+Coffee · · Score: 5, Insightful
    I really don't think the blame can be placed on the programmers here. Software development organizations get from their programmers what they measure and reward.

    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.

    1. Re:You get what you measure by aero6dof · · Score: 4, Insightful

      I agree with you and would go a little further. Its not only their internal company environment, but the environment of market too. Unless customers are deciding to purchase one product over another due to its security features, software isn't going to get more secure.

      Look at airbags in cars, the government doesn't mandate side impact airbags, but some manufacturers put them in anyway because it's a selling point that some of the customers care about.

      Now, I'm sure someone is going to point out that maybe we should have gov't enforced minimum security standards. However, I'm skeptical that government would be capable of doing it sanely right now.

  9. Better languages by PylonHead · · Score: 3, Interesting

    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 =
  10. What hubris. by ProtonMotiveForce · · Score: 5, Insightful

    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.

    1. Re:What hubris. by stephanruby · · Score: 5, Informative
      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?

      Here is his professional experience on projects. You can actually see his code and the depth of his work is not at all impressive.

    2. Re:What hubris. by Peaker · · Score: 3
      There are two points I'd like to make.

      A: I agree with everything he says in his article, and it obviously isn't obvious to most programmers these days, thus insightful.

      B: Skimming through random code of his, it does seem that his code doesn't live up to such high standards that he may claim.

      A: If you just look at the huge amount of high-level projects written in low-level languages such as C and C++, and the sheer amount of bugs, you can see he has a point.
      High level languages may have implementations that add security risks, but the languages themselves make it harder to accidentally express bugs, including those that generate security flaws. A language's practical security value can be measured by the security level of its implementations. If you look at CPython's implementation (The one written in C), for example, you see some very good code, written by very good hackers. I have no clue about the bug-levels in Python systems like psych, Jython, or others, but they are probably of adequate levels. Perl has been around long enough to have probably been debugged as well.
      Java is new and has some seriously crappy implementations with lots of bugs. But out of the vast amount of implementations, some must be safe.
      Adding the language implementation code, is similar to adding any type of code to your project (libraries, system calls, etc). However, language code is probably better debugged, and only a very small base of its implementation has to be debugged for pointer flaws and indexing problems to be eliminated.
      There is almost no doubt that Python has (nearly?) no pointer problems or indexing errors in typical configurations in its official sources.

      B: Just skimming through his "light, secure, lightning-fast HTTP server" code, I saw some ugliness right off..
      Using integers for enum values (even when an enum is declared!). Using complicated pointer arithmetic, where a simple indexing "for" construct can be used (to eliminate error-proneness). Using a static array of pointers to structures, malloc'ating each entry: This is combining the evils of static allocation (limited size, unused bytes for lower cases), and the evils of dynamic allocation (complexity of pointers), the need to malloc'ate (slower than not doing anything), memory fragmentation. Ofcourse he should have used a dynamically growing array of pointers (preferrably one implemented generically via macros/or void* lists, to reuse debugged code), or a static array of structures, but appearantly his code is second-class.

      To summarize: while I think his code isn't the best, I do agree with the points he makes, and according to your claim that high-level languages cannot help security, I think that you are probably worse off.

  11. Peon?! by gergi · · Score: 5, Funny

    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
  12. It should be a acrime to teach C/C++ by l33t-gu3lph1t3 · · Score: 5, Insightful

    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" ----------
    1. Re:It should be a acrime to teach C/C++ by ChaosDiscord · · Score: 3
      Because with Java and C#, it's very, very hard to write code that can break the system it's running on.
      If I can break the system I'm running on with a user level program, be in C, assembly, or whatever, the operating system has a bug and should be fixed. Once your running in the kernel level, well, you can pretty easily break things in any language.

      Languages like Java and C# give you controlled, well-known failure states for certain categories of bugs (you can still walk off the end of an array hosing your program, but the behavior is well defined, unlike C or C++). These languages also restrict your ability to specify unsafe things, but in doing so they take away your ability to specify certain useful ways of doing things. But there are still huge numbers of ways to put bugs into your programs in any language. Java and C# are not magic bullets, they're simply points along a spectrum of safety, power, and expressiveness.

  13. Your wife's in-laws? by Wee · · Score: 3, Funny
    One time I was in the next state visiting the wife's inlaws...

    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.

  14. Wrong approach by lazyl · · Score: 5, Insightful

    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!
  15. Everyone has to start somewhere. by BoomerSooner · · Score: 5, Insightful

    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.

  16. We Need To Consider 1980s DOD Practices by DoctorMabuse · · Score: 5, Insightful

    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.

  17. Just what we need... by j_kenpo · · Score: 5, Insightful

    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...

    1. Re:Just what we need... by ProtonMotiveForce · · Score: 3, Insightful

      The offensive part is the platitudes. It's one big general diatribe on nothing at all. Reminds me of the preachy father from Hamlet - all words and no content.

      Is his point that people need to be more serious about security? Fine. But he's utterly unqualified to be giving technical advice or making technical judgements on a field he obviously knows nothing about (use Python, Ruby, or Java and never C++? I call buzzword bullshit bingo!) other than the vague general knowledge a "technologist" would have.

      It's like me saying plastic surgery has become dangerous because there are so many quacks, and they all need to sharpen their scalpels and pay attention to sterility.

  18. Article missing key point by bigmouth_strikes · · Score: 5, Insightful

    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
  19. Who the f*ck is this guy, anyway? by talks_to_birds · · Score: 5, Insightful
    Surf to his web site, and it's just the same old self-absorbed bullshit that so many other people put up.

    Qualifications?

    Let's see...

    • I was born on August 28th 1980, 4PM in Long Island.
    • My life was pretty aimless until I broke my arm in the 8th grade, keeping me from most sports and physical activity. That's when I discovered the magic of computers. I haven't stopped poking them since.
    • My chief interest is in information science (ie, computers). This interest involves my day job, my business, and most of my recreational activity.

    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?
    1. Re:Who the f*ck is this guy, anyway? by sien · · Score: 3, Insightful

      Looks like the editors just got trolled. 'Netgraft' indeed. Perhaps this guy is a mate of the Afghan with a C64 that so intrigued Katz, speaking of which, what happened to him ?

    2. Re:Who the f*ck is this guy, anyway? by HamNRye · · Score: 3

      A story by Michael Barcella posted by michael... One and the same??

      Seriously though, this is one of the worst rants I have read. First of all, his claims about closed - open source are nonsense. He says that noone at Oracle could possibly understand the 1.2 GB codebase, and then says we should all understand every process on our own Linux box. Ummm.... And if my Linux box runs Oracle??

      We trust our OS'es to be reasonably secure. Whether it is Windows or Linux or Plan9. Linux can be more secure due to it's open source nature. Conversely, one could state that Since Windows is the dominant OS, IE the one most attacked, it could evolve to be more secure than an OS that is rarely attacked.

      I recall that in the last PC Week "Hack our Honeypot" contest, the Linux system was hacked long before the WinNT box, because the software was open source and could be combed for vulnerabilities. Is open source still more secure??

      I am not trying to say that Windows is better, Linux is better, I'm just saying that when you make sweeping generalizations about design methodologies relating to product quality you deserve to be lambasted as an Idiot. Open source is not inherently more secure than closed source. Period. Yes you can review the source of open source, but who really does?? And for evey package, every revision?? Most OS'es are simply too complex for one person to get his/her brain around. Same for the Office suites and databases. I'm sure some Yakoff will shoot back that understands all X million lines of Open Office, but I doubt he will be telling the truth. Most folks can't be bothered to read the EULA, (this includes most engineers) but they can read the full source for sendmail??

      Also, are we talking about the OS or its applications?? Outlook Virii are the by product of Outlook, not Windows. IIS is responsable for its own security bugs. The only real Windows Components I can think of with security problems outstanding is Shatter attacks on the COM subsystem (Local) and the remote help exploit. (Easily fixed.) Most of the other attacks can be avoided by having the latest patches, turning off the time service and UPnP, and not using IIS. (In linux it's: sendmail, bind, etc...)

      OK, to qualify for the Linux Zealots out there: Linux has had more security advisories this year than Windows. (See earlier story) Many Windows "Security Vulnerabilities" require user interaction from outlook, etc.

      The author posits that we should only use code that we understand to the letter, but we only program in Perl, Ruby, etc... What a joke. I'm supposed to understand C well enough to understand the entirety of the perl interpreter, but I'm not supposed to program in it. Speaking of which, I should read the entirety of the EMACS source too because that'll be my text editor. So, I should be able to start Coding in 6-8 Months. OOPS! Sorry, Kernel update and I have to read the entire source and all of my device drivers, give me another month or two.

      Again, we trust our OS'es to be reasonably secure. Open Source, Closed Source, it's like Democrat or Republican. Some always choose one or the other, but the intelligent choose the best one (at the time) based on common sense and trust.

      One must also assume that at the ripe old age of 22 (haha) he has tons of real-world application experience. Perhaps he'll be sending letters to Apple about interface design next.... Actually, considering he has another 43 years of software drudgery ahead of him (If he manages to get a job in the industry) we should be seeing high quality software pouring off of Long Island for the rest of my forseeable life. Hooray!

      Perhaps his life was aimless until 22 when he broke his head and discovered the magic of stupidity.

      And all that nonsense about the end of civilization.... Takes our job too seriously don't he. Yes dear, poor software design will be the end of civilization. Lets just ignore the fact that civilization A: existed before software and computers, B: continues even in the midst of all of this bad software.

      I could just keep going on this. But I will finish by saying, "How the f*ck did this nonsense get put up on /. anyway? "

  20. Programmers are overpaid as it is! by SexyKellyOsbourne · · Score: 3, Insightful

    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.

  21. It should be a crime _not_ to teach C/C++. by Christopher+Thomas · · Score: 5, Insightful

    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.

  22. Crime to teach C/C++? by Pyromage · · Score: 4, Insightful

    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.

    1. Re:Crime to teach C/C++? by J.+J.+Ramsey · · Score: 3, Interesting
      I started off with Java and perl and had to go back and learn so many fundamental, lower-level aspects of programming and computers in general. I think it's tougher to do it this way rather than starting off with something like C or Assembly.
      Actually, you probably did things in the right order. Learning is often iterative. Sometimes you have to first learn the rough general picture and then fill in the details and more advanced stuff later, which is more or less what you did.
  23. Not only that by Sycraft-fu · · Score: 3, Insightful

    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.

  24. Re:High level languages by __past__ · · Score: 3, Insightful
    There's a simple solution to both the problem of hight level languages being "just a convinent ways to write C" (and I don't see why one should exclude Java here, but I don't think that this argument is valid anyway) and them being slow. Use high level languages that don't run in a C-based interpreter. Duh.

    For example, try Common Lisp, Objective Caml or Ada (not that high-level, but not the worst idea if you care about security).

  25. er, client / server by DrSkwid · · Score: 3, Insightful

    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
  26. Re:High level languages by Jason+Earl · · Score: 3, Insightful

    Using a high level language is the best kind of software reuse. The reason behind this is simple, chances are good that you are never going to be as talented as Guido van Rossum or Larry Wall. Nor will your data structures get as many eye balls examining them as Python lists or Perl arrays. Borrowing the work of the hackers that created some of these languages only makes sense.

    Now, I am not saying that these programs don't have bugs, because they do, but I would bet that they have less bugs than anything you have ever written. So while using high level languages doesn't insure security, it certainly does help.

  27. C vs C++ by magi · · Score: 3, Informative
    Article says: "It should be a crime to teach people C/C++."

    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:
    somestructtype myfuncs = {myFuncA, myFuncB};
    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:
    somestructtype myfuncs;
    memset (&myfuncs, 0, sizeof (myfuncs));
    myfuncs->func1 = myFuncA;
    myfuncs->func2 = myFuncB;
    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.
  28. things can be done with its credentials - nop by DrSkwid · · Score: 3, Interesting

    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
    1. Re:things can be done with its credentials - nop by fferreres · · Score: 3, Insightful

      In fact, you are trusting the client. Not blindly trusting it, but if you provided this client then they will blame you. And if you didn't provide the client (say IE) then you allowed them to access your services through an unsecure client.

      --
      unfinished: (adj.)
  29. Security: Misunderstood responsibility? by dstone · · Score: 5, Insightful

    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.

  30. Its all about the benjamins (now at least...) by ydrol · · Score: 3, Insightful

    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!)

  31. Re:High level languages by defile · · Score: 4, Informative

    When you critique someone's work, it is customary to first read it in its entirety. Besides the fact that it's just common courtesy, if you had read just one more paragraph you could've prevented yourself from committing such an egregious faux pas.

    In other words; if you're going to insult someone don't reveal what a stupid twit you are in the process. Dumbass.

    High level languages like Ruby, Python, or even Java are strongly recommended for all new projects. The reason these languages are more secure (in theory) is that they don't have pointers. Most security vulnerabilities that involve breaking program code involve manipulating pointers-in fact, many programming bugs are generally related to pointers in some way. As with the OS issue noted above, do not mistake this for invulnerability. You're simply less likely to be compromised using this particular attack vector with a high level programming language.