Code Monkey home page Code Monkey logo

sanitron's Introduction

Sanitron

Swift Student Challenge Submission | WWDC 2024

๐ŸŽฌ Watch Preview ๐ŸŽฌ

cover

My Swift Playground App aims to demonstrate the potential of Machine Learning in identifying various injection attacks that target input fields & implement best practices for validating & sanitizing user input.

Introducing Sanitron! Sanitron is a client-side bot that swiftly detects and prevents injection attacks using Machine Learning.

Let's get started!

Feature Extraction

Malicious input may have various characteristics that distinguish it from legitimate input.

Feature Extraction is done using GoogleColab using Python to effectively classify the user input into various injection attacks.

Features:

  1. Payload Length
  2. Number of Non-Printable Characters
  3. Number of Punctuation Characters
  4. Number of SQL Keywords
  5. Number of JS Keywords
  6. Number of OS Command Keywords

Training PurifyML:

PurifyML is an ML-Model trained in CreateML with a Random Forest Algorithm. 6 features are used as input & label + labelProbability as output.

Working:

  1. Navigate to Input Inspector
  2. You can type or paste your input in the text field or select it from the Payload Dataset.
  3. Click on the "Inspect" button. It will extract all features from the input & use the PurifyML Model to predict the label output & label probability.
  4. You can also customize settings to sanitize malicious characters from input.
  5. It will show an analysis report from the PurifyML model & the attack type with its probability. Also, it will show sanitized input, if settings are configured.

Hurray! This is how we can simply employ Sanitron in your mobile applications to identify injection attacks.

Technology Used:

SwiftUI, CreateML, CoreML, AVKit, Python, GoogleColab

Resources

  1. Google Colab Notebook
  2. Payload Dataset
  3. Extracted Features

Credits:

  1. Payload wordlists: GitHub(danielmiessler/SecLists, swisskyrepo/PayloadsAllTheThings)
  2. Stats: HackerOne Hacker-Powered Security Report 2023
  3. Icons: Freepik.com
  4. Sounds: freesound.org

Thank you for checking out my Swift Playground App!!!

Visitor Badge

sanitron's People

Contributors

heydc7 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.