All Projects β†’ trailofbits β†’ PrivacyRaven

trailofbits / PrivacyRaven

Licence: Apache-2.0 License
Privacy Testing for Deep Learning

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to PrivacyRaven

decentralized-ml
Full stack service enabling decentralized machine learning on private data
Stars: ✭ 50 (-54.95%)
Mutual labels:  privacy-enhancing-technologies, privacy-preserving-machine-learning
hosts
πŸ„―Curated lists of hosts files with various domain blocks.πŸ„―
Stars: ✭ 15 (-86.49%)
Mutual labels:  privacy
protect-your-privacy
Privacy resources for the layperson. Highlights resources, tools, VPNs, search engines, articles, books, and dark patterns.
Stars: ✭ 33 (-70.27%)
Mutual labels:  privacy-enhancing-technologies
fdp-tensorflow-python-examples
Simple machine learning in Python/Tensorflow with model saving
Stars: ✭ 14 (-87.39%)
Mutual labels:  model-extraction
easylist-pac-privoxy
EasyList Tracker and Adblocks to Proxy Auto Configuration (PAC) File and Privoxy Actions and Filters
Stars: ✭ 99 (-10.81%)
Mutual labels:  privacy-enhancing-technologies
autohosts
Automate hosts file updates on Linux and MacOS. Block Firefox telemetry, Google snooping and web trackers at the root.
Stars: ✭ 69 (-37.84%)
Mutual labels:  privacy-enhancing-technologies
MOTION
An efficient, user-friendly, modular, and extensible framework for mixed-protocol secure multi-party computation with two or more parties
Stars: ✭ 59 (-46.85%)
Mutual labels:  privacy-enhancing-technologies
ProtonClient
An unofficial desktop client for ProtonMail done with electron nativefier
Stars: ✭ 50 (-54.95%)
Mutual labels:  privacy
kodex
A privacy and security engineering toolkit: Discover, understand, pseudonymize, anonymize, encrypt and securely share sensitive and personal data: Privacy and security as code.
Stars: ✭ 70 (-36.94%)
Mutual labels:  privacy-enhancing-technologies
Windows-On-Reins
Wor is a Powershell script to harden, debloat, optimize, enhance privacy, avoid fingerprinting and improve performance on Windows 10 and 11.
Stars: ✭ 170 (+53.15%)
Mutual labels:  privacy-enhancing-technologies
BMW-Anonymization-API
This repository allows you to anonymize sensitive information in images/videos. The solution is fully compatible with the DL-based training/inference solutions that we already published/will publish for Object Detection and Semantic Segmentation.
Stars: ✭ 121 (+9.01%)
Mutual labels:  privacy-enhancing-technologies
SafePad
SafePad : Encrypted Text Editor. This text editor uses very strong encryption to let you protect your secrets. Great for storing passwords, credit card details or any else that you want to keep safe.
Stars: ✭ 32 (-71.17%)
Mutual labels:  privacy-enhancing-technologies
privacy-preserving-primitives
primitives and protocols for implementing privacy preserving networks
Stars: ✭ 14 (-87.39%)
Mutual labels:  privacy-enhancing-technologies
SDK-Privacy-Report
Privacy details of SDKs for Apple Privacy Nutrition & Google Safety Section disclosure.
Stars: ✭ 219 (+97.3%)
Mutual labels:  privacy-enhancing-technologies
zkay
A programming language and compiler which enable automatic compilation of intuitive data privacy specifications to NIZK-enabled private smart contracts.
Stars: ✭ 28 (-74.77%)
Mutual labels:  privacy
cuda-fixnum
Extended-precision modular arithmetic library that targets CUDA.
Stars: ✭ 39 (-64.86%)
Mutual labels:  privacy-enhancing-technologies
swarm-learning
A simplified library for decentralized, privacy preserving machine learning
Stars: ✭ 142 (+27.93%)
Mutual labels:  privacy-enhancing-technologies
firefox-containers-helper
Firefox multi-account containers are for power users. So is this. Adds bulk container interactivity features missing from the Mozilla Multi-Account Containers extension.
Stars: ✭ 32 (-71.17%)
Mutual labels:  privacy
fidesops
Privacy as Code for DSAR Orchestration: Privacy Request automation to fulfill GDPR, CCPA, and LGPD data subject requests.
Stars: ✭ 32 (-71.17%)
Mutual labels:  privacy
MixEth
MixEth: efficient, trustless coin mixing service for Ethereum
Stars: ✭ 49 (-55.86%)
Mutual labels:  privacy-enhancing-technologies

PrivacyRaven Logo


