InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. Subscribe to our weekly newsletter for the coolest infosec updates: https://weekly.infosecwriteups.com/

Follow publication

Effective Vulnerability Report Writing — Quick Triages to Bonus $$$ (Always a Win)

Harsh Bothra
InfoSec Write-ups
Published in
8 min readMay 2, 2020

--

Bug Bounty or Vulnerability research always has two sides. One is to discover & exploit security vulnerabilities and another important side is “Reporting”. From my own experience of writing reports and looking at the reports of others, I have observed that “writing an effective report leads to quick triage, good impression and many times some additional $$$”.

Hey Fellow Hackers, For today, I will be writing about “How to write an effective vulnerability report”.

In a Nutshell, We will discuss:

  • Importance of writing effective reports
  • Common Mistakes people often do
  • Report Writing 101
  • Understanding the Security Vulnerability
  • Determining the Impact
  • Proper Referencing & Calculating CVSS Scores
  • Steps to Reproduce & Proof-of-Concepts
  • Remediation — It’s Important
  • Report Template
  • A Sample Report
  • Takeaways

Report writing is a crucial process and it defines how your bug is understood by the triager and customer. The more clear, effective, and precise you will write without trying to bluff, it would be easier for both parties to quickly process.

As a Security Guy, your responsibility just doesn’t end when you find a valid looking vulnerability. Once you know the vulnerability, you have to define the impact as per the business and their risk. Since the security team is going to triage but the developer’s team is going to fix, if you can provide them with a valid solution that they can apply quickly to patch the issue, you make a good impression and might earn some extra $$$.

My Thoughts: If I find a bug and that is not fixed for a couple of years, there is no use for putting that bug to the company’s attention except you make some earning but the sole purpose “Data & Security” is still same.

Some Common Mistakes

(P.S.: No offense)

  1. Using unprofessional language: I often see a few people who write reports very unprofessionally which looks really bad. For example:
    > Hey I found an XSS on XYZ Parameter with this payload. If you won’t fix it it would do ABC and that’s it! (Just an example)
  2. Using Abusive Content in Payloads: Often the beginner to sound cool, fire payloads including abusive content (like F*** Security). Now, assume there is a stored XSS in the community forum and you are firing an abusive payload. It is going to affect the company’s reputation. You are there to secure their application in a win-win situation.
  3. Bluffing in Report to Increase Severity: Do not try to unnecessarily increase the impact of a report if you can not escalate. Assuming a theoretical scenario to bluff won’t help. Ex: explaining theoretical scenarios of exploitation of self XSS. Did you even try?
  4. Poor Formatting & Insufficient Proofs: Formatting is Important. Highlighting proper sections and areas. Using proper alignments and code-blocks, all are necessary to make your report impactful. Most people do not pay attention to formatting. We find bugs, We write a paragraph copied and pasted and Reported.
  5. Following up again & again (Being Impatient): Every platform and program have their First Reply Policy. For example: If a Bugcrowd Triage is not replying after 7 days of First Reply Policy, you can ask Support to create a blocker and have things processed. Do not be impatient and jump every next day asking for updates. It’s not just your report on the platform. :)

Rule: Never Bluff in your report. Remember, the triager and customer’s representative both are having Security Background & More Experience.

What could go wrong: A lot. Bluffing may lead to negative reputation, temporary or permanent blockage from program & ultimately your impression goes down.

Report Writing 101

Do you know that many programs pay for “Duplicates” or a “Bonus” if your “Report is Interesting & Good”? It’s really time to focus on writing an amazing report if you are not doing it already and you will surely thank me later for this.

Note: I am not just going to write the XYZ Template in this blog. Rather, I will be taking you through each component and how can you write a good looking report.

101 Rules:

  1. Make sure to use Professional Language.
  2. Include all relevant details but do not make it heavy.
  3. Define Impact Clearly.
  4. Steps to Reproduce should be very Precise. (I repeat Precise)
  5. If you think the attack vector is complex, include a Video Proof-of-Concept.
  6. Remember, most of the companies prefer a textual report with detailed steps and screenshots. They use it for compliance purposes. Keep this in mind.
  7. Remediations are important.

We will look at each of these in detail in the upcoming section to avoid repetition.

Understanding the Security Vulnerability

Security Vulnerabilities can be anything from a simple business logic abuse to complicated Remote Code Execution. It is crucial for you to identify what exact issue you have found. Most of the time it is pretty straight forward like “Stored Cross-Site Scripting”. However, the point here is:

Is it a “Self Stored Cross-Site Scripting”? or you can make any user a victim of this Stored Cross-Site Scripting (Good One)? Before reporting anything you should be clear, what exactly the bug is so you can answer the queries of triager and customer.

From this, you can easily derive your first section of the report “Description”

I usually write Description like following

Description

The application at “https://target.com” provides functionality to create “Content” which is available to “Public View”. During the penetration test, it was observed that the application does not sanitize user-supplied input which allows an attacker to inject malicious javascript code leading into a “Stored Cross-Site Scripting” attack. An attacker would be able to perform malicious actions such as stealing user session cookies or redirecting the user to the attacker-controlled pages.

Does it make sense? How many of you write like that? Would you prefer using this kind of description for your reports? (Share in comments)

Determining the Impact

