bat
Black-box Adversarial Toolbox (BAT) is a python library for Distrubuted Black-box Attacks against Deep Learning Cloud Services.
Installation
pip install blackbox-adversarial-toolbox
Then you can use the cli tool bat
to try distributed black-box attacks.
Usage: bat [OPTIONS] COMMAND [ARGS]...
The CLI tool for Black-box Adversarial Toolbox (BAT).
Options:
--help Show this message and exit.
Commands:
api Manage Cloud APIs
attack Manage Attacks
example Manage Examples
bat.apis
Use bat api list
to list supported Cloud APIs:
1 : deepapi An open-source image classification cloud service for research on black-box adversarial attacks.
2 : google Google Cloud Vision AI.
3 : imagga Imagga automatic tagging API.
bat.attacks
Use bat attack list
to list supported attacks:
1 : SimBA Local Search
2 : Square Attack Local Search
3 : Bandits Atack Gradient Estimation
Local Search:
- SimBA Attack (Guo et al., 2019)
- Square Attack (Andriushchenko et al., 2020)
Gradient Estimation:
- Bandits Attack (Ilyas et al., 2019)
Distributed Black-box Attacks:
- DeepAPI (Wu et al., 2023)
bat.examples
Use bat example list
to list available examples:
1 : simba_deepapi SimBA Attack against DeepAPI
2 : bandits_deepapi Bandits Attack against DeepAPI
3 : square_deepapi Square Attack against DeepAPI
Use bat example run
to run examples:
Usage: bat example run [OPTIONS] COMMAND [ARGS]...
Run examples
Options:
--help Show this message and exit.
Commands:
bandits_deepapi Bandits Attack against DeepAPI
simba_deepapi SimBA Attack against DeepAPI
square_deepapi Square Attack against DeepAPI
For example, the command bat example run simba_deepapi
initiates a distributed SimBA attack against DeepAPI.
bat.utils
This module implements utility functions.
1r''' 2Black-box Adversarial Toolbox (BAT) is a python library for **Distrubuted Black-box Attacks** against Deep Learning Cloud Services. 3 4 5## Installation 6 7``` 8pip install blackbox-adversarial-toolbox 9``` 10 11Then you can use the cli tool `bat` to try distributed black-box attacks. 12 13``` 14Usage: bat [OPTIONS] COMMAND [ARGS]... 15 16 The CLI tool for Black-box Adversarial Toolbox (BAT). 17 18Options: 19 --help Show this message and exit. 20 21Commands: 22 api Manage Cloud APIs 23 attack Manage Attacks 24 example Manage Examples 25``` 26 27<br /> 28 29## bat.apis 30 31Use `bat api list` to list supported Cloud APIs: 32 33``` 341 : deepapi An open-source image classification cloud service for research on black-box adversarial attacks. 352 : google Google Cloud Vision AI. 363 : imagga Imagga automatic tagging API. 37``` 38 39<br /> 40 41## bat.attacks 42 43Use `bat attack list` to list supported attacks: 44 45``` 461 : SimBA Local Search 472 : Square Attack Local Search 483 : Bandits Atack Gradient Estimation 49``` 50 51Local Search: 52 53- SimBA Attack [(Guo et al., 2019)](https://arxiv.org/abs/1905.07121) 54- Square Attack [(Andriushchenko et al., 2020)](https://arxiv.org/abs/1912.00049) 55 56Gradient Estimation: 57 58- Bandits Attack [(Ilyas et al., 2019)](https://arxiv.org/abs/1807.07978) 59 60Distributed Black-box Attacks: 61 62- DeepAPI [(Wu et al., 2023)](https://arxiv.org/abs/2210.16371) 63 64<br /> 65 66## bat.examples 67 68Use `bat example list` to list available examples: 69 70``` 711 : simba_deepapi SimBA Attack against DeepAPI 722 : bandits_deepapi Bandits Attack against DeepAPI 733 : square_deepapi Square Attack against DeepAPI 74``` 75 76Use `bat example run` to run examples: 77 78``` 79Usage: bat example run [OPTIONS] COMMAND [ARGS]... 80 81 Run examples 82 83Options: 84 --help Show this message and exit. 85 86Commands: 87 bandits_deepapi Bandits Attack against DeepAPI 88 simba_deepapi SimBA Attack against DeepAPI 89 square_deepapi Square Attack against DeepAPI 90``` 91 92For example, the command `bat example run simba_deepapi` initiates a distributed SimBA attack against DeepAPI. 93 94<br /> 95 96## bat.utils 97 98This module implements utility functions. 99 100''' 101 102# Project Imports 103from bat import apis 104from bat import attacks 105from bat import examples 106from bat import utils 107 108# Semantic Version 109__version__ = "0.1.2"