Skip to content

Cfomodz/passcode-pattern-recognition

Repository files navigation

Passcode Pattern Recognition

Recover PIN codes from observed finger motion.

CI Deploy TypeScript React Vite Tailwind License

Live Demo · Algorithm Docs · Architecture


A mobile-first tool for penetration testers. Observe someone entering a PIN, replay the finger motion on a blank grid, and get ranked guesses powered by spatial analysis and real-world frequency data.

How It Works

Tap 4 positions  -->  Normalize to keypad  -->  Score candidates  -->  Ranked PINs
  1. Tap — Mimic the observed motion on a blank grid (no keypad shown)
  2. Normalize — Points are centered and scaled to a standard 3×4 keypad
  3. Score — Each candidate PIN is scored via Gaussian proximity and real-world frequency
  4. Rank — Three output lists: heatmap-only, frequency-filtered, and weighted composite

Quick Start

npm install
npm run dev

Open localhost:5173 and tap four positions on the grid.

Scripts

Command Description
npm run dev Start dev server
npm run build Production build
npm test Run all tests
npm run lint Lint with ESLint
npm run typecheck Type-check with tsc
npm run deploy Deploy to GitHub Pages

Architecture

src/
  lib/         Pure scoring functions (normalize, heatmap, composite, candidates)
  components/  React UI (TapGrid, ResultsPanel, WeightSlider, etc.)
  hooks/       useTapCapture, useAnalysis
  data/        Static CSV loader for PIN frequencies
  types/       Shared TypeScript interfaces

All scoring logic lives in src/lib/ as pure functions with zero side effects. Touch handling and rendering happen exclusively in components and hooks.

Data

PIN frequency data covers all 10,000 possible 4-digit PINs, sourced from DataGenetics and SecLists. The dataset is bundled statically — the app works fully offline with no network requests.

Ethics

This tool is for authorized penetration testing and security awareness training only. It demonstrates why physical PIN shielding matters. It does not interact with any real payment terminals or authentication systems.

About

Educational purposes & PoC only! | Tool can be used to recognize 4-digit passcodes by the physical pattern of movement used to enter them on the pin pad. This is a physical security tool used in legal and authorized jobs demonstrating the need for pin pad covers or other solutions implemented to prevent similar attacks by bad actors.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors