I have finished reading a nice article from Dark Reading about secure development or, said otherwise, taking security into account when developing software.
Two major problems are brought forward:
your average developer doesn’t have the right mindset for understanding security which doesn’t play well with his artistic skills.
security awareness and training programs are a failure. Besides the budget constraints, developers would never chose security over meeting their deadlines.
I can see the logic behind the (partial?) failure of security awareness and training programs. Think about Time to Market, competitiveness, frequent evolution of technologies and needs and you’ll get the idea. In this context, adding a security brick to an already unsteady building which is way behind the defined deadlines is unrealistic. According to Caleb Sima, CEO of Armorize, a secure development software vendor:
“If I’m a developer, as soon as I’ve been assigned a project, I’m already behind. If there’s a faster way to do something, they’re going to take it, because for them speed is more important than security.”
So what options do we have?
According to Fortify, another secure development software vendor, many development companies add a security specialist to their development team. This person is in charge of bridging the gaps between the security and development teams but also helps identifying and correcting the vulnerabilities.
This approach has however some serious limitations as the security specialist might not identify all vulnerabilities given the diversity of projects and programming languages. But more importantly, she might become a bottleneck in the team as everyone is waiting for her feedback before moving forward and/or rushing to her with urgent requests given the deadlines.
To solve this problem, some organizations opt for secure development frameworks such as BSIMM but these are pretty heavy to implement and they require a formalized development process.
According to many of the interviewed experts, one solution consists of using vulnerability identification tools that nicely integrate with the IDEs and automatically identify vulnerabilities as code is written. While the experts here are heavily biased given that they work for companies that provide such tools, I think the point is valid nonetheless.
Given the time and budget constraints that most (if not all) software development projects have to take into account, such tools might really help a lot as they act as your off-the-shelf debugger or code quality checker and integrate nicely into the existing toolchain, specially if their output is not some security mumbo jumbo.
This approach is indeed limited to code validation/checking. Some important phases of the development process such as use cases or design are not covered but if you think that you can easily take security into account during those stages, be my guest.
This is a step in the right direction and a pragmatic one that take into account developer needs and constraints instead of the other way around.
Since the release of Nessus 4.2, a new report file format -dubbed v2 or .nessus v2- has been pushed forward. Quoting Tenable Network Security:
‘An updated .nessus file format (.nessus v2) is now available, which allows for easier parsing of report data Descriptions can now be split into different labels such as CVSS base scores, risk factors and more. A “HostProperties” section contains information about each host which can be extracted easily (MAC addresses, operating system, etc.)’
While maintaining the XML encoding of the old .nessus v1 format, the new .nessus v2 format is, as Tenable Network Security wrote, easier to parse. But enough talking and let’s delve a bit into this new format, shall we?
What Does It Look Like?
A picture is worth a thousand words, right? ;-)

If you were accustomed to the .nessus v1 format, one of the first things you would notice is that the root node is now NessusClientData_v2 instead of NessusClientData. Moreover, each scanned host (ReportHost node) has now a nice HostProperties subnode.
HostProperties provide a set of subnodes all named tag but which have different attributes. The following tag nodes are always present:
tag name="HOST_END": time at which the scan has finishedtag name="HOST_START": time at which the scan has started
The following tag nodes are not always present as they depend on whether or not Nessus is able to discover some extra information about the host:
tag name="operating-system"tag name="mac-address"tag name="host-ip"tag name="host-fqdn"tag name="netbios-name"
Vulnerabilities, Defined
Often, I use Nessus to detect remotely-exploitable vulnerabilities only (as I consider that once an attacker has a foothold on a system, it’s game over for the defender no matter what privileges the attacker had at the beginning). In this particular case, the ReportItem node has 7 attributes:
port: TCP/IP port on which the vulnerability was detectedsvc_name: service nameprotocol: do I really need to explain this one?severity: a value ranging from 1 (low) to 3 (high) evaluating how critical the vulnerability ispluginID: Nessus plugin identifierpluginName: human-readable name of the pluginpluginFamily: family to which the plugin belongs to.
Here is an example:
ReportItem port="80" svc_name="http?" protocol="tcp"
severity="3" pluginID="33849" pluginName="PHP < 4.4.9 Multiple Vulnerabilities"
pluginFamily="CGI abuses"
Each ReportItem node has several children, some of them not always present:
synopsis: a brief description of the vulnerabilitydescription: a more thorough description of the vulnerabilitysolution: vulnerability remediationrisk_factor: human-readable form of theseverityattribute (Low, High…)cvss_vector: CVSS v2 vectorcvss_base_score: CVSS v2 base scoresee_also: contains a URL for further reference. There might be zero or more of such elementsplugin_output: if present, this element provides the output of the pluginplugin_version: plugin revision information. This can be useful when you need to check whether you have the latest version or notbid: provides the Bugtraq ID. There might be zero or more of such elementscve: provides CVE data. There might be zero or more of such elementsxfref: provides pointers to other vulnerability databases such as OSVDBplugin_publication_date: well, I guess you can see what it may contain. Not always presentvuln_publication_date: same here ;-) and not always present too.
Important Note
As Renaud Deraison pointed out, the list of subnodes under ReportItem is meant to be “open”. Tenable Network Security can and will add new fields to it from time to time. So if you are writing a .nessus v2 format parser, it must ignore unhandled nodes instead of raising errors.
Well…
… I think this is pretty much what you need to know about the Nessus v2 report file format. If you spot any mistake or any missing important piece of information, please let me know by commenting on this blog entry.
Until, then I wish you some happy parsing and fiddling with XPath ;-)
—> Edited on 2010/03/02 to Add: Note about the list of ReportItem subnodes being “open” + remove XML tag “<” and “>” in the ReportItem example and the tag subnodes because they are not displayed correctly by Google Reader.
It’s been a few days that I decided to host my blog on Tumblr. The feature set, UI and companion applications offered by this popular blogging platform suits my needs and give me a lot of flexibility with regard to my posting patterns.
One of the features it offers is the possibility to publish posts by sending emails to a private email address. This is particularly nice if you are on the road with no or intermittent Internet access for example. You can just write the email and “send” it. It will be then queued for delivery by your mail client. Moreover, email posting is very flexible as you can use Markdown to nicely format your post.
However this flexibility comes at a cost in terms of security. Earlier today, Sascha and I tested the security of this service. I gave him my private email address -something an “attacker” might obtain while shoulder surfing for example- and he successfully posted to my blog using his own email address and without faking the email headers of my regular mail client. And as my blog is configured to automatically push posts to Twitter and FaceBook, his fake post appeared there as well.

Tumblr doesn’t notify when someone posts from an email address that was never used before and there is no access list functionality that allows you to whitelist the email addresses authorized to post to your blog. Last but not least, I haven’t found a way to turn off email posting altogether.
Sascha has a very nice write-up about this. Highly recommended read!
Conclusion: Protect your Tumblr private email address dearly.
Full description and usage, by Bernardo Damele A. G. the tool author. Thanks to Richard Bejtlich for the link.
— Schneier, Bruce. Virus and Protocol Scares Happen Every Day — But Don’t Let Them Worry You, The Guardian. Wed December 9, 2009.
This tool is a netcat/ncat-like utility that allows you to create tunnels over DNS and it leverages DNS recursiveness to do so… likely to bypass firewalls
With the release of Nessus 4.2, the nessus command-line client has been deprecated. Even if it still distributed with the new release, there is no new functionality introduced to it. Moreover, it is only able to generate Nessus v1 format reports and not the new Nessus v2 reports that are far easier to parse and better organized.
Automating scans with Nessus 4.2 can be performed by leveraging the new XMLRPC interface. All you need is something to generate HTTP POST requests with the right parameters and something to parse the XML responses you get back.
As of this writing, official Nessus documentation to do so is not available yet. However, a few mail exchanges with Renaud Deraison, Chief Research Officer at Tenable Security Inc. got me started and he provided very useful tips that I’d like to share with you in case you need to automate scans as I do.
To issue requests, you need to submit a login token (which you can think of as a cookie) to the Nessus scanner to prove your identity. So the first you need to do is to login to the scanner and retrieve a login token.
But first let me define a base URL that I am going to use throughout in this post: https://my.nessus.scanner:8834. Replace my.nessus.scanner with the FQDN of your Nesssus scanner, its IP address or even localhost if you are interacting with it on the same box that it is installed on.
Nessus uses a self-signed certificate so you’d need to make provisions in your programs/scripts for this. Also, please note that we are using the same TCP port that you’d use with a traditional browser.
Login to the scanner
- URL: https://my.nessus.scanner:8834/login
- POST parameters: login (Nessus username), password
- Example:
wget --no-check-certificate --post-data 'login=username&password=password' https://my.nessus.scanner:8834/login -O -
When you issue a login request, Nessus will reply with a login token. You can think of this token as a cookie. This is all you need to authenticate to Nessus from now on. A login token looks like: 81d64733f78b6a6d34217bfedff12b3244ec20d015d26a0a
Launch a new scan
- URL: https://my.nessus.scanner:8834/scan/new/
- POST parameters: token, policy_id, target, scan_name
- Example:
wget --no-check-certificate --post-data 'token=81d64733f78b6a6d34217bfedff12b3244ec20d015d26a0a&policy_id=1&target=10.1.2.3,192.168.5.4,172.16.0.0/16,www.host.com,192.168.10.11-192.168.10.45&scan_name=this_is_my_first_test_scan' https://my.nessus.scanner:8834/scan/new/ -O -
The policy_id parameter is the scan policy identifier. Obviously, you will need to use your browser to create a scan policy first so that you can have this ID. The scan_name is a human-friendly name for your scan. This is the same thing when you launch a scan using the Web UI. Please note that Nessus uses a unique scan identifier (uuid) that looks like this: 60c6eaa3-5063-0a70-bf33-c00b71d4cfaf97af24f344d0bfa1
To download or delete a scan report, you will need this uuid.
List current scans/reports
- URL: https://my.nessus.scanner:8834/report/list
- POST parameters: token
- Example:
wget --post-data 'token=81d64733f78b6a6d34217bfedff12b3244ec20d015d26a0a' --no-check-certificate https://lmy.nessus.scanner:8834/report/list -O -
If a scan is completed (i.e. a scan report is ready), its status subnode in the XML response you receive back (each scan/report has a corresponding report node) is shown as completed.
Download a report
- URL: https://my.nessus.scanner:8834/file/report/download
- POST parameters: token, report
- Example:
wget --post-data 'token=81d64733f78b6a6d34217bfedff12b3244ec20d015d26a0a&report=60c6eaa3-5063-0a70-bf33-c00b71d4cfaf97af24f344d0bfa1' --no-check-certificate https://my.nessus.scanner:8834/file/report/download -O -
The report parameter is the report UUID.
Delete a report
- URL: https://my.nessus.scanner:8834/report/delete
- POST parameters: token, report
- Example:
wget --post-data 'token=81d64733f78b6a6d34217bfedff12b3244ec20d015d26a0a&report=60c6eaa3-5063-0a70-bf33-c00b71d
This should be enough to get you started. In upcoming posts, I will give more detailed examples and some code snippets that might prove useful.
Big thanks to Renaud for providing some precious help!
EDITED TO ADD (2010.03.31): Apparently, you need to use a non administrator account to be able to interact with Nessus 4.2 the way I describe it as Chris Counselman pointed out in the comments below. Thanks Chris!
In the era of the compressed and ephemeral thoughts, Twitter let us share 140 char long messages and that’s pretty small (and can’t really qualify as a fully-developed thought IMHO).
Given this constraint, people often use URL shorteners such as Bit.ly or Tinyurl.com to makes hyperlinks as short as possible, saving some room for a few words here and there in their tweets.
I don’t question the usefulness of these services in this usage context. However, they introduce a non-desirable property from a security standpoint: opacity. A shortened link is an opaque link. We don’t know where it links to before clicking on it.
security-savvy users often hover their mouse pointers over an hyperlink to see where it leads before deciding whether they should click on it or not. There are even security awareness courses and security best practices that recommend doing so. But this no longer work with shortened links.
There are URL shorteners such as Tinyurl.com and Budurl.com that provide some help to remove the opacity of the links they produce by offering a preview link.
For example, If I were to create a shortened link for my blog on Tinyurl.com:

If I shared this link as (http://preview.tinyurl.com/yd38uvv), you’d see:

But what can one do when they receive a Bit.ly shortened link given that -to my knowledge- there is no easy way to preview where it leads?
FireFox users can install the Bit.ly Preview extension that offers a workaround. It lets you hover a bit.ly link (and even tinyurl.com ones) and see where they lead to:

This extension also works on Google Chrome. But as you can see, it shows only part of the hyperlink if it doesn’t fit in the fixed size and non-configurable IFRAME loaded from Bit.ly. If you want to know more, you have to click on that More Information link. Moreover, it is necessary to have a Bit.ly user account since this extension use a unique API key associated with your account to query Bit.ly.
While offering a workaround, this extension also rises a few questions pertaining to privacy: Is it desirable to let Bit.ly know about the Tinyurl.com link you’ve just hovered your mouse pointer over? What about other links?
Even if I silence my security-conscious mind, I still see no global solution to this tricky problem. The above-mentioned extension only works on FireFox and Google Chrome. Opera, Safari and Internet Explorer are left out. Also, what about the sheer amount of other URL shortening services such as (http://is.gd/) (which lets you preview a shortened link by adding a # to it), (http://ow.ly/) (often used on Twitter, no easy way to preview so far) etc.?
Am I missing something?
-
Foto #100 y nueva vista! (Tomada con instagram)
-
Espidio, Rodolfo y Luis. Trinidad, julio de 2009.
Esta foto forma parte del proyecto “En las puertas de Cuba”.
Cette photo fait partie du...
-
NYC, marzo de 2010.
-
El beso.
Cuenca, julio de 2010.
-
No window.
NYC, marzo de 2010.