Impact Assessment 101

When interviewing candidates, who have no previous penetration testing experience, there is often a gap in their knowledge. While they have all practised and honed their technical skills they will generally not have practised risk assessment or the impact that a vulnerability would have.

The probable reason for this is that the act of hacking a target is way sexier than trying to categorise or document the fault. There is no impetus to generate a report while you test Damn Vulnerable Web App or the myriad of other safe to play with targets. So exactly why should you?

The difference between a hacker and a consultant is that as a professional you will have to document what you do. You will definitely have to tell the customer exactly what is impacted, who can do it, and for extra points equate that directly to their business if you can.

Failing to do so will generally result in a shrug from your customer and a look in their eye that asks “why should I care?”, while they spin a coke bottle absentmindedly.

In order to work out an appropriate impact rating you are going to need to answer at least these questions:

  1. What is impacted?
  2. Who can locate or exploit the vulnerability?
  3. Are exploit tools and techniques freely available?
  4. Does an attacker need any conditions to be true to exploit the flaw?
  5. If an attacker was to exploit it is there a direct impact to the business?

Simple eh? Let’s work through one example so you can see the reasoning and logic going into an impact rating.

SQL Injection

Anyone with a clue will tell you that SQL Injection is a “high” risk vulnerability. But do you know exactly why? That is the difference I look out for.

A deeper understanding and not simply memorising the impact rating of everything will help you risk the previously unknown flaws. Or deal with the crafty bespoke ones that will never come around again in your career.

To enable me to set an impact I am going to need to spit out a bit on the location of the vulnerability as context is absolutely everything when you are creating an impact rating. Slavishly replaying the same ratings every time without reviewing the context makes a poor consultant. You are being paid to tailor your work to the actual environment and provide the right advice to them.

Overview of the target

The target web application is an e-commerce platform which sells items. It handles personal information for users including their contact details, home address, and their order history. The payment is handled by a 3rd party. The technology stack is Linux running MySQL and Apache. The location is on the product page through the “productId” parameter which is sent in the URL.

What is impacted?

  • Database for certain. With the applications configured user you can: Read, Modify, Insert and Delete data.
  • Potentially the operating system through “file read” and “file write”.
  • Potentially the operating system through command execution though more difficult in MySQL than in some alternative databases.
  • As a pro you will need to confirm these extra “potential” impacts to the operating system. For my simple scenario lets say they have configured away your ability to access or write files, and that you cannot achieve OS command execution.

Who can locate or exploit the vulnerability?

  • The product page is accessed without authentication since people sign in at the point of sale only. There is no authentication barrier to limit knowledge of the flaw, any attacker can find this.

Are exploit tools and techniques freely available?

  • SQL Injection is a well known technique.
  • Training and practical tutorials are free and easy to find.
  • Tools exist such as sqlmap which can automatically find and exploit it WITHOUT needing to know the intricacies of the exploitation.
  • Bottom line: it is very easy to exploit.

Does an attacker need any conditions to be true to exploit the flaw?

  • Short answer: no
  • Longer answer: no user interaction is required to exploit. The attacker is over the Internet so does not require physical access or access to a particular local network. Worth repeating again that it can be found and exploited without authentication.

If an attacker was to exploit it is there a direct impact to the business?

  • There is a direct impact to the business.
  • The personal data that is being stored is identifiable and so would fall under the Data Protection Act in the UK. Should someone dump all the data and then leak that then a fine is likely for the business. Depending on the scale of the breach and the target customer this might be a sufficient fine to cripple their business or close it entirely.
  • There is also a potential reputation damage risk to the business. Consumer trust can be lost and sales will go down.

There we have it all of the ingredients to consider when you think of the impact. There was a slight of hand up there where I split the answer for “what is the impact” into two different entities: the database, and the operating system. I will get back to that in a moment.

First lets explain a simple impact model to you. There is a model called “CIA” which stands for Confidentiality Integrity and Availability. Lets expand a little on these three concepts:

  • Confidentiality – Access to information which an attacker should not have. Pretty simple if an attacker can read your account details or access files from the server then they will know more than they should. The impact of a loss of confidentiality is dependent on the value of the disclosed information.
  • Integrity – Ability to modify information or execute arbitrary commands on a system would affect the integrity. If you change the contents of a web page to suit your needs you have affected the integrity. If you execute an operating system command you cannot trust the server is operating as intended anymore.
  • Availability – If an attacker can simply delete the data or the website content then you will be making it unavailable for legitimate users. If there is another means by which to prevent legitimate users acting as they would like, then you will also have removed availability.

Lets say you provide customers with impact ratings in the categories: high, medium, or low. A very simplistic approach but a fairly effective one and not uncommon in the industry. In order to get to your category of impact you will need to evaluate your vulnerability in terms of the CIA for each answer in “What is impacted?”,

As we provided two entities that are impacted (or potentially so) lets ask and answer ourselves two more questions:

What is the impact rating for the database?

Reminder: our SQL injection has allowed full: read, modify, insert and delete privileges.

Lets fill out the CIA model for the database then:

  • Confidentiality – We can read everything. All user data is at risk including login credentials potentially but definitely including personally identifiable information. There is a “high” impact to confidentiality.
  • Integrity – We can modify everything. You cannot trust the data anymore since an attacker could alter every accounts password, invent new orders etc. There is a “high” impact to integrity.
  • Availability – We can delete everything. Dropping all tables would remove everyone’s orders and their personal information. The site would be dead and nobody could access it or browse the product range. There is a “high” impact to availability.

Three “highs” under CIA? Seems to me we have a “high” impact vulnerability to me, what about you?

What is the impact rating for the operating system?

Reminder: our SQL injection cannot read or write files to the operating system, and cannot execute operating system commands.

Lets fill out the CIA model for the operating system then:

  • Confidentiality – We cannot read files. The impact to confidentiality of data held outside the database on the operating system is non-existent.
  • Integrity – We cannot modify files, and we cannot execute commands. The impact is non-existent.
  • Availability – We cannot execute commands. Even if we “drop all tables” at the database layer the OS would be functioning perfectly. Splitting hairs here because the net effect of dropping all tables is that the site would remain unavailable. But just to be clear the OS is sitting pretty and available.

Three “non-existent” impacts to the OS? Smells like a zero impact issue then.

You would provide customers with one impact rating only. The artistry in penetration testing is being able to calculate all of the potential impacts to arrive at a final snappy answer for the customer. They will often want to order vulnerabilities by the perceived “risk” or “impact” so that they can address the biggest points first.

You always lead with the biggest impact rating which in this case is to the database. You should also make mention of the OS impacts being explored in your report but proving fruitless on this occasion. However, we have arrived at “high” and that is what we go with.

There are various other models for calculating risk or impact and if you love a number from 0.0 to 10.0 then check out CVSS in particular. It is a fully fledged formulae which embeds the concept of CIA reasonably well. As with my process above you would need to calculate multiple risks based on what is being affected and then select the highest rating.

The problem is that CVSS does not always sit well with every type of potential risk you may need to capture in your report. For those fiddly bespoke ones you sometimes have to get your hands dirty and pick a “high”, “medium” or “low” out of the air.

Now that you have read this you will know exactly what to do on that day.

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.