Coder Social home page Coder Social logo

snow0011 / ckl_psm Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 4.0 45.99 MB

Code for a password strength meter (PSM) with CKL_PCFG models and for memory pattern recognization

License: MIT License

Python 76.08% HTML 1.62% TypeScript 22.30%
password password-strength-meter pcfg

ckl_psm's Introduction

Chunk-level Password Strength Meter

1. Chunk-level Password Strength Meter based on CKL_PCFG

Introduction

CKL_PSM is a new password strength meter based on the chunk-level PCFG model (CKL_PCFG). Additionaly, CKL_PCFG employs BPE segmentation algorithm to segment passwords first, then apply the segmented passwords as a novel template to build the CKL_PCFG model. Overall, CKL_PCFG achieves state-of-the-art results on various password guessing scenarios. This CKL_PSM can remind users of vulnerable strings in a password.

For a detailed description or technical details and experimental results, please refer to our paper: Chunk-level Password Guessing: Towards Modeling Refined Password Composition Representations.

1.1 Requirements

  • Python3.6 or Python3.8
  • Node14.17 and yarn1.22
  • Ubuntu20.04 or Windows 10

1.2 Application startup

1.2.1 Back end

cd backend
pip3 install -r requirements
python3 pcfg_server.py  # The default ip:port is <device local ip>:3001, and it MUSE BE <device local ip>:3001

1.2.2 Front end

cd frontend
yarn install
python3 ipconfig.py  # it is the same as: echo <device local ip> > ./src/ip.json
yarn build
yarn global add serve
~/.yarn/bin/serve build  # It will automatically choose a port

1.3 Preview

psm-crop-1

2. Chunk level PCFG Library (Interface)

Introduction

We also offer a CKL_PCFG library for password strength query. We hope that we can provide an interface for developers to conveniently intergrate into current password managers (e.g., LastPass, Dashlane, 1Password).

2.1 How to build

cd backend
# Install ckl_psm to current python environment
python setup.py install

or install by pip

pip install ckl-psm

2.2 How to use

# Import ckl_psm and make sure you have installed the library
from ckl_psm import ckl_pcfg as psm

# Strength query for given password
result = psm.check_pwd("123456")

# The result is consist of four parts:
print(
    result["guess_number"],
    result["segments"],
    result["chunks"],
    result["prob"]
)

3. Memory pattern recognization code (supplementary)

Introduction

The folder "pattern_recognization" contains scripts that we use to recognize memory pattern in chunks and passwords. We focus on four type patterns in our paper: leet pattern, syllable pattern, keyboard pattern and date pattern. Input the password list and the scripts will output the passwords which meet the specific pattern. Here are details:

pattern_recognization/
├── leet.py         // Leet transformation rule detector. 
└── syllable.py         // Syllable pattern detector(include English syllable words and Chinese Pinyins).
├── kbd.py          // Detect keyboard patterns in chunks. 
├── date.py         // Date pattern recognization for chunks.

ckl_psm's People

Contributors

snow0011 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ckl_psm's Issues

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.