- Extension to
~/.pwn.conf
:[pwnscripts] libc_database=...
- Removal of
pwnscripts.config
; now integrated underfsb
- Most bruteforcing functions under
fsb.find_offset.*
require less bytes of input now. find_offset.*
is more consistent with bytes vs str- Removed nul-byte in
fsb.leak.deref_payload
Most changes are listed under the v0.5.*dev headers. Other changes include:
- updating the README.md to match many new features
- automated tests have been cleaned up & categorised
- Assigning values to ELF.symbols[] will automagically update ELF.address.
- Note: as with prior ELF/context updates, the magic here can't sync with internal pwntools methods that reference
pwnlib.elf.elf.ELF
. - Tests have been updated to reflect this
- Note: as with prior ELF/context updates, the magic here can't sync with internal pwntools methods that reference
fsb-cache
will automatically detect different libc versions && differentiate remote vs. local bruteforce attempts.context.is_local
to check if the most recently opened tube is local/remote. This involves monkeypatching forELF()
andremote()
; there are a number of cases where.is_local
will fail to update properly.
libc()
will now catch discrepancies between pwntools-provided binary offsets and libc-database offsets, raising a debug log if things go wrong.- increase the number of TODOs
- pylint whitespace
fsb.find_offset.<>()
will store a cache of leaked printf values.- Use
fsb.find_offset.flush_cache()
if anything goes wrong. README.md
has been updated appropriately.
- Use
libc.run_with()
now has an argument for process constructor overridding.
__all__
has been added to most source files to prevent namespace leaking.- Version history has been shifted to its own separate file
- Efforts have been made to clean up code using pylint
string_checks
has been refactored:string_checks
itself is now namedutil
is_X_address
functions have been renamed tois_addr.X
extract_*
functions have been renamed tounpack_*
libc_db()
from v0.1 is now fully removed from pwnscripts.- bugfixes for fsb.leak module
ROP.pop
&&ROP.system_call
overhaul- Use
ROP.pop.<reg>(value)
to pop a single register ASAP ROP.system_call.<func>(args)
is a similar shortcutROP.system_call(id, ...)
will now accept astr
forid
(whereid
is the name of the syscall)- These changes mean that
help()
is essentially broken for these functions. In lieu of that, more docstrings! - Added a test for these changes
- Use
- Some of the TODOs have been extended with short outlines
- very minor README.md edit.
- hotfix for versioning
- Use
context.libc.run_with()
to run anELF()
with a specific libc version.- This is reliant on
ld-linux.so
; no moreLD_PRELOAD
segfaults! context.binary
is aware ofcontext.libc
, and will automagically use.run_with()
where possible.- Added
context.libc.dir()
to get the/path/to/libc-database/libs/libc.id/
. - Tests have been added for all of these things
- This is reliant on
ELF
now has an.ldd_libs()
method to get a list of libs used by a binary on wsl.rop.system_call()
can now search for'syscall; ret'
instructions.- This is dependent on pwntools-dev
libc.select_gadget()
will return with the correctlibc.address
adjusted value- hotfix for versioning
-
pwnlib.context.context
is now extended for pwnscripts:context.libc
andcontext.libc_database
have been added as extensions. -
pwnscripts.libcdb_query
has undergone a revamp:- Two new classes have been created:
libc_database()
andlibc()
. libc()
is the replacement forlibc_db()
, and inherits frompwnlib.elf.elf.ELF
to simplify libc offset calculation.libc_database()
is a class to represent an existing installation of thelibc-database
- More error catching
The older
libc_db()
class (and the associatedlibc_find()
) will remain as deprecated features for the time being. - Two new classes have been created:
- Internal code: removal of
attrib_set_to()
& replacement withcontext.local
internally - Tests & examples have been pruned to ensure that neither file has copied examples from the other.
- Lots and lots of documentation + tests
pwnscripts is out of pre-alpha, and will follow Semantic Versioning where possible.
20-09
Begin following PEP 440
NEW: fsb.find_offset
extended with offset-matching searches.
NEW: pwntools
' ROP
class has been extended with new features.
libc_db() can (must) now be initialised with either a filepath to a libc.so.6 binary
, or with an identifier id
.
This breaks the original behaviour of allowing e.g. libc_db('/path/to/libc-database', '<identifier>')
20-08.1
NEW: printf() functions are now kept under the pwnscripts.fsb
module. Older prototypes for find_printf_* functions remain available for now.
Addition of a lot of docstrings, plus example binaries.
20-08
Added a lot of whitespace.
Added a wrapper object for libc-database: the libc_db
object. This is mostly a reinvention of tools like LibcSearcher
, although I have yet to see another project tack on one_gadget
searching, which is a (hacky) feature added for libc_db
.
Minor adjustments to printf. Logging is suppressed for offset bruteforcing; new feature to make a leak payload.
Extended readme.
20-06
Added module packaging stuff, so that pip install -e .
works
You can now see a test example of this library in test.py
.