{"id":15116248,"url":"https://github.com/tigthor/neural-network-hacking","last_synced_at":"2025-04-15T01:34:31.681Z","repository":{"id":105835038,"uuid":"313760249","full_name":"tigthor/neural-network-hacking","owner":"tigthor","description":"Hacking the Singularity. Deep learning hacking. Weaponizing AI in Offensive security","archived":false,"fork":false,"pushed_at":"2024-06-24T04:33:28.000Z","size":21135,"stargazers_count":96,"open_issues_count":0,"forks_count":25,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-10T14:31:27.582Z","etag":null,"topics":["ai","automation","bug-hunting","bugbounty","hacking","machine-learning","neural-network","neural-networks","vulnerability-scanner"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tigthor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-17T22:36:46.000Z","updated_at":"2025-03-16T08:11:43.000Z","dependencies_parsed_at":"2024-06-24T05:38:35.368Z","dependency_job_id":null,"html_url":"https://github.com/tigthor/neural-network-hacking","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigthor%2Fneural-network-hacking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigthor%2Fneural-network-hacking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigthor%2Fneural-network-hacking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigthor%2Fneural-network-hacking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tigthor","download_url":"https://codeload.github.com/tigthor/neural-network-hacking/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248989229,"owners_count":21194549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","automation","bug-hunting","bugbounty","hacking","machine-learning","neural-network","neural-networks","vulnerability-scanner"],"created_at":"2024-09-26T01:44:15.332Z","updated_at":"2025-04-15T01:34:31.664Z","avatar_url":"https://github.com/tigthor.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Hacking Neural Networks: A Short Introduction\n\n\u003cspan style=\"color:red\"\u003e**Disclaimer: This article and all the associated exercises are for educational purposes only.**\u003c/span\u003e\n\nThis repository provides a comprehensive introduction to various offensive techniques using neural networks. The methods covered include bug hunting, shellcode obfuscation, information extraction, malware injection, backdooring, and more.\n\nEach method is accompanied by an exercise, allowing you to practice and understand the concepts hands-on. You can find the detailed article here in '[Article.pdf](Article.pdf)' or on arXiv ([arXiv:1911.07658](https://arxiv.org/pdf/1911.07658.pdf)).\n\n---\n\n## Setup\n\n### Python and pip\n\nDownload and install Python3 and its package installer pip using a package manager or directly from the [official website](https://www.python.org/downloads/).\n\n### Editor\n\nAn editor is required to work with the code, preferably one that supports Python syntax highlighting. Some recommended editors are:\n\n- [Visual Studio Code](https://code.visualstudio.com/docs/python/python-tutorial)\n- Vim/Emacs\n\n### Packages\n\nTo run the exercises, you will need to install several Python packages:\n\n- **Keras**: Follow the [official installation guide](https://keras.io/#installation). TensorFlow is recommended as the backend, preferably the GPU-enabled version if available.\n- **NumPy**, **SciPy**, and **scikit-image**: Install these helper packages for numerical operations and image processing. Follow the [SciPy installation instructions](https://www.scipy.org/install.html) and [scikit-image installation guide](https://scikit-image.org/docs/stable/install.html).\n- **PyCuda**: Required for GPU-based attack exercises. If you don't have an NVIDIA GPU, you can skip this. Follow the [PyCuda installation guide](https://wiki.tiker.net/PyCuda/Installation).\n- **NLTK**: Necessary for natural language processing tasks. Follow the [NLTK installation instructions](https://www.nltk.org/install.html).\n\n---\n\n## The exercises\n\nThis repository includes a variety of exercises, each focusing on a different aspect of neural network attacks:\n\n- **0 - Last Layer Attack**: Understand and manipulate the last layer of a neural network.\n- **1 - Backdooring**: Inject backdoors into neural network models.\n- **2 - Extracting Information**: Extract sensitive information from neural networks.\n- **3 - Brute Forcing**: Develop brute-force strategies for image-based security.\n- **4 - Neural Overflow**: Explore neural network overflow vulnerabilities.\n- **5 - Malware Injection**: Inject malware into neural networks.\n- **6 - Neural Obfuscation**: Obfuscate neural network operations.\n- **7 - Bug Hunting**: Use neural networks to find vulnerabilities in code.\n- **8 - GPU Attack**: Attack GPU-based authorization systems.\n\nFor detailed instructions, please read the `README.md` file in each exercise directory.\n\n---\n\n## Further Reading / Watching\n\nFor more information on security and machine learning, check out the following resources:\n\n- Isao Takaesu's course on [Security and Machine Learning](https://github.com/13o-bbr-bbq/machine_learning_security/tree/master/Security_and_MachineLearning)\n- Will Pearce and Nick Landers' [Talk at Derbycon 2019](https://www.youtube.com/watch?v=CsvkYoxtexQ) on Offensive Machine Learning techniques.\n- The [Deep Learning Book](http://www.deeplearningbook.org/) by Ian Goodfellow, Yoshua Bengio, and Aaron Courville.\n- The [Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow](https://www.oreilly.com/library/view/hands-on-machine-learning/9781492032632/) book by Aurélien Géron.\n\n---\n\n## Contributing\n\nContributions are welcome! If you find errors or missing references, feel free to make a PR or contact me.\n\n### How to Contribute\n\n1. Fork the repository.\n2. Create a new branch (`git checkout -b feature-branch`).\n3. Make your changes and commit them (`git commit -am 'Add new feature'`).\n4. Push to the branch (`git push origin feature-branch`).\n5. Create a new Pull Request.\n\nPlease ensure that your contributions align with the repository's purpose and follow the established coding standards\n---\n\n## What else?\n\nThe neural networks found in the exercises are based on the examples provided by [keras](https://keras.io/).\n\nIf you find that there are errors or missing references, feel free to make a PR or contact me.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftigthor%2Fneural-network-hacking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftigthor%2Fneural-network-hacking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftigthor%2Fneural-network-hacking/lists"}