This is the most crucial and important. you have to make sure you define impact appropriately. I always look for three factors when I determine the impact which is:

  1. Confidentiality: Is user sensitive data is available/read to an unauthorized person.
  2. Integrity: Is it possible to create/delete/update data by an unauthorized person.
  3. Availability: Is it possible for an unauthorized person to cause a denial of service or lockout or availability issues for legitimate users?

Once you know all three factors, it is really super easy to determine the exact impact.

Rule: They should be application-specific. Do not write a generic impact. Every attack vector has a different impact on a different application.

An XSS might be medium for one application but might be critical for another application depending upon the C.I.A. Impact.

CVSS Score & Referencing

CVSS (Common Vulnerability Scoring System) Score helps organizations define the criticality of an issue on a scale of 0 to 10 —None to Critical.

You can read a high-level overview here.

In CVSS 3.0, there are few components which are used to calculate CVSS Score, I’ll explain each of them in short so you can easily calculate the CVSS Score. There are two metrics:

  1. Exploitability Metrics: Determines the overall exploitability score based on several factors.
  2. Impact Metrics: Determines the overall impact score based on several factors.

Exploitability Metrics

  1. Attack Vector — Network/Adjacent Network/Local/Physical
    How an attacker is going to attack. For example, if it’s a web application you are accessing remotely, your attack vector is Network.
  2. Attack Complexity — Low/High
    How complex it is to reproduce and perform the same attack.
  3. Privileges Required — None/Low/High
    What level of privileges are required to perform the attack? If it is an unauthenticated attack, there would be None in Privileges Required.
  4. User Interaction — None/Required
    Do you require user interaction to perform the attack? For example: Self XSS requires user interaction.
  5. Scope — Unchanged/Changed
    Is there any change in scope? For example: moving from a Target A to Target B after/during the exploit?

Impact Metrics

  1. Confidentiality Impact — None/Low/High
  2. Integrity Impact — None/Low/High
  3. Availability Impact — None/Low/High

We have already discussed these in the above Impact Section.

Based on these scores an overall CVSS Score is calculated. You can use the following CVSS Calculator.

Steps to Reproduce & Proof of Concepts

Rule: Write Clear & Precise steps to Reproduce with relevant screenshots attached with each step wherever required.

Rule: Provide clear navigation and as many detailed steps as you can.

  • If the attack vector is complicated, attach a video proof-of-concept.

An example of steps to reproduce I use looks like:

Steps to Reproduce

  1. Navigate to “https://target.com” and login as a valid user.
  2. Now, navigate to “Content” > “Create New Content”
  3. In “Content Name” provide the following XSS Payload: <XSS Payload>
  4. Fill all other required details and “Save”
  5. Observe that XSS Payload from step-3 is executed.
    <Screenshot Here>
  6. Now log in as another valid user and browse the content created in step-4.
  7. Observe the XSS payload is getting executed.
    <Screenshot Here>

Remediation

Remediations are important. Do not just include the generic remediation. Try to see what all remediations are already provided by the application and how they can fix the issue so that it never happens.

For example: if you have found an XSS by bypassing their black-list based filtering, do not just suggest something like “Perform Input Filtering”, rather say “Implement White-list based approach and make sure all input is sanitized accordingly.”

  • If you have found a CVE based Exploit, provide the link to official patch advisory.
  • If there is code-level remediation, try to provide a reference for specific developer documentation.

Report Template — Sample Report

Vulnerability Report — Stored Cross-Site Scripting

Issue Description

The application at “https://target.com” provides functionality to create “Content” which is available to “Public View”. During the penetration test, it was observed that the application does not sanitize user-supplied input which allows an attacker to inject malicious javascript code leading into a “Stored Cross-Site Scripting” attack. An attacker would be able to perform malicious actions such as stealing user session cookies or redirecting the user to the attacker-controlled pages.

Affected Area

Impact

  • Confidentiality: <As Applicable>
  • Integrity: <As Applicable>
  • Availability: <As Applicable>

CVSS Score — <CVSS Score here>

Steps to Reproduce

  1. Navigate to “https://target.com” and login as a valid user.
  2. Now, navigate to “Content” > “Create New Content”
  3. In “Content Name” provide the following XSS Payload: <XSS Payload>
  4. Fill all other required details and “Save”
  5. Observe that XSS Payload from step-3 is executed.
    <Screenshot Here>
  6. Now log in as another valid user and browse the content created in step-4.
  7. Observe the XSS payload is getting executed.
    <Screenshot Here>

Remediation

<Provide Suitable Remediation & Referencing here>

Some of the appreciation and wins for writing good reports:

Takeaways

  • What to avoid while writing a report
  • Using C.I.A. to determine the exact impact
  • Using CVSS to determine the impact
  • To-Do’s while writing a Report
  • Writing a good looking report
  • Getting quick triage, appreciation & extra $$$ for good reports.

Follow me on Twitter and share your reviews here. Share with your fellow hackers who might find it helpful.

Twitter — https://www.twitter.com/harshbothra_

LinkedIn — https://www.linkedin.com/in/harshbothra

Web — https://harshbothra.tech

--

--

Published in InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. Subscribe to our weekly newsletter for the coolest infosec updates: https://weekly.infosecwriteups.com/

Written by Harsh Bothra

Security Engineer | Bugcrowd Top 150 & MVP| Synack Red Teamer | Cobalt Core Pentester | Bug Hunter | Author | Speaker | Learner | Poet | Twitter — @harshbothra_

Responses (1)

Write a response