our services

Software Assurance

Get a comprehensive understanding of your security landscape. Companies large and start-up choose us for:

Exceptional code analysis and recommendations
We find the bugs other firms miss and make holistic recommendations to help you eliminate entire classes of them.

Formal verification of code correctness
We can confirm that your code behaves only as intended.

Tool development
We’ve built the best available tools (many open-source) to dig deeper into your code than any other company.

Ongoing support
You get best-effort support and guidance even after the audit ends, and you’ll receive the tools used in our assessments (plus updates).

Every assurance project includes:

  • A list of discovered issues with detailed explanations.
  • Attack and exploit scenarios that illustrate real-world impact.
  • Clear short- and long-term recommendations for remediation.
  • Tools customized to your codebase for lasting improvements.
  • Supporting reference material.

Whether you need assurance for a complex platform or due diligence on a small codebase, contact us.

Software Assurance

Blockchain

Secure Code Review

Blockchain is a rapidly evolving field that comes with unique challenges. Given their decentralized nature and underlying value, blockchain applications exist in adversarial environments, where a single exploit can result in losses amounting to millions of dollars.

Trail of Bits was among the first security-oriented organizations transitioning from the Web 2.0 space to explore blockchain technologies. We have become experts in reviewing all facets of blockchain applications, from smart contracts to off-chain components. Our areas of expertise include:

  • Smart contracts, including
    • Ethereum (Solidity, Vyper, YUL, EVM, ...)
    • Algorand (Pyteal, Teal, ...)
    • Cairo/Starknet
    • Cosmos (Cosmos SDK, CosmWasm, ...)
    • Solana
    • Substrate/Polkadot
  • Blockchain node (L1/L2, consensus, VM, network, ...)
  • Bridges
  • Decentralized finance
  • Gaming applications
  • Offchain components (Oracle, ...)

At Trail of Bits, we do more than just understanding blockchain security; we build industry-leading tools to identify and rectify vulnerabilities. We have authored numerous cutting-edge tools, which include:

  • Slither, a static analyzer that detects common mistakes such as bugs in reentrancy, incorrect access controls, and more.
  • Echidna, a next-generation smart fuzzer that targets EVM bytecode.
  • Tealer, a static analyzer that targets Teal code (Algorand).
  • Caracal, a static analyzer that targets Starknet/Cairo contracts.
  • solc-select, a tool to quickly switch between Solidity compiler versions.

Leading protocols have trusted us to assist them in building more secure applications, including Aave, Acala, Algorand, Arbitrum, Balancer, Bitcoin SV, Chainlink, Compound, Curve, Frax, Liquity, MakerDao, Optimism, Parity, Polygon, Solana, Starknet, and Yearn (see our publications).

In addition to detecting vulnerabilities, our security reviews provide actionable recommendations on enhancing your system's security maturity, design, and code quality. We guide our clients in understanding their system's security invariants, and demonstrate how to define and test them using automated tools, such as a fuzzer. Our reports include these invariants that have been developed throughout the engagement, thus empowering our clients to integrate them into their development process.

While we have a strong focus on blockchain, our engineers leverage their extensive knowledge gained from traditional infosec exposure, combined with years of blockchain technology reviews. Our team regularly contributes to the state of the art through blog posts, industrial conferences (e.g., Devcon, EthCC, ...), and academic conferences (e.g., FC, ISSTA, ...). We have also authored secure-contracts.com, which provides guidelines and best practices for writing secure smart contracts.

We are particularly well equipped to review novel and challenging uses of blockchain technology. Whether you are an established business or a new entrant in this field, we are prepared to strengthen the security of your blockchain applications. Reach out to us to know more about how Trail of Bits can help securing your blockchain applications.

Invariant Development

Understanding and rigorously testing system invariants are essential aspects of developing robust smart contracts. Invariants are facts about the protocol that should remain true no matter what happens. Trail of Bits has crafted a dedicated Blockchain Invariant Development service, ideal for in progress codebases, emphasizing a holistic focus on invariants for long term security.

Our service includes

  • Invariant identification. We will utilize our expertise to pinpoint invariants at the function-level (e.g.,: addition is commutative), and system-level (e.g.,: the balance of a user cannot be greater than the total supply). You will receive the invariants in English and their pre-conditions (e.g.,: a parameter is within a given bound).
  • Invariant implementation. We will translate identified invariants in Solidity, choosing the optimal testing approach minimizing code disruption. We will create the relevant wrappers, and set the fuzzing initialization (contract deployments and pre-conditions).
  • Invariant testing & integration. We will test invariants locally or via dedicated cloud infrastructure, refine the specifications, identify arithmetic bounds, and narrow the precondition to reflect realistic scenarios. We will integrate the fuzzer into your CI for short-term fuzzing campaigns, and provide recommendations to run long-term campaigns.
  • Training and guidance. We will enhance your team's skills in writing invariants and incorporating fuzzing into the development process, with personalized design recommendations, tailored to optimize the codebase for fuzzing.

Clients engaged in our invariant suite secure preferential access to Trail of Bits' service portfolio, optimizing future security endeavors.

Costs and timelines for Invariant Development vary based on protocol size and complexity:

SizeSmallMediumLarge
ProjectERCs (20, 71, 4626, ...)Standalone arithmetic libAMM or lending protocol
Pricing$25k$25-50k$50-100k
Timeline1 week1-2 weeks2-4 weeks

