2

I have a course with the following description:

The purpose of this course is the study of programming language security features and languages designed to support it explicitly. Static and dynamic constructs for security in languages and systems, as well as software engineering security principles/patterns.

Topics:

  • Basic Programming Language security framework.
  • Designing secure programming languages
  • Access control in programming languages
  • Information flow languages
  • Capability Languages
  • Mobile programming languages
  • Software Engineering and Security
  • Basic software vulnerabilities in systems
  • Secure Software Engineering life-cycle
  • Patterns, and Practices for software security

I'm confused - How is PL security different from regular security? I'm looking for possible textbooks/books to study, or websites that are good in this topic, or any advice/tips. The professor told me to know C and Java well, that's all I know so far.

I appreciate any tips or advice.

2
  • 1
    How do you define regular security?
    – Mike L.
    Commented Dec 13, 2011 at 2:10
  • Just for my curiosity, could you name the school and/or professor?
    – Kevin Reid
    Commented Dec 16, 2011 at 1:00

7 Answers 7

4

Security (as it is related to PLs) is closely related to the notion of correctness. If your language implementation can guarantee that a certain constraint will alway hold, it allows a better security than a less restricted language. For example, if it is guaranteed that an out of bounds array access is either impossible or will trigger an exception, your code is already safe from a very broad range of possible security exploits.

If a language allows you to reason about certain aspects of how your code will behave, it is more suitable for secure coding than a language with a high degree of unpredictability. Consider comparing, say, C, with something like Coq or Agda2.

1

In college my roomate prepared for such a course by learning how to manipulate memory for an online game he played. It kept him motivated to brush up on his C skills (and assembly) and also gave him the motivation to learn the details of the compiler, and memory/pointer manipulation. Eventually when he had to work on a project he would just play/hack his game... The results of which became his semester project.

1

PL Security is fundamentally no different to real world physical security, pity most of the industry has yet to realize this.

Some languages make it easier to shot yourself in the foot (C) than others (Java), but you can do it in any language if you try hard enough.

Reading the later works of Bruce Schneier and some back issue of his monthly news letter will give you some real insight into what goes wrong.

1

There are secure coding guidelines for Java, which is a very detailed list of "tips" specifically related to Java (and they explain what could happen if you. It's been a while since I used C, but as for C# which I know use frequently there are outdated (because it's for .NET 2.0) security guidelines, still a good read overall. Now, this is related to PL security.

As for software engineering security, MSDN Magazine for example has a Security portal that contains (click on "Learn") many interesting articles/stories related to writing secure applications regardless of the programming language used. It is not necessarily related to C#, VB.Net or any other specific Microsoft languages. I'll just add here a very interesting article I just read yesterday: Lessons Learned from Five Years of Building More Secure Software, but there are many more.

1

The best way to prepare for the course is to buy the book ahead of time and start reading it.

I know it can be dull, but text books are actually designed to teach you the material.

If you want to get ahead, dig in and start reading.

1

Every system provides its own model of interactions and its own set of invariants. A programming language is an opportunity to provide a security model different from the host (OS) model, either finer-grained or just suited to a different (more specialized) purpose.

For example, the OS security model is typically organized around users/roles/groups and the resources (files, sockets, syscalls) that each is allowed access to. The JavaScript-in-a-browser security model, on the other hand, is concerned with source domains, JS code, and DOM objects. From the OS perspective, a browser is just a program run by a single user who presumably has permission to access the whole reachable internet and access all of the user's files. From the JS perspective, however, your favorite adorable-kitten server had better not be able to read your online banking pages or credentials.

So, PL security has a broader range of goals, resulting in different kinds of security models and different techniques for enforcing them.

1

I'd look up information pertaining to the idea of "state" in programming languages as well as parsing inputs and the mechanics of memory. A good many security breaches occur due to uncertain state, unsafely parsed inputs or memory overflow errors. The IT security Stack-Exchange might be a good place to poke around as well. That said, reading the book for the course is a good option as well as Richard points out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.