Skip to main content

A python library intended to help researchers build more practical measures for shoulder surfing attack efficacy.

Project description

shouldersurfscore

This library helps researchers in lab settings develop better metrics to understand the practical password guess quality of shoulder surfing and password guessing attacks.

The library provides the following (their complexity for you to use in parentheses):

  • (Advanced): a nuanced set of classes to build an experiment environment including different keyboard layouts, device lockout patterns, and different styles of attackers that can help to better estimate different
  • (Medium): predefined equipment to make it easier to get up and running (e.g. an iPhone, with common login restrictions).
  • (Easy): defined scores to make it easier to reproduce other researchers' experiments (and when you're ready, hopefully yours too!).
  • (Easy): implementations of a few other common metrics for assessing password quality.

Installation

To install, simply use:

pip install shouldersurfscore

How-To Use

Defined Labs

Pre-defined labs can be used to recreate scores used in others' experiments.

For example:

from shouldersurfscore.defined_experiments.built_labs import InitialShoulderSurfScorePaperLab

analysis = InitialShoulderSurfScorePaperLab.run(
    actual_password='9163',
    observed_password='9613'
)
print(analysis)
Break In Analysis
------------------
actual_password: 9163
observed_password: 9613
password_index: 2
password_index_percent: 1.9801980198019803e-06
elapsed_time: 0s
device_unlocked: True

Other Metrics

Predefined Objects

from shouldersurfscore.analysis.breakin_analysis import BreakInAnalysis
from shouldersurfscore.classes import guessing_strategies
from shouldersurfscore.classes.lab import Lab
from shouldersurfscore.equipment.devices import Devices

device = Devices.get_iphone()
# Define strategies
pin_lengths = [4, 6]
# If the observed password doesn't work
# then all possible passwords will be tried in sequential order
# until successful or device goes into lock out.
strategies: list[guessing_strategies.GuessingStrategy] = [
    # Initialize brute force method with which characters are valid
    # and which pin lengths are valid
    guessing_strategies.BruteForceGuessing(device.keyboard.characters, pin_lengths)
]
password = "2290"
observed_password = "9163"
analysis = Lab.run(device, strategies, password, observed_password)
print(analysis)
Break In Analysis
------------------
actual_password: 2290
observed_password: 9163
password_index: 1190
password_index_percent: 0.0011782178217821782
elapsed_time: 1h 21m
device_unlocked: False

Classes

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shouldersurfscore-1.0.2.tar.gz (52.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shouldersurfscore-1.0.2-py3-none-any.whl (48.3 kB view details)

Uploaded Python 3

File details

Details for the file shouldersurfscore-1.0.2.tar.gz.

File metadata

  • Download URL: shouldersurfscore-1.0.2.tar.gz
  • Upload date:
  • Size: 52.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for shouldersurfscore-1.0.2.tar.gz
Algorithm Hash digest
SHA256 e4f46fa5afe5331014652175a086fa1310e06ffe8c6e3cea673ef8aa5327cf88
MD5 6f3f9d2440bc16b086ad72de19579415
BLAKE2b-256 74a1e6271e835e476fa5bb9d5bac4a44b0173e8d3c867c3eb05f46bbe7617fa9

See more details on using hashes here.

File details

Details for the file shouldersurfscore-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for shouldersurfscore-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a17d690efd6b0407bad5a08b1ba3c6889539d13d069285f3a3c6616c78c71f97
MD5 79edea55fb6d4a20283d3994c35f5312
BLAKE2b-256 9763222c0a216de58a11513bcd6bc5ccc9060470bc078d98e37dc1d860fa44eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page