← Open Source
cchio

deep-pwning

Metasploit for machine learning.

AI EngineeringTest & guardPython
Open on GitHub
Momentum
+0stars in 24 hours0.0%
570
Stars
131
Forks
+0
This week
4
Contributors
Created 2016-06-21 · Updated 2026-09-30 · #16827 today
Top developers
cchiozitterbewegungmzweilin

cchio/deep-pwning is ranked 16,827 with 570 stars.

Same-category comparison

cchio/deep-pwning is ranked 16,827 among these 8 peers; ferrislucas/iterm-mcp is ranked 16,828.

Same-category comparison
NameRankMetrics
FoundationAgents/ReCode16,802
Language:
Python
Stars:
571
Forks:
69
Description:
Next paradigm for LLM Agent. Unify plan and action through recursive code generation for adaptive, human-like decision-making.
NabilRFG12/Reverse-Engineer-anything16,805
Stars:
571
Forks:
196
Description:
Reverse engineer anything with agents, from app behavior down to native binaries.
netaart/cohub16,817
Language:
TypeScript
Stars:
571
Forks:
11
Description:
A living space where people and agents create, play, and build together.
Baidu-AIP/java-sdk16,819
Language:
Java
Stars:
570
Forks:
222
ferrislucas/iterm-mcp16,828
Language:
TypeScript
Stars:
570
Forks:
73
Description:
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance.
omnuron/omniclaw16,833
Language:
Python
Stars:
570
Forks:
43
Description:
The first agentic payment network: policy-controlled, gasless, and real money-ready. OmniClaw CLI + Financial Policy Engine let autonomous agents pay and earn safely at machine speed.
urban-bot/urban-bot16,836
Language:
TypeScript
Stars:
570
Forks:
32
Description:
🤖 The universal chatbot library based on React.
GaTech-RL2/EgoVerse16,843
Language:
Jupyter Notebook
Stars:
569
Forks:
55
Description:
EgoVerse: Egocentric Data for Robot Learning from Around the World.
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguagePython
CategoryAI Engineering
SubcategoryTest & guard
KeywordsAI safety, Security
Stars570
Forks131
Contributors4
Created date2016-06-21
Updated date2026-09-30
Stars in 1 day0
Stars in 7 days0
Rank16,827
Previous rank16,619
Rank change-208
7-day stars rank15,747
Previous 7-day stars rank15,757
7-day stars rank change10
Total stars rank17,484
Previous total stars rank17,454
Total stars rank change-30
CountryUSA
README summary

Deep-pwning is a lightweight framework for experimenting with machine learning models with the goal of evaluating their robustness against a motivated adversary. Note that deep-pwning in its current state is ***no where*** close to maturity or completion. It is meant to be experimented with, expanded upon, and extended by you. Only then can we help it truly become the goto __penetration testing toolkit for statistical machine learning models__. Background Researchers have found that it is surprisingly trivial to

trick a machine learning model (classifier, clusterer, regressor etc. ) into making an objectively wrong decisions. This field of research is called Adversarial Machine Learning. It is not hyperbole to claim that any motivated attacker can bypass any machine learning system, given enough information and time. However, this issue is often overlooked when architects and engineers design and build machine learning systems. The consequences are worrying when these systems are put into use in critical scenarios, such as in the medical

, transportation, financial, or security-related fields. Hence, when one is evaluating the efficacy of applications using machine learning, their malleability in an adversarial setting should be measured alongside the system's precision and recall. This tool was released at DEF CON 24 in Las Vegas, August 2016, during a talk titled Machine Duping 101: Pwning Deep Learning Systems. Structure This framework is built on top of Tensorflow, and many of the included examples in this repository are modified Tensorflow examples obtained

from the Tensorflow GitHub repository. All of the included examples and code implement **deep neural networks**, but they can be used to generate adversarial images for similarly tasked classifiers that are not implemented with deep neural networks. This is because of the phenomenon of 'transferability' in machine learning, which was Papernot et al. This means means that adversarial samples crafted with a DNN model *A* may be able to fool another distinctly structured DNN model *B*, as well as some

other SVM model *C*. This figure taken from the aforementioned paper (Papernot et al. ) shows the percentage of successful adversarial misclassification for a source model (used to generate the adversarial sample) on a target model (upon which the adversarial sample is tested). Components Deep-pwning is modularized into several components to minimize code repetition. Because of the vastly different nature of potential classification tasks, the current iteration of the code is optimized for classifying **images** and **phrases** (using word vectors

). These are the code modules that make up the current iteration of Deep-pwning: 1. Drivers The **drivers** are the *main* execution point of the code. This is where you can tie the different modules and components together, and where you can inject more customizations into the adversarial generation processes. Models This is where the actual machine learning model implementations are located. For example, the provided model definition is located in the function witihn . It defines the network as the

following: LeCun et al. Adversarial (advgen) This module contains the code that generates adversarial output for the models. The function

Frequently asked questions

How many stars and forks are recorded?

cchio/deep-pwning has 570 stars and 131 forks.

What is the repository rank?

cchio/deep-pwning is ranked 16,827.

What language and category are recorded?

cchio/deep-pwning has 570 stars, uses Python and belongs to AI Engineering.

Which repository is closest in rank?

cchio/deep-pwning is compared with ferrislucas/iterm-mcp, ranked 16,828 with 570 stars.

README

Deep-pwning is a lightweight framework for experimenting with machine learning models with the goal of evaluating their robustness against a motivated adversary.

