Skip to main content

A CTF pwn helper library for easy libc address calculation

Project description

loopwn

A Python library designed to assist with CTF Pwn challenges, specifically focusing on Libc address calculation and leak exploitation.

Installation

pip install loopwn

Usage

1. Looplibc - Libc Address Calculation

from loopwn import Looplibc

# Example 1: Initialize with a known base address
libc = Looplibc('./libc.so.6', 0x7ffff7a0d000)

# Example 2: Initialize with a leaked symbol address
# This will automatically calculate the base address
libc = Looplibc('./libc.so.6', 'puts', 0x7ffff7a8c5a0)

# Access addresses
print(hex(libc.system))
print(hex(libc.bin_sh))

2. loop2text - Auto Ret2text Exploitation

from pwn import *
from loopwn import loop2text

# Start process
io = process('./pwn')

# Exploit
# Automatically sends payload and verifies shell with an echo check
# Args: padding_length, backdoor_address, io_object
loop2text(112, 0x401186, io)

Features

  • Automatic Base Calculation: Easily calculate libc base address from a leaked symbol.
  • Quick Access: Get system and /bin/sh addresses via properties.
  • Auto Ret2Text: Generate payload and get shell in one line with loop2text.
  • Shell Verification: Automatically checks if shell is obtained.
  • Pwntools Integration: Inherits from pwntools's ELF class.

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

loopwn-0.2.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

loopwn-0.2.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file loopwn-0.2.0.tar.gz.

File metadata

  • Download URL: loopwn-0.2.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for loopwn-0.2.0.tar.gz
Algorithm Hash digest
SHA256 48c9ca6532879d3992153fb00cb72a998da8f2ff05fc2022ab1e7d10dd1bd059
MD5 9df66105b2cedfff8fa770210d9ef12f
BLAKE2b-256 ee9671b5a8012e37c0f7fd77661fa0f69c1bb8d1a569436f86ee479ea2d748cd

See more details on using hashes here.

File details

Details for the file loopwn-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: loopwn-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for loopwn-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 780ba7d47892040910e69fa9030515c09e396d4eb23fe2930f0a1536c7743913
MD5 d2b880540391db6e370c89938a6e9030
BLAKE2b-256 f29f1686c74e25ebdb5dfadcb9e2f231eb501cfa4be76c99411f443f58bcee39

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