Trail of Bits stands as a pioneer in Blockchain Invariant Development. Our seasoned engineers have been writing invariants for more than half of a decade (for examples, see the Balancer, Primitive, and Liquity reports), authored multiple fuzzers (Echidna, Medusa, test-fuzz), and delivered several educational materials on fuzzing (+150 pre-defined invariants, How to fuzz like a pro (conference workshop), 10-hour fuzzing workshop, fuzzing tutorials).

Choose Trail of Bits to transition from a reactive to a proactive stance in safeguarding your codebase, ensuring comprehensive bug prevention and seamless integration of invariant reasoning into your daily workflows

Cryptography

Modern cryptography underpins all secure communication and collaboration. Correctly implemented, cryptography maintains the confidentiality and integrity of data in even the most extreme circumstances. However, this high level of assurance is fragile due to the mathematically complex nature of cryptographic security. Not only do the underlying libraries need to be flawless, but an incorrect combination of primitives or API calls can introduce subtle and dangerous vulnerabilities. Even well known protocols like Bluetooth have been compromised by incorrect use of cryptographic primitives.

Trail of Bits has extensive experience reviewing a variety of complex cryptographic libraries and protocols. We also pride ourselves on keeping up with the latest research in cryptography and cryptanalysis. We know where to look for bugs, and we know the classes of attack to protect against. Whether you’re building a key management system or developing a protocol that achieves confidential transactions through zero-knowledge proofs, we can certify your product has the protection guarantees you need. Count on us to:

  • Review your implementation of an algorithm for mistakes that compromise its security
  • Review your custom cryptographic protocol for theoretical mistakes that comprise its security guarantees
  • Assess the use of your chosen cryptographic primitives for correctness within the context of your application
  • Examine your cryptographic software for new or familiar side-channel attacks or other cryptographic attacks
  • Write custom bug-finding tools and integrate them into your current test suite
  • Develop new cryptographic software
  • Implement or audit novel cryptography—such as post-quantum or zero-knowledge algorithms—in your existing codebase
  • Our team of engineers will work with your developers on a spectrum of tasks ranging from finding bugs in existing code to building entirely new libraries that can be integrated into your codebase. We will work closely with you to develop a scope suited to your needs.

Deliverables will be custom to your situation and may include:

  • Clear and actionable descriptions of cryptographic flaws in your software
  • Exploit scenarios that provide context for the vulnerabilities
  • A comprehensive plan for mitigating both individual bugs and entire bug classes
  • Architectural and strategic guidance
  • Testing artifacts, like custom fuzzers or static analysis scripts
  • Long-form, well-researched writing on subtle or obscure areas of cryptography

AI/ML Security and Safety Services

We are committed to ensuring the safety, security, and robustness of AI/ML systems. Our services address the novel challenges of AI/ML security and safety, and provide clients with the assurance they need in a rapidly advancing industry.

We help secure AI/ML systems by providing a number of services:

  • ML-Ops and Pipeline Audits. We offer comprehensive assessments that review entire AI/ML pipelines and components such as CI/CD workflows and hardware. This service uncovers novel vulnerabilities that can cause ML-specific system failures, degraded model performance, as well as vulnerabilities in implicit and explicit software access.
  • AI Risk Assessments. Our offerings include threat modeling and applying operational design domains and scenario analyses to identify functional safety and security risks, and reviewing existing risk frameworks associated with AI adoption.
  • Model Capabilities Evaluation. We specialize in assessing models’ offensive and defensive cyber capabilities by benchmarking their performance against experts, state-of-the-art tools, and novices using AI/ML tools. We help our customers integrate only the most effective AI tools into their internal software security processes.
  • Courses and Training. Our courses cover comprehensive security training for understanding and evaluating AI-based system risks, including AI failure modes, adversarial attacks, AI safety, data provenance, pipeline threats, and risk mitigation.

Software Hardening

Rapid development lifecycles and out-of-date tools and techniques can lead to vulnerabilities in software that leave your organization open to exploits. Testing for logic flaws, memory errors, over-provisioned access, and more is necessary to reduce your organization’s attack surface.

Trail of Bits’ Assurance team assesses your software using a multi-point evaluation framework. Testing elements include:

  • Compilation
  • Source code management
  • Static and dynamic testing
  • Fuzzing

If your software passes, we will provide recommendations for continuous testing and improvement. If we find vulnerabilities, our Engineering team can work with you to bring your codebase up to the highest security standards and train your team on techniques and tools that Trail of Bits has built for continuous security improvement and attack surface reduction.

Cloud Native Security

We help our clients identify and harden environment-critical infrastructures so they can deploy production systems with confidence. To do this, we audit cloud configurations and architectures against best security practices through manual and automated reviews of cloud services and Infrastructure as Code files such as Terraform, CloudFormation, and Azure Resource Manager files.

Threat Modeling

Organizations spend hundreds of work hours to build applications and services that will benefit customers and employees alike. Whether the application/service is externally facing or for internal use only, it is mandatory to identify and understand the scope of potential cyber risks and threats it poses to the organization.

Can the software be reached from an external source? What is the likelihood that an attacker would want access to it? If the software were exploited, what impact would that have on the organization from a business, operational, and financial point of view?

These are just a few of the questions your company needs to ask as you’re building, deploying, and updating applications and services.

But where and how do you start with an accurate threat model?

Trail of Bits has developed a comprehensive threat model that:

  • Proactively tests and identifies vulnerabilities and flaws in your software
  • Analyzes the possible effects of those vulnerabilities to your organization
  • Determines the probability of compromise
  • Calculates a risk score
  • Offers actionable remediation steps — for your internal or team to complete, or with Trail of Bits’ assistance
our services
EXPLORE ADDITIONAL SERVICES