faq
General Auditing Questions
Security auditing is a unique skill that’s distinct from software engineering — although most auditors have an engineering background. However, a good security auditor looks at a system like a potential attacker would, checking every part thoroughly and from the perspective of an adversary. They’re not just thinking like the engineers who built the system, but also looking for ways it might be broken into or compromised. Because they work on a large number of projects and across a variety of technologies, they’re better equipped at finding security problems than the teams who build the systems. Unlike engineering teams who have to focus on many things at once (e.g. system performance, features, user experience, etc.), auditors focus primarily on security.Moreover, it’s imperative to hire an independent team to do security audits. They can check the system without any bias, identify potential security vulnerabilities, and provide a trustworthy report on the system’s security.
A security vulnerability is an error in the design or implementation of a system that could permit a bad actor to cause harm to, or manipulate, the system, such that it undermines the system and its users. Some examples of security vulnerabilities include:
- Incorrect or insufficiently secure use of cryptography.
- Leakage of user-identifying, sensitive, or secret data.
- Unprotected attack surfaces, lack of safeguards or protective measures.
- Implementation errors.
- Lack of adherence to best practice.
- Incorrect use of dependency libraries or the use of vulnerable dependency libraries.
- Inconsistencies between the system design documentation and the coded implementation.
Most security audits should be conducted in two phases.First, a system’s security should be checked in the planning phase, when the system is still being designed. Incorporating a security perspective in a system’s design can help prevent security issues down the line, which are often more costly and time consuming to resolve once the implementation has been completed. Again, this makes sense when looking at a building analogy. It’s better to build strong foundation from the start, then have to reconstruct at a later date.Second, once the system or its important components are built, another audit should be conducted of the implementation. For planning purposes, the team developing the system should seek to audit parts of the code where an exploit could be particularly damaging (i.e. security-critical components) as soon as they are built and before the system has been released to the public. This reduces the likelihood of security issues appearing between the time an audit takes place and when the system goes live.
The security auditing space is small, comprising of a small number of expert teams. In order to get a security audit, it’s important to identify a reputable team with a demonstrated track record that has the expertise to audit a particular project language and technology.In addition to subject matter expertise, budget and timeline are key considerations: the audit should be within the team’s allocated security budget and the auditing team needs to be available to carry out the audit at the desired time.For optimal experience, it’s good practice to reach out to security auditing teams well in advance of a planned audit to book a time that lines up with a teams development and launch roadmap. Auditing companies may have significant lead times due to high demand compared to the limited supply of top tier security auditors. By contacting those auditing teams early, projects can define a scope within budget and schedule an audit that makes sense for the project and its milestones.
Defense Auditing Questions
For client confidentially reasons, we only publish audits with the prior consent of our clients. You can read these on the ‘Audits’ tab. Even if you don't find a project similar to yours listed, we may still be able to assist you.
At Defense, our first priority is to help projects improve their security and to uphold rigorous security standards for decentralized technologies across the crypto and web3 space. We encourage all teams to conduct due diligence and compare auditing companies, in addition to diversifying their auditors, including auditing companies, individual white hats, and contest platforms. The auditors you choose should have expertise and a demonstrable track record reviewing the technology and language components you want reviewed, in addition to being compatible in terms of pricing and availability.Defense consists of a dedicated team of expert security auditors and business specialists who have carried out hundreds of security audits for decentralized systems across a number of technologies including smart contracts, wallets + browser extensions, bridges, node implementations, cryptographic protocols, dApps, and more. We have experience auditing projects in a number of languages including Solidity, Typescript/JavaScript, Rust, Go, Clarity, C/C++, CosmWasm, and more.We serve multiple ecosystems including Bitcoin, Ethereum + EVMs, Stacks, Cosmos / Cosmos SDK, NEAR, and more.To learn more about our expertise, read our blogpost, meet our team, or schedule a call.
Auditing Process Documentation
In the world of security audits, careful preparation is not just a preliminary step — it’s a strategic imperative that pays dividends throughout the audit process and beyond.Beyond meeting the immediate objectives of the audit, careful preparation sets the stage for the continuous implementation of development best practices, efficiency, and security.A proactive approach to audit readiness empowers both security audit teams and the development teams soliciting their services. In particular, effective preparation streamlines the efforts of security audit teams, while reinforcing and requiring best practices from development teams.By focusing on the following key aspects of audit preparedness, projects can optimize their time and resources, ensuring maximum return on their investment in a security audit.1. Develop and Maintain Up-to-Date Project Documentation
- Code Comments: Thorough code documentation, encompassing every function and entry point, provides auditors with necessary insight and a roadmap for understanding the intended functionality of each component.
- Design Specification: Detailed information about the system’s design and requirements helps auditors verify correct code implementation, adherence to specifications, and prevents assumptions that may lead to overlooked security vulnerabilities.
- Developer Documentation: A comprehensive overview of the system, including architectural diagrams and developer onboarding guides, aids auditing teams in assessing in-scope components and understanding the system’s expected behavior.
- User Documentation: Comprehensive user documentation ensures secure and intended user interactions, guiding auditors through the system.
- A URL of the repository containing the source code
- The release branch and commit hash to be reviewed
- An explicit list of files in scope and out of scope for the security audit
- Robust and comprehensive documentation describing the intended functionality of the system
In every audit we conduct, we follow the Defense security audit approach. This process has been carefully designed to enhance the security and robustness of the target project, while fostering clear communication and collaboration between Defense and the customer throughout the security audit lifecycle.While each audit is as unique as the project being audited, the steps laid out below are integral to the Defense approach.Pre-Audit Preparations and Readiness ValidationCustomer preparedness optimizes a security audit by helping the audit team to onboard efficiently and effectively. To ensure adequate audit preparation, Defense will collaborate closely with each customer to ensure and verify the target project is in a state of readiness to undergo a security audit. This includes a thorough assessment of the following:
- Code: the codebase being audited is in a state of completion, implemented in accordance with best practice for the specific programming language.
- Documentation: the code comments are comprehensive and up-to-date and that project documentation (e.g. architectural diagram, design documentation or specifications, developer documentation, and user documentation) is sufficient.
- Tests: the test coverage is comprehensive, with unit and integration tests to help catch bugs and implementation errors.
- Setting up a project kick-off call that includes the customer and the audit team.
- Setting up dedicated repositories for the duration of the audit.
- Establishing a dedicated communication channel with the customer.
Defense provides rigorous and thorough system security audits that are coherent and consistent in their approach, while offering our security auditors the flexibility required to meet the needs of each individual audit.The core of our approach is identifying security vulnerabilities through exhaustive manual code review, during which we read every line of code in the security audit scope.Our approach to each audit is specifically tailored to the specifications and characteristics of the system in scope, in addition to the needs of the customer. Every audit, however, includes the following objectives: all of which are essential to maximizing the effectiveness of the security audit for the benefit of the customer, the users, and the community:Attack Tree Threat Modeling: We create an attack tree to determine an appropriate threat and trust model for the system or component being audited. This helps us to define system inputs and outputs and to better define and clarify the scope and areas of concern for the security audit. What we learn from creating an attack tree helps us to determine a roadmap with specific milestones for the audit.Security by Design: We conduct a thorough design review to confirm adherence to decentralized system design best practices, and the absence of common design issues that could result in security vulnerabilities.Secure Implementation: We conduct an in-depth examination and manual review of the project’s source code to assess compliance with best practices and adherence to design specifications, as well as to identify security vulnerabilities and code quality issues.Use of Dependencies: We review third-party libraries, dependencies, and APIs used in the project to identify potential vulnerabilities introduced by external code. We check adherence to security best practice for deployment and CI-CD (continuous integration and continuous delivery) where appropriate.Tests: Secure implementation relies upon the appropriate use of tests such as unit and integration tests, fuzzing, property-based tests, and formal verification. We evaluate the use of tests utilizing both manual and automated testing tools, as needed, to identify common and edge case vulnerabilities.Project Documentation: We carefully review project documentation, including design, architecture, and code comments, to understand the intended functionality and potential vulnerabilities. We assess code comments and project documentation correctness and adherence to best practice.
Duration & Payment Information
Yes, we accept the following currencies: Fiat, tBTC, USDC, and Ethereum.
The cost is determined by the number of person-weeks required to complete each audit. This effort is scoped based on the size and complexity of the codebase, and is priced according to our current stand person-week rate (adjusted to market condidtions).
They can vary significantly depending on the market. To minimize lead times, we recommend you get in touch with us weeks or ideally several months before your ideal audit start date. After an initial call with you, we are able to turn around SOWs within 3-5 business days.
Usually anywhere from 2-12 person-weeks (1-6 calendar weeks).
Questions About Detected Vulnerabilities
The Verification of fixes following delivery of the audit report must be completed within 30 days of delivery of the audit report, unless an alternative schedule is communicated by the Customer within the 30 day period.
We carry out a single round of verification.
Our standard process is to identify vulnerabilities and provide you (the client) with recommendations on remediating and mitigating those issues. If it is included in the scope of work, we will carry out a fix verification after you have addressed those issues.See also our policy on Responsible Disclosure.
No. While we strive to provide thorough and accurate analysis, we must emphasise that our reports do not - and cannot - constitute a guarantee of the project's security. If you come across a firm that claims to offer definitive security guarantees or certifications, be cautious - no company can give you a 100% security guarantee.
Public-Facing Information
Responsible disclosure is a security vulnerability disclosure model where the details of a vulnerability are disclosed to the public only after the entity responsible for the system has been given a sufficient amount of time to patch or remedy the issue. This model aims to balance the public's need to be informed of security vulnerabilities with the need to prevent adversaries from exploiting those vulnerabilities before they can be fixed.At Defense, we support the use of responsible disclosure as a last resort. We stress that we will only resort to responsible disclosure after giving the customer ample time and guidance to resolve these issues before going public. Before proceeding with a responsible disclosure, we will inform the client of our intention to do so, giving them sufficient opportunity to rectify the issues or to inform users about potential risks themselves.This policy is part of Defense's broader commitment to enhancing security transparency within the crypto and web3 sectors. We are dedicated to assisting teams in developing secure, innovative systems that not only build broad user trust but also promote the widespread adoption of decentralized technologies.You can read more about our reasons for and commitment to Responsible Disclosure in our Medium post.
We will only publish reports with approval from the client. You can find all our published audits on our ‘Audits’ page.
Contact
Collaborate With Us & Learn More
Get a Quote
Get a Quote