Note that deep-pwning in its current state is no where close to maturity or completion. It is meant to be experimented with, expanded upon, and extended by you. Only then can we help it truly become the goto penetration testing toolkit for statistical machine learning models.

Background

Researchers have found that it is surprisingly trivial to trick a machine learning model (classifier, clusterer, regressor etc.) into making an objectively wrong decisions. This field of research is called Adversarial Machine Learning. It is not hyperbole to claim that any motivated attacker can bypass any machine learning system, given enough information and time. However, this issue is often overlooked when architects and engineers design and build machine learning systems. The consequences are worrying when these systems are put into use in critical scenarios, such as in the medical, transportation, financial, or security-related fields.

Hence, when one is evaluating the efficacy of applications using machine learning, their malleability in an adversarial setting should be measured alongside the system's precision and recall.

This tool was released at DEF CON 24 in Las Vegas, August 2016, during a talk titled Machine Duping 101: Pwning Deep Learning Systems.

Structure

This framework is built on top of Tensorflow, and many of the included examples in this repository are modified Tensorflow examples obtained from the Tensorflow GitHub repository.

All of the included examples and code implement deep neural networks, but they can be used to generate adversarial images for similarly tasked classifiers that are not implemented with deep neural networks. This is because of the phenomenon of 'transferability' in machine learning, which was Papernot et al. expounded expertly upon in this paper. This means means that adversarial samples crafted with a DNN model A may be able to fool another distinctly structured DNN model B, as well as some other SVM model C.

This figure taken from the aforementioned paper (Papernot et al.) shows the percentage of successful adversarial misclassification for a source model (used to generate the adversarial sample) on a target model (upon which the adversarial sample is tested).

Components

Deep-pwning is modularized into several components to minimize code repetition. Because of the vastly different nature of potential classification tasks, the current iteration of the code is optimized for classifying images and phrases (using word vectors).

These are the code modules that make up the current iteration of Deep-pwning:

  1. Drivers

    The drivers are the main execution point of the code. This is where you can tie the different modules and components together, and where you can inject more customizations into the adversarial generation processes.

  2. Models

    This is where the actual machine learning model implementations are located. For example, the provided lenet5 model definition is located in the model() function witihn lenet5.py. It defines the network as the following:

       -> Input
       -> Convolutional Layer 1
       -> Max Pooling Layer 1
       -> Convolutional Layer 2
       -> Max Pooling Layer 2
       -> Dropout Layer
       -> Softmax Layer
       -> Output
    
    ![LeNet-5](https://github.com/cchio/deep-pwning/blob/master/dpwn/repo-assets/lenet5.png?raw=true) 
    

    LeCun et al. LeNet-5 Convolutional Neural Network

  3. Adversarial (advgen)

    This module contains the code that generates adversarial output for the models. The run() function defined in each of these advgen classes takes in an input_dict, that contains several predefined tensor operations for the machine learning model defined in Tensorflow. If the model that you are generating the adversarial sample for is known, the variables in the input dict should be based off that model definition. Else, if the model is unknown, (black box generation) a substitute model should be used/implemented, and that model definition should be used. Variables that need to be passed in are the input tensor placeholder variables and labels (often refered to as x -> input and y_ -> labels), the model output (often refered to as y_conv), and the actual test data and labels that the adversarial images will be based off of.

  4. Config

    Application configurations.

  5. Utils

    Miscellaneous utilities that don't belong anywhere else. These include helper functions to read data, deal with Tensorflow queue inputs etc.

These are the resource directories relevant to the application:

  1. Checkpoints

    Tensorflow allows you to load a partially trained model to resume training, or load a fully trained model into the application for evaluation or performing other operations. All these saved 'checkpoints' are stored in this resource directory.

  2. Data

    This directory stores all the input data in whatever format that the driver application takes in.

  3. Output

    This is the output directory for all application output, including adversarial images that are generated.

Getting Started

Installation

Please follow the directions to install tensorflow found here https://www.tensorflow.org/versions/r0.8/get_started/os_setup.html which will allow you to pick the tensorflow binary to install.

$ pip install -r requirements.txt

Execution Example (with the MNIST driver)

To restore from a previously trained checkpoint. (configuration in config/mnist.conf)

$ cd dpwn
$ python mnist_driver.py --restore_checkpoint

To train from scratch. (note that any previous checkpoint(s) located in the folder specified in the configuration will be overwritten)

$ cd dpwn
$ python mnist_driver.py

Task list

  • [ ] Implement saliency graph method of generating adversarial samples
  • [ ] Add defense module to the project for examples of some defenses proposed in literature
  • [ ] Upgrade to Tensorflow 0.9.0
  • [ ] Add support for using pretrained word2vec model in sentiment driver
  • [ ] Add SVM & Logistic Regression support in models (+ example that uses them)
  • [ ] Add non-image and non-phrase classifier example
  • [ ] Add multi-GPU training support for faster training speeds

Requirements

Note that dpwn requires Tensorflow 0.8.0. Tensorflow 0.9.0 introduces some

Contributing

(borrowed from the amazing Requests repository by kennethreitz)

  • Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
  • Fork the repository on GitHub to start making your changes to the master branch (or branch off of it).
  • Write a test which shows that the bug was fixed or that the feature works as expected.
  • Send a pull request and bug the maintainer until it gets merged and published. :) Make sure to add yourself to AUTHORS.md.

Acknowledgements

There is so much impressive work from so many machine learning and security researchers that directly or indirectly contributed to this project, and inspired this framework. This is an inconclusive list of resources that was used or referenced in one way or another:

Papers

Code

Datasets

Nearby in the ranking
Similar items