PrivacyRaven is a privacy testing library for deep learning systems. You can use it to determine the susceptibility of a model to different privacy attacks; evaluate privacy preserving machine learning techniques; develop novel privacy metrics and attacks; and repurpose attacks for data provenance and other use cases.

PrivacyRaven supports label-only black-box model extraction, membership inference, and (soon) model inversion attacks. We also plan to include differential privacy verification, automated hyperparameter optimization, more classes of attacks, and other features; see the GitHub issues for more information. PrivacyRaven has been featured at the OpenMined Privacy Conference, Empire Hacking, and Trail of Bits blog.

Why use PrivacyRaven?

Deep learning systems, particularly neural networks, have proliferated in a wide range of applications, including privacy-sensitive use cases such as facial recognition and medical diagnoses. However, these models are vulnerable to privacy attacks that target both the intellectual property of the model and the confidentiality of the training data. Recent literature has seen an arms race between privacy attacks and defenses on various systems. And until now, engineers and researchers have not had the privacy analysis tools they need to rival this trend. Hence, we developed PrivacyRaven- a machine learning assurance tool that aims to be:

  • Usable: Multiple levels of abstraction allow users to either automate much of the internal mechanics or directly control them, depending on their use case and familiarity with the domain.
  • Flexible: A modular design makes the attack configurations customizable and interoperable. It also allows new privacy metrics and attacks to be incorporated straightforwardly.
  • Efficient: PrivacyRaven reduces the boilerplate, affording quick prototyping and fast experimentation. Each attack can be launched in fewer than 15 lines of code.

How does it work?

PrivacyRaven partitions each attack into multiple customizable and optimizable phases. Different interfaces are also provided for each attack. The interface shown below is known as the core interface. PrivacyRaven also provides wrappers around specific attack configurations found in the literature and a run-all-attacks feature.

Here is how you would launch a model extraction attack in PrivacyRaven:

#examples/extract_mnist_gpu.py
import privacyraven as pr
from privacyraven.utils.data import get_emnist_data
from privacyraven.extraction.core import ModelExtractionAttack
from privacyraven.utils.query import get_target
from privacyraven.models.victim import train_four_layer_mnist_victim
from privacyraven.models.four_layer import FourLayerClassifier

# Create a query function for a target PyTorch Lightning model
model = train_four_layer_mnist_victim()


def query_mnist(input_data):
    # PrivacyRaven provides built-in query functions
    return get_target(model, input_data, (1, 28, 28, 1))


# Obtain seed (or public) data to be used in extraction
emnist_train, emnist_test = get_emnist_data()

# Run a model extraction attack
attack = ModelExtractionAttack(
    query_mnist, # query function
    200,  # query limit
    (1, 28, 28, 1), # victim input shape
    10, # number of targets
    (3, 1, 28, 28),  # substitute input shape
    "copycat", # synthesizer name
    FourLayerClassifier, # substitute model architecture
    784,  # substitute input size
    emnist_train, # seed train data
    emnist_test, # seed test data
)

Since the only main requirement from the victim model is a query function, PrivacyRaven can be used to attack a wide range of models regardless of the framework and distribution method. The other classes of attacks can be launched in a similar fashion. See the examples folder for more information.

Want to use PrivacyRaven?

  1. Install poetry.
  2. Git clone this repository.
  3. Run poetry update
  4. Run poetry install.

If you'd like to use a Jupyter Notebook environment, run poetry shell followed by jupyter notebook.

Additionally, if you'd like to run PrivacyRaven in a Docker container, run chmod +x build.sh followed by ./build.sh. Note that depending on the amount of resources you allocate to Docker, PrivacyRaven's performance may be drastically impacted.

Feel free to join our #privacyraven channel in Empire Hacking if you need help using or extending PrivacyRaven. The official pip release will arrive soon.

Please note that PrivacyRaven is still early in development and is undergoing rapid changes. Users are advised to update frequently and avoid applying PrivacyRaven to critical use cases.

Want to contribute to PrivacyRaven?

PrivacyRaven is still a work-in-progress. We invite you to contribute however you can whether you want to incorporate a new synthesis technique or make an attack function more readable. Please visit CONTRIBUTING.md to get started.

Why is it called PrivacyRaven?

The raven has been associated with a variety of concepts in different cultures through time. Among these, the raven is commonly associated with prophecy and insight. Naturally, we named the tool PrivacyRaven because it is designed to provide insights into the privacy of deep learning.

Who maintains PrivacyRaven?

The core maintainers are:

License

This library is available under the Apache License 2.0. For an exception to the terms, please contact us.

References

While PrivacyRaven was built upon a plethora of research on attacking machine learning privacy, the research most critical to the development of PrivacyRaven are:

Appearances

This is a list of publications, presentations, blog posts, and other public-facing media discussing PrivacyRaven.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].