msfpatterns
msfpatterns (Buffer Overflow Finder) is a tool for generating and analyzing cyclic patterns, similar to pattern_create and pattern_offset from Metasploit. It helps exploit developers identify exact buffer overflow offsets across multiple architectures, including 16-bit, 32-bit, and 64-bit platforms.
Features
- Generate unique cyclic patterns for buffer overflow analysis
- Find offsets of overwritten return addresses in memory dumps
- Supports 2-byte, 4-byte, and 8-byte searches (suitable for MSP430, x86, x86-64, etc.)
- Returns all matching offsets (useful for 16-bit systems where repeats may occur)
- Simple CLI interface
Installation
Using uv (recommended)
uv tool install msfpatterns
Using pip
pip install msfpatterns
CLI Usage
Generating a Pattern
pattern 128 # Generates a pattern of length 128
Finding an Offset
pattern -q 0x41306241 128 # Find offset of 0x41306241 in a 128-byte pattern
Library Usage
You can also use msfpatterns as a Python library:
from msfpatterns import generate_pattern, find_offset
pattern = generate_pattern(128)
print(pattern)
offset = find_offset("0x41306241", 128)
print(f"Offset: {offset}")
Metadata
Release files for msfpatterns 9.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| msfpatterns-9.1.0.tar.gz | 37.4 kB | Without provenance | Details for msfpatterns-9.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| msfpatterns-9.1.0-py3-none-any.whl | Python 3 | none | any | Details for msfpatterns-9.1.0-py3-none-any.whl |
Total release size: 42.0 kB
Release files / msfpatterns-9.1.0.tar.gz
| Download URL | msfpatterns-9.1.0.tar.gz |
|---|---|
| Size | 37.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d18c482656721042e08c22ab59c6af23520c8dcfcf5e89f93b907051ac4ca71
|
|
BLAKE2b-256 checksum How to use checksums |
5cb424234662ad7aa2b49d4d1ed3ffe88506874c28f094045782f0423cc5625d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.8
|
Release files / msfpatterns-9.1.0-py3-none-any.whl
| Download URL | msfpatterns-9.1.0-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6047c0d37e58e0464e4c98b2968f27c801dfe1e6af05aea19b49d9b121b107f2
|
|
BLAKE2b-256 checksum How to use checksums |
4979518750b2ace81b4588f8156e271c59b10f91bb3e71305c830cef9f22e7d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.8
|
Security for msfpatterns 9.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.