As part of our development process, we try to make sure we’re checking for any vulnerabilities in the code we’re creating. There’s a few ways you can do this. In a Waterfall approach, this is something you’d do right at the end. I suppose some folks really enjoy a big dramatic reveal at the end. Our approach is to try to incorporate vulnerability scanning into the initial and ongoing development process.
But we also run into situations where, as part of an audit, a scan of the entire site is done. Typically as part of a Penetration test. These are both valid approaches, but it’s useful to understand the differences.
If your application deals with sensitive information, and may be in scope for a security audit or certification such as SOC2, ISO27001 or PCI, some kind of regular scanning will probably form part of the requirements.
It’s also worth remembering that an automated scan isn’t some kind of silver bullet that guarantees security. It’s just one layer. You still need mature development processes, good DevOps, and infrastructure security testing. There is also a wide range of scanning tools available, so it’s important to critically evaluate the results and suitability to your application.
The first approach looks at the code itself, and spots patterns or weaknesses in each of the areas it finds. Think of this as testing from the inside out.
The second is testing from the outside in. The tool starts at the base of the site and then tries a series of tests on each of the “pages” or end points it finds.
We use a set of scanning tools as part of our automated process, one of which is Brakeman This is set up as part of our Continuous Integration (or CI if you’re into your acronyms) process. This means that every time a developer makes an update to the code base, the new code as well as what’s already there is scanned for vulnerabilities or possible security issues with the application.
How does it know what makes a vulnerability? There are several open source lists, which log different vulnerabilities as they get found across the millions of different software libraries and frameworks. As a bug is found, it’s added there, and then the bug is patched. But that means a vulnerability might exist in v8.0.1 of that JavaScript library, but not in v8.0.2. A typical app might use hundreds or sometimes thousands of different libraries and dependencies, each of which will have many different versions.
This kind of tool runs externally from your app. Some tools are cloud based, where they run off a server that is included in the tool. Others are software you download and install, either on your own computer or a separate server.
This kind of vulnerability scanner can be configured to target a particular tech stack (eg: Wordpress site or Ruby on Rails app), and some will work that out. They start with some base pages or end points, and then spider out to discover other pages that might exist. Once it recognises something (eg: a form with a username & password), it then performs a series of tests. These range from simple things like can I attempt to login multiple times, through to adding in extra code to manipulate a database via SQL injection like little Bobby Tables
Examples of software that do this include Acunetix (Acunetix web application security) or Nikto (Nikto open source scanner).
A word to the wise- tools like Acunetix produce absolutely epic result documents. So if that kind of thing makes you feel warm and fuzzy, go for it. If it makes you feel irritated and sad because you only wanted a simple result, then forewarned is forearmed. Or four legged or whatever.
Vulnerability scanning is a way to automatically detect and categorise problems with a web app or site. If your app deals with sensitive information, and you're looking at certifications or an audit, having a regular scanning process is probably something you'll need.
Ben Still
-
06 Oct 2022
Let's build something awesome together
Hire us