Releases: pwndbg/pwndbg
2024.08.29
2024.08.29 Release
Since last release we got a lot of new features and improvements done in Pwndbg.
Among others, we now show register/memory values in disasm view for different architectures, added Binary Ninja integration, added commands helping with Go debugging, added glibc heap
UAF tracking and refactored lots of Pwndbg code for future LLDB port.
Some of this work was paid thanks to the Python Summer of Code program (@OBarronCS, @mbrla0 and @jetchirag's projects) and thanks to Trail of Bits' internships (@Aplet123 and @mbrla0 projects). Here are hightlights from their work:
- @OBarronCS extended the disasm context panel to display the values of registers and memory, fetched statically or through emulation. Read about this work on his personal blog.
- @Aplet123 developed a script to synchronize Binary Ninja view and symbols with Pwndbg as well as added new commands for dumping Go types. He detailed those features on a Trail of Bits blog post.
- @mbrla0 developed glibc heap tracking and UAF detection
- @mbrla0 works on making Pwndbg debugger-agnostic and porting it to LLDB. Read his gist about this work.
Major changes
- The prompt is now colored green if process is alive and red if it is dead (#2326)
- The disassembly context view now resolves and displays register and memory values on the right. Some values are resolved statically (such as
xor eax, eax
) and some through emulation (requiresset emulation on
).
-
The disasm banner now displays ARM mode (ARM vs Thumb) (#2281)
-
Added
go-dump <type> <address>
command to dump Go types. Note that theany
type below works only for addresses of Go interface objects. (read more in blog post)
- Added
go-type <address>
command to dump Go type infromation (read more in blog post):
- Added option to
search
to look for assembly instructions (search --asm <code>
) and to set breakpoints on found instructions (search --asmbp <code>
) - Added
vmmap --gaps
which displays mapped memory with gaps instead of the normal vmmap display:
- Added commands to display Android Binder driver info (experimental; #1488), and a
pcp
command to print Linux kernel per-cpu page cache (#1487)
Full changelog
The full changelog can be found here: 2024.02.14...2024.08.29
New Contributors
- @Rajpratik71 made their first contribution in #2068
- @knowanegg made their first contribution in #2072
- @Tcc100 made their first contribution in #2069
- @diivi made their first contribution in #2076
- @urosh1g made their first contribution in #2083
- @RoboSchmied made their first contribution in #2088
- @jetchirag made their first contribution in #2092
- @TheLazron made their first contribution in #2103
- @chrf01 made their first contribution in #2097
- @Ordoviz made their first contribution in #2141
- @MatejKafka made their first contribution in #2147
- @B1N4RY-P4R45173 made their first contribution in #2198
- @k4lizen made their first contribution in #2226
- @raffifu made their first contribution in #2228
- @Aplet123 made their first contribution in #2252
- @cfreal made their first contribution in #2321
- @Costinteo made their first contribution in #2326
- @wwwXOX made their first contribution in #2331
- @0xhebi made their first contribution in #2360
- @dguerri made their first contribution in #2395
Also thanks to @patryk4815 for all the help with packaging and releases.
2024.02.14
2024.02.14 Release
Here is the 2024.02.14 release. Thanks to everyone who contributed!
Among others, this release brings GOT tracking mechanism, more step/break commands, mmap/mprotect syscalls, printing of linked lists, displaying of threads in context for multithreaded programs, lots and lots of fixes and more!
The release files can be used to install Pwndbg as self-contained (along with GDB, Python and all deps) package on many distros and x86-64 and arm64/aarch64 architectures. The *-portable.tar.gz
archives can be just unpacked and run.
Below is a summary of changes, while the full changelog can be found further on.
Note: this release requires Python >= 3.8 (which means Ubuntu 18.04 or Debian 10 are not supported anymore).
Summary of changes
General changes:
- Added portable Pwndbg archive to release as well as nix, rpm, deb, arch and alpine packages
- Added
$base(objfile_name)
function to compute base address of given memory page, e.g.print $base(libc)+0x123
will return base of libc + 0x123 - Context will now display threads information for multi-threaded programs
- this is limited by
context-max-threads
parameter (useset context-max-threads <N>
to change)
- this is limited by
- Added glibc heap exploitation support for libc 2.12+ (#1823)
- Added support for FreeBSD (#1832)
- The
gdb-pt-dump
git submodule was moved to a python dependency (#1929)
New commands:
track-got {enable,disable,info,query} ...
can be used to track (#1971)stepuntilasm <asm>
will step through program instructions until a matching part of instruction string is found (#1798)break-if-taken <loc>
andbreak-if-not-taken <loc>
will setup a breakpoint on given location of a branch instruction which will stop the program if the branch was taken or not (#1799)plist ...
can be used to print linked lists (#1795, #1817)mmap ...
andmprotect ...
commands will invoke themmap
ormprotect
syscalls with given arguments in the debugged program- note: this works by assembling a shellcode for the syscall call, placing the code on current PC/IP address, executing the syscall and reverting back the register and memory changes made
thread
command to display threads informationhi
command to check if an address belongs to a glibc heap chunk (#1938)tips
to display tips about Pwndbg usagesigreturn <address>
to print sigreturn x86-64 frame (#1940)
Changed commands:
- Added
telescope --frame
to display stack frame information (requires BP and SP to point to the same memory region) (#1855) - Glibc heap commands now also print real chunk size (#1748)
- Added
spray --only-funcptrs | -x
flag to spray only the memory addresses where values point to executable memory pages (#1809) - Added
-A <N>
and-B <N>
flags tovmmap
to display N entries after/before the filtered page (#1810) - The linux kernel memory pages figured out by gdb-pt-dump can now be filtered in
vmmap
(they have unique names) (#1837) - Added new arguments/options to the
search
memory command (#1867) telescope
output can now show frame pointer offsets (#1925)distance <single-address>
now prints offset from memory page start address (#1926)- Added
stack -i | --inverse
to show stack in reverse order (#1978) - Added new positional argument to
cyclic
command to save its output to file (so it can later be used, e.g. asrun < input
) (#2009)
Detailed changelog (from git log)
- Print real size in heap command #1748 by @ntsleep in #1781
- Add
stepuntilasm
command by @mbrla0 in #1798 - Adds
break-if-taken
andbreak-if-not-taken
by @mbrla0 in #1799 - Fix #1805: clear stop caches on gdblib.bpoint.Breakpoint by @disconnect3d in #1806
- Update capstone to 5.0.0.post1: fixes #1554, #1419 by @disconnect3d in #1808
- Fix #1803: break_next_call: fix regex compilation by @disconnect3d in #1807
- Added
--only-funcptrs
feature to spray comand by @bog2n in #1809 - Add a
plist
command to print linked lists by @mbrla0 in #1795 - Fix glibc-fastbin-bug option of find_fake_fast by @SlidyBat in #1774
- Implement
-B
and-A
invmmap
by @feelfreelinux in #1810 - Remove support for Debian 10 by @disconnect3d in #1812
- Run CI lint only on Ubuntu 22.04 by @disconnect3d in #1813
- Fix tests status in README by triggering CI on push to dev branch by @disconnect3d in #1811
- Remove support for Ubuntu 18.04 by @disconnect3d in #1814
- requirements.txt: remove Python <= 3.7 support by @disconnect3d in #1816
- Rename chain command to plist (print list) by @disconnect3d in #1817
- review fixes for spray command + OnlyWhenRunning by @disconnect3d in #1819
- Fix golang check in dev-setup.sh by @bog2n in #1825
- config: change 'Def' to 'Default' by @disconnect3d in #1827
- heap_config: validate glibc version when 'glibc' param is set by @disconnect3d in #1826
- get_one_instruction: clear "cont" cache on mem/reg changed by @disconnect3d in #1828
- Added thread section to context by @bog2n in #1829
vmmap -A / -B
improvements by @feelfreelinux in #1830- add libc 2.12+ functionality for structs.py by @shenhavmor10 in #1823
- Add support for FreeBSD by @RHL120 in #1832
- vmmap: make linux kernel pages searchable via name by @disconnect3d in #1837
- gdblib.memory.write: revert cache-clear since its already fired by @disconnect3d in #1838
- emu/emulator.py: small code cleanup by @disconnect3d in #1839
- Update code to Python >= 3.8 by @disconnect3d in #1840
- code cleanup: use lexer.py from pwntools by @disconnect3d in #1842
- pacman: only install not-installed deps by @Xeonacid in #1845
- Enable thread context by default by @bog2n in #1844
- enhance decompiler compatible problem with rizin and radare2 by @Squirre17 in #1846
- Added more tips by @bog2n in #1852
- Fixed null thread name by @bog2n in #1850
- Drop support for gdb lt 9.2 #1854 by @dmur1 in #1856
- Warn user about unmet dependencies (#1791) by @kamil-s-solecki in #1853
- Add tips command (#1833) by @kowtom in #1851
- tips command: add -a alias for --all by @disconnect3d in #1857
- Add
telescope --frame
command #1195 by @ntsleep in #1855 - add portable pwndbg + package in: nix, rpm, deb, arch, alpine by @patryk4815 in #1843
- Bump cryptography from 41.0.2 to 41.0.3 by @dependabot in #1859
- lint.sh: use tools from .venv by @disconnect3d in #1860
- Fix nix release build by @disconnect3d in #1861
- flake.nix: use poetry2nix from nix-community by @disconnect3d in #1862
- avoid breaking pacman.conf if entries already exist by @fidgetingbits in #1869
- add try except around search memory by @fidgetingbits in #1868
- Fixes #1870 by @FalcoGer in #1872
- switch to an editable environment by @fidgetingbits in #1877
- show cmdline and cwd in procinfo by @dmur1 in #1879
- remove check_dependencies #1865 by @dmur1 in #1880
- Fix issues with pr 1856 by @dmur1 in #1881
- move
attachp
to be shown under "Start Commands". by @joshvarg in #1883 - Update to latest gdb-pt-dump by @PandaWill in #1882
- procinfo: fix embedded null byte in cmdline args by @disconnect3d in #1885
- patch_list: compact the from/to assembly display by @disconnect3d in #1884
- remove event wrapper class by @piotrzarycki in #1888
- Add new search arguments by @fidgetingbits in #1867
- add cachyos by @qrxnz in #1891
- fix infinite recursion and fail to read proc maps when set debug remo… by @fidgetingbits in #1893
- Fix lint issues in prompt.py by @disconnect3d in #1894
- Remove pacman partial upgrades by @danielepintore in #1895
- Fix duplicate pages in vmmap by @bog2n in #1896
- Partially address #175...
2023.07.17 packages (debian10-final, ubuntu18.04-final)
This is the 2023.07.17 release but which contains packages for various distributions (Debian-like using dpkg, RHEL-like using yum/rpm, Arch Linux and Alpine (.apk)).
The packages are totally self-contained: they include all what you need to run GDB+Pwndbg after installation.
They do not rely on any dependencies and are build in (hopefully) reproducible way using Nix package manager.
Please ignore the 'source code' attached, it is fr later commit than 2023.07.17. The packages were build from the 2023.07.17 version.
2023.07.17 (debian10-final, ubuntu18.04-final)
Here is the 2023.07.17 release. Thanks to everyone who contributed!
We would also like to honour Zach Riggle once again, who was a long time contributor and maintainer of Pwndbg.
Also please note that this release will be the last to support Python 3.6 and Python 3.7 (and so Ubuntu 18.04 and Debian 10).
TL;DR what this release brings
- The
setup.sh
now installs Python dependencies in a virtual environment created inpwndbg/.venv/
andgdbinit.py
sets appropriate paths so that the created virtual environment is used automatically (previously, we installed deps in the system's Python interpreter which could break users' setups) - New or improved commands:
- The
pwndbg
helper command can now filter commands list by category, e.g.:pwndbg -c heap
(categories are: heap, kernel, linux etc.) - Added
killthreads [<ids....>]
command to kill threads with given IDs - Added
slab contains <addr> [<addrs...>]
command to inspect Linux kernel heap (when debugging kernel) - Added
spray <addr> ...
command to spray memory with given values (instead of doingpi pwndbg.gdblib.memory.write(address, b'data')
) - Improved
got
command display and filtering - Multiple heap commands improvements (
heap
,vis_heap_chunks
optimized,find_fake_fast
,*bins
)- Optimized
vis_heap_chunks
command
- Optimized
telescope -r
now always displays the input address- Fixed
vmmap
for 32-bit kernels - Fixed
patch-list
andpatch-revert
commands - More AI clouds support in the
ai
command
- The
- Improved RISC-V support -- added branch prediction through Unicorn emulation
- Added basic heap heuristics for RISC-V and PowerPC
- Added
krelease
function that allows us to implement different behavior for different Linux kernel versions - Better glibc version detection
...and other bug fixes and improvements. See below for full changelog!
Full Changelog / What's Changed
- Set version to 2023.03.19 by @disconnect3d in #1633
- Fix setup.sh on MacOS due to gnu vs bsd sed by @disconnect3d in #1635
- Update tips.py with
info args
andset scheduler-locking on
by @disconnect3d in #1636 - Fix missing length in mprotect doc example by @Xeonacid in #1641
- Fix shfmt lint issue in setup.sh by @disconnect3d in #1642
- Fix the wrong type for
tcache_count
inmalloc_par
by @lebr0nli in #1648 - Fix wrong
MALLOC_ALIGNMENT
for powerpc by @lebr0nli in #1646 - Fix linux arm/aarch64/ppc(64) syscall abi by @Xeonacid in #1639
- Support riscv syscall and ABI; Fix riscv retval register by @Xeonacid in #1651
- Add some basic heap heuristics supports for riscv and powerpc by @lebr0nli in #1649
- Add types-request to dev-requirements.txt by @gsingh93 in #1652
- Add docs on adding commands and config options by @gsingh93 in #1507
- slab: add credit to slabdbg project by @disconnect3d in #1654
- Search GLIBC version in .rodata section of libc.so by @lebr0nli in #1656
- Use
store_true
argparse action on *bins commands by @CptGibbon in #1655 - Fixed a crash that caused formatting failure in readlink when qemu returns None as the pid. by @Squirre17 in #1644
- Fix the unused arguments of the
heap
commands by @lebr0nli in #1659 - Largebins size range tests for x64 & i386_big by @CptGibbon in #1658
- Add update mode for setup.sh by @Cnly in #1660
- Better
--verbose
flag descriptions for *bins commands by @CptGibbon in #1665 - CI: remove Ubuntu 18.04 from lint and tests builds by @disconnect3d in #1670
- Smallbins size tests for x64 & i386_big by @CptGibbon in #1669
- feature: Add
killthreads
command (closes #1580) by @alufers in #1581 - Resolve some
find_fake_fast
command issues by @CptGibbon in #1640 - Port pwntools asm into pwndbg by @Ignatella in #1384
- Add support for Arch Linux ARM in setup.sh by @alufers in #1672
- Corrected year in README by @dabrd in #1674
- add
krelease()
function by @theguy147 in #1673 - Added support for Anthropic's Claude LLM as a backend for the ai tool by @oblivia-simplex in #1661
- Update CONTRIBUTING.md by @disconnect3d in #1681
- Allow Garuda Linux install in setup by @AlEscher in #1680
- feat: use pytest for qemu-system tests by @theguy147 in #1679
- make qemu-system tests more customizable by @theguy147 in #1682
- Issue #1667 Display OS Information In Bugreport by @MinimalEffort07 in #1683
- Fix unit tests by @gsingh93 in #1685
- Add unit tests for which.py by @gsingh93 in #1686
- New lib/cache.py: make caching great again by @disconnect3d in #1671
- Add pwndbg.lib.cache test by @disconnect3d in #1691
- Fix and Improvements for ArchOps by @theguy147 in #1676
- Test more kernels by @theguy147 in #1684
- Optimize vis_heap_chunks command by @disconnect3d in #1678
- Switch from flake8 to ruff by @gsingh93 in #1696
- Fix enums from Python 3.11: use ReprEnum by @disconnect3d in #1700
- Increase killthreads timeout to 10s to fix CI issues by @disconnect3d in #1701
- Honour Zach Riggle in README by @disconnect3d in #1702
- Repair slab info command by @theguy147 in #1699
- Add heuristic to add executable base to vmmap in qemu-user by @peace-maker in #1695
- Fix stack.update caching bug by @disconnect3d in #1703
- ascii heap function by @Czarna1024 in #1708
- Fix test command procinfo by @Unknownsentinel193 in #1706
- Add
slab contains
command by @theguy147 in #1707 - Updated version.py for bugreport command to display more information by @Unknownsentinel193 in #1709
- Include opensuse-tumbleweed in setup.sh by @alexbradd in #1710
- Fix Ubuntu 22.04 CI build by installing libgcc-s1:i386 by @disconnect3d in #1716
- refactor: move slab business logic to gdblib by @theguy147 in #1711
- Make args an alias for dumpargs by @dmur1 in #1721
- By default remove the context backtrace f prefix #1288 by @dmur1 in #1727
- Filter commands by category by @theguy147 in #1726
- Add codecov.yml by @gsingh93 in #1720
- address translation only works with debug symbols by @theguy147 in #1723
- Add a test binary that has very long symbols by @dmur1 in #1719
- Add OnlyWhenUserspace Decorator #1459 by @dmur1 in #1729
- Support slab command for all available cpus by @theguy147 in #1725
- Update QEMU image download URL by @gsingh93 in #1731
- Cleanup heap decorators #1208 by @dmur1 in #1736
- Covert printf format strings to f-strings by @gsingh93 in #1735
- Add +10min (30min) to qemu-tests CI build by @disconnect3d in #1737
- Convert format strings to f-strings by @gsingh93 in #1738
- Add more type hints by @gsingh93 in #1743
- Upgrade dependencies by @gsingh93 in #1745
- More type hints by @gsingh93 in #1746
- Fix patch_list and patch_revert commands by @disconnect3d in #1750
- slab: show per-node partial slabs by @matrizzo in #1751
- Fix #1756: change cache ._reset() to .cache.clear() by @disconnect3d in #1757
- Fix banner width for TUI mode with horizontal split for cmd window by @ThomsonTan in #1752
- Fix vmmap for 32-bit kernels by @gsingh93 in #1739
- Update gdb-pt-dump by @gsingh93 in https://github.com/pwndbg/pwndbg/p...
2023.03.19
Here is the 2023.03.19 release. Thanks to everyone who contributed!
TL;DR what this release brings
- New or edited commands:
kbase
,kchecksec
,slab
- kernel debugging only commands to get kernel base address, checksec for kernel and list kernel slabsvalist
- dumps arguments of ava_list
structure on given addressai
- ask AI about the current debugging session (requires openAI API key)cunwatch
now operates on the index/number of expression instead of requiring the user to pass the whole expression to unwatchcyclic
- improved UX by adding nicer info/error messages- the
tls
command now leverages GDB's scheduler locking so now when it calls a function to obtain TLS address it won't allow any other target threads to run, which could previously cause issues on targets with multiple threads
- We added command categories and refactored the display of
pwndbg
help :) - Added support for riscv:rv64 architecture
- Lots of glibc heap commands fixes and improvements
- Better support for 32-bit and big-endian architectures
- Better heap heuristics
largebins
now display bin size ranges instead of indexesarena
displays thread idvis_heap_chunks
has now--all-chunks
to display all chunks- we renamed two flags in the
vis_heap_chunks
command (--naive
->--beyond-top
and--display_all
->--no_truncate
)
- It is now possible to display instruction opcodes in the disasm context by setting
set nearpc-num-opcode-bytes 9
- Fixes for vmmap recursion errors
- Fixes for Rust binaries debugging
- Support for Rizin
- Unicorn emulation is now disabled if
mmap(1GB, RWX)
fails due Unicorn Engine aborts on environments with low memory - Improved virtualenv detection and warnings
- Fixed message when locales are wrong: in fact, Pwndbg requires
LC_CTYPE=C.UTF-8
environment variable and notLC_ALL=en_US.UTF-8 PYTHONIOENCODING=UTF-8
as it previously suggested
What's Changed
- Fail tests if an error occurs by @gsingh93 in #1445
- Add ArchOps by @gsingh93 in #1444
- Make it easier to remove cwatch expressions by @gsingh93 in #1421
- Move some event hooks to hooks.py by @gsingh93 in #1431
- Start a env_parallel session to avoid argument too long errors by @gsingh93 in #1446
- Use RawTextHelpFormatter for more commands by @gsingh93 in #1448
- Add kchecksec command by @gsingh93 in #1441
- Add x86_64ArchOps by @gsingh93 in #1449
- Add kbase command by @gsingh93 in #1450
- Remove redundant struct.unpack formats by @gsingh93 in #1451
- Fix gdb-pt-dump exception when attaching to x86 QEMU by @gsingh93 in #1452
- Added command to list slabs by @gsingh93 in #1442
- Add paging_enabled function and OnlyWhenPagingEnabled decorator by @gsingh93 in #1454
- Cleanup command docstrings by @gsingh93 in #1461
- Annotate some vmmap methods with @OnlyWhenRunning by @gsingh93 in #1463
- Don't print aliases as commands in pwndbg output by @gsingh93 in #1460
- Better error handling in bugreport command when no command history by @gsingh93 in #1464
- Fix issue #1466 by @QueenEleanor in #1467
- Add mypy configuration to pyproject.toml by @gsingh93 in #1468
- Add safe type hints by @gsingh93 in #1469
- Remove dependency to
python-future
(#1250) by @hamarituc in #1470 - Automatically add types with pyannotate by @gsingh93 in #1471
- More type hints by @gsingh93 in #1472
- More type fixes by @gsingh93 in #1473
- Fix type issue in ida.py by @gsingh93 in #1474
- Upgrade dependencies by @gsingh93 in #1476
- Add support for command categories by @gsingh93 in #1477
- Add commands to categories by @gsingh93 in #1478
- Add slab info command by @gsingh93 in #1447
- Rename elfheader command to elfsections by @gsingh93 in #1481
- Fix reload command by @disconnect3d in #1491
- Fix #1457 - warn if monitor info mem is invalid by @disconnect3d in #1480
- Add commands to Linux category by @gsingh93 in #1483
- gdbinit.py: improve virtualenv detection and warnings by @disconnect3d in #1489
- gdblib/symbol.py: remove symbol autofetch by @disconnect3d in #1494
- Minor improvements (some of #1465) by @disconnect3d in #1493
- Fix #855: Rust binaries debugging by @disconnect3d in #1495
- gdb-tests/tests.sh: don't do make clean on each run by @disconnect3d in #1497
- Remove commands/gdbinit.py by @gsingh93 in #1499
- Add start command category by @gsingh93 in #1500
- Add commands to memory category by @gsingh93 in #1492
- Don't assign result of fetch_lazy by @gsingh93 in #1501
- Fix some easy type errors by @hauntsaninja in #1502
- Fix is_memory_mapped_file by @gsingh93 in #1503
- Refactor nearpc by @gsingh93 in #1498
- Implement contains for reg module by @gsingh93 in #1504
- Run lint CI job and Ubuntu 22.04 and 18.04 by @gsingh93 in #1505
- More type fixes by @gsingh93 in #1506
- pwndbg.gdb.regs type fixes by @gsingh93 in #1508
- Fix some misc type errors by @gsingh93 in #1509
- Fix memoize debug path by @disconnect3d in #1510
- Add gdbserver dependency to Ubuntu build by @CptGibbon in #1514
- Fix optimize color memoization by @disconnect3d in #1511
- Remove Arch.signed and Arch.unsigned by @gsingh93 in #1516
- Fix some type and pylint errors by @gsingh93 in #1515
- Type fixes by @gsingh93 in #1517
- Fix memoize type issues and enable mypy in lint script by @gsingh93 in #1518
- Update pylint config and fix lint issues by @gsingh93 in #1519
- Fix more pylint warnings by @gsingh93 in #1520
- Remove useless statement in procinfo.py by @gsingh93 in #1521
- cyclic command: improve UX by @disconnect3d in #1522
- Add valist command by @gsingh93 in #1524
- Improve cwatch formatting by @gsingh93 in #1525
- Improve hexdump collapse display by @disconnect3d in #1526
- requirements.txt: bump pwntools to 4.0.9 by @disconnect3d in #1527
- Update qemu test scripts and images by @gsingh93 in #1529
- Don't fail CI if codecov upload fails by @gsingh93 in #1532
- Finalize QEMU testing scripts by @gsingh93 in #1531
- TLS related enhancements by @lebr0nli in #1536
- Run QEMU tests on CI by @gsingh93 in #1533
- Support showing opcodes in the disassembly by @lebr0nli in #1537
- Bug fix for error handling of the heap commands by @lebr0nli in #1543
- Fix procinfo command (#1544) on QEMU targets and with abstract UDS by @disconnect3d in #1545
- lint.sh vermin: use -vvv --no-tips by @disconnect3d in #1552
- Fix #1534: disable emulation if mmap(1G,RWX) fails by @disconnect3d in #1546
- lint.sh: vermin -vvv instead of -vvvv by @disconnect3d in #1556
- Fix configfile by @gsingh93 in #1569
- Enhance the checks before accessing the memory for the heap heuristics by @lebr0nli in #1558
- gdbinit.py: fix message when locales are wrong by @disconnect3d in #1573
- Fix OnlyWithArch invocations (cymbol command) by @disconnect3d in #1574
- Fix #1572: fsbase/gsbase co...
2022.12.19
A new release is here :). Thanks to all contributors for improving Pwndbg!
TL;DR what this release brings
- New or edited commands:
kconfig
to obtain debugged Linux kernel configcymbol
to add/show/load/edit/delete custom structures written in plain Cmprotect
to set memory protections (the command was fixed as it was not working for some time)bins
andfind_fake_fast
were improvedcyclic
- the Pwntools'pwn cyclic
commmand was ported as a native command
- We improved the support for debugging QEMU kernels and more improvements and new commands are incomming
- You can set Pwndbg to fetch vmmap info for kernels in three different modes, see
help set kernel-vmmap
- You can set Pwndbg to fetch vmmap info for kernels in three different modes, see
- Added support for heap commands for cases when libc debug symbols are not present. For this, certain heuristics regarding the code are used and as a last resort, the user can set addresses of heap related symbols to make the heap command work properly. See
heap_config
andhelp set resolve-heap-via-heuristic
for more information. - We improved coredump debugging (vmmap fetching)
- We refactored lots of code and more refactoring is incomming
- Lots of tests and CI targets were added to ensure we don't hit regressions
- And more... see the full changelog below
What's Changed
- Minor linter/formatter configuration changes by @gsingh93 in #1105
- support riscv:rv64 without capstone by @lonnywong in #1096
- Fix IDE's auto-complete support by @syheliel in #1106
- vmmap: use pwndbg.info.auxv instead of gdb.execute by @disconnect3d in #1107
- ArgparsedCommand: fix
help cmd
andcmd --help
behavior by @disconnect3d in #1108 - improve start and entry commands description by @disconnect3d in #1109
- Add smoke test by @gsingh93 in #1113
- Add dev-requirements.txt to Docker image by @gsingh93 in #1115
- Set security_opt to seccomp:unconfined in docker-compose.yml by @gsingh93 in #1116
- Some updates about Heap heuristics by @lebr0nli in #1075
- Build docker in CI by @gsingh93 in #1117
- fix errno command by @disconnect3d in #1112
- GDB Refactor [1/N]: Split arch.py and related files into lib/ and gdb/ by @gsingh93 in #1114
- Add lint.sh script by @gsingh93 in #1122
- GDB Refactor [2/N]: move some modules to lib/ by @gsingh93 in #1118
- Format shell scripts with shfmt by @gsingh93 in #1123
- fix #1111 errno command edge case by @disconnect3d in #1126
- GDB Refactor [3/N]: Split android into lib/ and gdblib/ by @gsingh93 in #1119
- GDB Refactor [4/N]: Split abi into lib/ and gdblib/ by @gsingh93 in #1120
- GDB Refactor [5/N]: Split regs.py into lib/ and gdblib/ by @gsingh93 in #1121
- GDB Refactor [6/N]: Move gcc.py into lib/ by @gsingh93 in #1124
- GDB Refactor [7/N]: Move some modules to gdblib/ by @gsingh93 in #1125
- Fix incorrect import by @gsingh93 in #1131
- GDB Refactor [8/N]: Split memory into lib/ and gdblib/ by @gsingh93 in #1128
- GDB Refactor [9/N]: Move strings.py and dt.py to gdblib by @gsingh93 in #1129
- GDB Refactor [10/N]: Move qemu.py and remote.py to gdblib by @gsingh93 in #1130
- GDB Refactor [12/N]: Move stdio.py to lib/ by @gsingh93 in #1133
- GDB Refactor [11/N]: Move elftypes.py to lib/ by @gsingh93 in #1132
- Linting/formatting improvements by @gsingh93 in #1138
- Add types for some modules in lib/ by @gsingh93 in #1137
- Remove unused imports by @gsingh93 in #1139
- Add support for formatting the code directly from lint.sh by @gsingh93 in #1140
- GDB Refactor [13/N]: Move argv.py to gdblib by @gsingh93 in #1141
- add type for
./pwndbg/lib
by @syheliel in #1135 - add color for modified registers by @syheliel in #1127
- Add
gdb.MemoryError
check to get_heap() by @CptGibbon in #1145 - fix distance command by @disconnect3d in #1146
- Add regression test for
find_fake_fast
command by @CptGibbon in #1147 - fix qemu vmmap showing coredump mappings by @disconnect3d in #1148
- Improve vmmap on coredump files by @disconnect3d in #1149
- add patch command by @disconnect3d in #1150
- Fix for android check in procinfo by @ntsleep in #1156
- Tests for procinfo command by @ntsleep in #1157
- Fix #1153 nextproginstr command by @disconnect3d in #1158
- Show arch and emulation status on disasm banner by @disconnect3d in #1160
- fix: mprotect command and add tests for it by @alufers in #1161
- Fix #1165: set context-clear-screen on resetting scrollback by @disconnect3d in #1166
- Show less error when trying to load a non-exist type by @lebr0nli in #1171
- silence heap_bugs.c build warnings by @disconnect3d in #1172
- Enhance heap with for static-linked binaries & remove typeinfo bloat by @disconnect3d in #1173
- Add Chunk class & template_heap_command by @CptGibbon in #1159
- Support starting the IPython interactive prompt with
ipi
command by @lebr0nli in #1170 - Upload codecov report only from Ubuntu22.04 by @miles170 in #1178
- Update
ipi
command by @lebr0nli in #1176 - Enhances
ipdb
by @lebr0nli in #1177 - search command: remove unused string optional arg by @disconnect3d in #1180
- add type for ./pwndbg/lib/ by @syheliel in #1168
- fix #1190: telescope -r with addr as count by @disconnect3d in #1198
- Integrate Chunk class into
malloc_chunk
command by @CptGibbon in #1184 - tips: add set show-flags on tip by @disconnect3d in #1200
- Fix disable_colors formatting & test ctx disasm showing fds by @disconnect3d in #1186
- add show-flags and show-compact-regs to ctx regs banner by @disconnect3d in #1201
- remove defcon.py by @disconnect3d in #1203
- bugreport command: use code listings by @disconnect3d in #1204
- Delete .sublime-settings by @disconnect3d in #1206
- leakfind should default to $sp by @amoghrajesh in #1218
- Add
malloc_chunk
command test by @CptGibbon in #1214 - Make the heap heuristic compatible with new heap code by @lebr0nli in #1217
- Update README with GDB build steps by @disconnect3d in #1220
- fix #1221: ipi command multi-line inputs by @disconnect3d in #1222
- Make
CStruct2GDB
supportgdb.types.has_field()
by @lebr0nli in #1224 - Cleanup requirements and run full setup in lint CI job by @gsingh93 in #1230
- Add --shell argument to pwndbg command by @gsingh93 in #1233
- Add
malloc_chunk
command tests for heuristic heap by @CptGibbon in #1234 - Split heap tests into their own files by @gsingh93 in #1235
- events.py: remove unused Pause class by @disconnect3d in #1223
- Fix #1197: dont display ctx on reg/mem changes by @disconnect3d in #1239
- Load commands and gdblib explicitly in init.py by @gsingh93 in #1243
- GDB Refactor [15/N]: Move stack.py to gdblib/stack.py by @gsingh93 in #1244
- GDB Refactor [16/N]: Move tls.py to gdblib/tls.py by @gsingh93 in #1245
- GDB Refactor [17/N]: Move net.py to lib/net.py by @gsingh93 in #1246
- Cleanup load_gdblib() by @gsingh93 in #1248
- Cleanup dependencies by @gsingh93 in #1251
- Remove unnecessary imports...
2022.08.30
A new release is here :). Thanks to all contributors for improving Pwndbg!
TL;DR what this release brings
- New commands or new flags:
attachp [pid | process name | device file]
to attach to process by pid/name/device file,setflag
to set CPU flags register values,telescope --reverse ...
to see memory before a provided address,heap_config
to set heap commands configuration,
- Better support for heap debugging without symbols:
- It is now possible to make Pwndbg determine the addresses of heap symbols when they are missing; also this is going to be improved further soon,
- If symbols cannot be found,
heap_config
can be used to configure symbols addresses, - We now define a
$heap_base
convenient variable,
- better kernel debugging support - we use gdb-pt-dump to dump memory map information which should be much faster than the previous solution of parsing
monitor info mem
information, - better support for coredump debugging, mainly its vmmap display - we now parse what we can to get that info (btw GDB could improve on generating core dumps as well, see GDB-bugzilla#29508,
- we now display file paths based on
/proc/$pid/fd/$fd
of opened files when showing the arguments of POSIX file APIs (open, read, write, close etc.) in the disasm view, - we now display tips when Pwndbg is launched (can be disabled with
set show-tips off
added do~/.gdbinit
) - better support for virtualenvs - though, we display a warning that this may not work as expected (due to C libraries dependencies like libffi-dev etc)
- more tests and improved CI as we now test on Ubuntu 18.04, 20.04 and 22.04,
./tests.sh
now has[<filter-tests-names>] [--pdb]
arguments,
- ...and lots and lots of fixes!
What's Changed
- Add fortified function signatures by @AetherBreeze in #998
- Ignore non utf-8 characters in the source code by @lonnywong in #1002
- Change year 2021 to 2022 in README.md by @simark in #1003
- Make pwndbg faster by @bet4it in #1004
- Show all registers of PowerPC by @bet4it in #1005
- Try with lowercase xpsr register first on ARM Cortex M/gdb 8+ by @wavexx in #1007
- Fix two bugs in /pwndbg/commands/context.py by @dev2ero in #1012
- Bump Unicorn Version to 1.0.3 by @Mez0ne in #1015
- Display symbol name for computed disasm address by @galkinvv in #1016
- Fix installation error on osx by @Pribess in #1017
- fix splitmind compatibility issues from PR #1012 by @jtpereyda in #1023
- Create
setflag
command by @dgmcdona in #1027 - added docker-compose and instructions how to run tests there by @hbrylkowski in #1032
- Add gp register to MIPS by @bet4it in #1025
- Freeze requirements by @hbrylkowski in #1033
- Try fs/gs_base registers before ptrace'ing by @lebr0nli in #1030
- update unicorn to 2.0.0 by @disconnect3d in #1034
- [#1035] Use virtualenv when available by @viciu in #1037
- Show tip of the day at the startup by @hbrylkowski in #1036
- merge hack-pt-dump branch to dev by @lonnywong in #1022
- colorful tip of the day by @disconnect3d in #1046
- nearpc: convert pc to pointer by @l4rzy in #1048
- Remove Python 2 legacy code by @ivellios in #1052
- Add $heap_base variable after running the heap command by @gsingh93 in #1051
- fix context showing unexpectedly on first command by @lonnywong in #1042
- Fix aarch64 regs display by @arcz in #1054
- Add tip about $heap_base to tips.py by @gsingh93 in #1053
- Fix context args crash on missing instruction by @arcz in #1055
- Fix xor and memfrob by @artcz in #1057
- Add support to use heap commands without debug symbols by @lebr0nli in #1029
- Adds documentation for debugging with PyCharm by @overfl0 in #1058
- Remove shell commands registration by @disconnect3d in #1064
- Improve search --next speed and add --trunc-out flag by @disconnect3d in #1066
- Replace with IDA 7.x API by @akiym in #1024
- Revert "Remove shell commands registration" by @disconnect3d in #1073
- small refactor of vmmap module by @disconnect3d in #1078
- Fix coredump debugging by @disconnect3d in #1079
- Avoid bare catch-all except blocks by @Arusekk in #1080
- Fix test runner script for parallel make builds by @gsingh93 in #1083
- Refactor heap code by @gsingh93 in #1063
- Revert "Refactor heap code" by @disconnect3d in #1084
- fix vis_heap_chunk test on CI? by @disconnect3d in #1086
- Fix heap test binaries build by @disconnect3d in #1087
- tools: change zig to install from a tarball (fixes: #1088) by @alufers in #1089
- Make ZIGPATH configurable and provide defaults by @artcz in #1090
- Remove QuietSloppyParsedCommand once and for all by @disconnect3d in #1091
- Fix zig not being installed when installed system-wide by @alufers in #1093
- tests.sh: add [filter] and --pdb by @disconnect3d in #1092
- Add support for telescope to show previous addresses #1047 by @ntsleep in #1094
- Minor test cleanup by @gsingh93 in #1099
- Update CI to test 18.04, 20.04, and 22.04 by @gsingh93 in #1100
- Add black to CI by @gsingh93 in #1101
- black all da code by @disconnect3d in #1103
- Fix PEP8 violations and add flake8 to CI by @gsingh93 in #1102
- fix #1098: dX cmds trunc out on x86 binaries by @disconnect3d in #1104
New Contributors
- @AetherBreeze made their first contribution in #998
- @simark made their first contribution in #1003
- @wavexx made their first contribution in #1007
- @dev2ero made their first contribution in #1012
- @Mez0ne made their first contribution in #1015
- @galkinvv made their first contribution in #1016
- @Pribess made their first contribution in #1017
- @jtpereyda made their first contribution in #1023
- @dgmcdona made their first contribution in #1027
- @hbrylkowski made their first contribution in #1032
- @lebr0nli made their first contribution in #1030
- @viciu made their first contribution in #1037
- @l4rzy made their first contribution in #1048
- @ivellios made their first contribution in #1052
- @artcz made their first contribution in #1057
- @overfl0 made their first contribution in #1058
- @alufers made their first contribution in #1089
- @ntsleep made their first contribution in #1094
Full Changelog: 2022.01.05...2022.08.30
The 2022 release
Commits included:
96d3d5a (HEAD -> dev, tag: 2022.01.05) Set docs version to 2022.01.05
eec6f74 (origin/dev, origin/HEAD) Use `add-symbol-file` correctly.
439b660 added pylintrc file for standarized linting
cddbcb5 Fix search bug in kernel mode
6d2b6c6 .
5a39da7 moved block to source gdbinit
5844257 removed source line
a1c9d09 added little blurb for endeavourOS
0e45524 added command to source gdbinit.py
8b05953 Fixed multiple alignment issues of compact register view
38c38aa Fix typos
2616e70 Updated permissions for Docker container
1cc12ad Added devcontainer configuration for VS Code to directly develop inside Docker container
84e783a Ignore printing vertical tabs in vis_heap_chunks command
d348c74 Update emulator.py
9448cf5 Fix error message on interrupts
5c0627d Update pwndbg/glibc.py
e0e32dc fix ending of chain
bd7c3aa add test for heap bins
94eea64 safe-linking: use __libc_version when debug symbols loaded
09f2cb6 Add safe-linking support
95e3bb0 Fix lint
0ec3180 Hopefully fix windbg commands tests on CI
9636331 CI: show installed packages
1d70e14 Fix #932,#788: fix command parsing
d861d6e Skip attachp tests when cant attach
eee5dbc Remove Py2 class object inheritance
ef86a5c Remove shebang and coding lines
89b2df5 Remove incorrect i386 regs: dil/sil/spl/bpl
9a17798 Speedup emulator by disabling debug formatting when not debugging
270fef3 Remove redundant disasm.is_call function
af41986 Bump capstone to 4.0.2
e239e9c Hopefully fix recursion error
c8c9e3f Add Codecov
9c8df00 Add basic coverage testing
3583b57 fix(tempdir): use safe and unpredictable cachedir location
1c63382 Do not sort auxv, use the implicit order
526b3ea Hopefully fix CI tests
b203d53 SLES/OpenSUSE: enable debugging repo before installing
6fd42dd Add attachp command and tests for it
1e28920 Stop skipping tests
34f9535 Fix isort
4439446 Maintain backward compatibility with Python < 3.10
07b7c75 Migrate to 3.10 compatible abc usage.
b739733 fix typo in dd command
f11afe2 Fix get_highlight_source line splitting
8cc218f Adding p2p command - pointer chain search
a7a554f Add square brackets to vmmap's anonymous map names
648c7f0 Fix heap unprinted messages
e2c899e Fix isort lint import issues
00e94a9 Fix unprinted 'Unknown register' context warning
8975d42 Better pwndbg.commands.OnlyWithFile error for QEMU targets
c294ede pwndbg.file.get_file: better warning message
32cdc10 piebase, breakrva: print error on failures
71291d8 Fix vmmap_load on remote targets
The 2021 release
The 2021 release, which contains many fixes & some enhancements.
Thanks to all contributors!
TL;DR git log since last release:
a79c85b (HEAD -> dev, tag: 2021.06.22, origin/dev, origin/HEAD) Update links to use Discord
668e53f Fix xinfo used with symbols that are function pointers
8db8f4d fix: update_length() raise exception in some cases
30d6745 Make brva alias accept same args as breakrva
aa25aac fix(disasm,emulate): support mips32r6
44471df fix(emulate): refix emulate, let it works correct on unicorn-1.0.2rc1 ~ unicorn-1.0.2
99a5ef3 fix exception raised by cs.syntax when debugging mips binary
5389eb6 fix(emulate): let `emulate` works on unicorn-1.0.2rc1 ~ unicorn-1.0.2
87da998 fix(telescope): also unroll buffer if last line is skipped
05036de fix(telescope): avoid superfluous whitespace after register column
75b4249 feature(telescope): reduce cognitive load by adding skip count label
baf3fe7 feature(telescope): option to set min repeating values before skipping
14325af chore: clean up unused imports
a8c2fb5 fix(ui): fix display of addrsz to be hex formated
a5c9738 feature(radare2): add r2pipe command to execute stateful radare2 cmds
5d0441b feature(shell): put 'pwn' into allow list for pwntools
56d1fac chore(profile): extend test binary so unicorn engine shows more code flow
f1aa0c8 feature(profile): use a simple module based approach to define profiles
fbfd47f fix(profile): accept any valid location for pyprof2calltree
87bf6ac chore(ghidra): simplify logic and clean up code flow
707fe12 chore(ghidra): use memoize feature to cache r2pipe handle
44770fd fix(ghidra): handle PIE base address when opening the r2pipe
71ca721 feature(ghidra): use configurable code prefix marker for line indicator
a100d87 fix(ghidra): make if-no-source condition work as expected
6354fdc fix(ghidra): avoid crash if we try to decompile a faulty addr/func
e8b5124 chore(ghidra): modularize ghidra functions into utils and commands
b036575 feature(radare2): add argument to set base when loading for PIE (#897)
cd3cbf3 Update README to show more modern supported Linux versions (#885)
00c9740 use_info_auxv() : change regex (#894)
96df189 Changed register list to use precomputed tuples (#866)
cd0cd82 Fixed bug when the GDB is debuggin an architecture arm-eabi (disassembly-flavor). (#889)
4d213a1 Fix #881 (#883)
ae6f25a Fix #858 (#877)
26a18f1 Remove quotes from command option interpolation (#876)
bf49bf8 Unit test fix (#868)
5639589 Remove unimplemented dlmalloc (#874)
c31c720 docs: fix simple typo, divison -> division (#870)
f74aa34 The disassembly flavor is hard-coded. It does not change from Intel to AT&T (#860)
304bf26 Improved the number of Runs/Layers in the container. Upgraded Ubuntu and install GoLand to run the tests. (#862)
cc92959 Added comment command (#857)
812278b Allow return offsets and use it for 'start' method. (#864)
bde3637 added fix for i386 libc6-dbg package. (#859)
29f962c ropgadget: fix path export. (#854)
cfe93ab fix for ubuntu 20.04 (#850)
979d330 Fixes #841
30c816b Moved filename to the end of the command (#842)
ea11f86 Add basic i8086 support (#835)
f096be7 Compact, [big-endian] hexdump (#839)
779634a fix prev chunk size check (#837)
9250cc5 Compact register list for context view (#830)
7690b60 Fixed bug: bins gets the wrong pointer offset (#832)
d626db1 add config context-backtrace-lines (#831)
b209c2b Added installation configuration for Gentoo (#820)
a9c43ed In setup.sh, remove installation of python2 for apt (#828)
487caa1 Fix #814: better aslr output (#818)
301012a Py3k (#817)
ccd8f76 Remove travis (#816)
ce2266e Add GitHub Actions support (#809)
15b11c7 Add Dockerfile for easier dev (#815)
96716ce Fix mprotect failing on py2
2020.07.23
This release brings a lot of fixes and improvements and a new mprotect
command that injects/calls the corresponding syscall (x64/x86 only for now).
Thanks to all contributors!
Detailed commit log
- fa326d3 - Fix disasm call target display when symbol is known (#801)
- 9c60b62 - arch.py: remove unused instruction (#800)
- 21319d3 - Add repeat mode dX commands (#791) (#799)
- 79140e3 - Fix dqs windbg command (#798)
- d088019 - Update .travis.yml: trusty->bionic (#796)
- b5775f7 - Fix typo in exception-verbose parameter
- 64f75c9 - vmmap command: fixes #795 - usage w/o argument
- f543205 - vmmap command: show offset for single addresses (#795)
- 8c601c4 - Fix typos (#787)
- 5efff78 - return only valid arenas (#784)
- af0b065 - 2*ptrsize mismatch (#783)
- 970ac22 - Delete dead code in regs.py (#779)
- 7bad305 - Determine register sizes dynamically, do not assume ptrdiff width (#775)
- a1b2b03 - Fixes #777 - missing pyelftools program header name (#782)
- 606eae0 - Update regs.py (#780)
- 744aa22 - Fixes #770 - broken vmmap aliases (#778)
- 1cd9874 - Use qemu.root() instead of a hardcoded path (#774)
- 5b9a42a - Fix find_fake_fast error on older gdb version (#760)
- b361bda - #664 mark changed registers (#756)
- 016326f - Update issue templates (#776)
- 677dfa2 - Changes in dependencies needed for Ubuntu, starting from scratch. (#763)
- 609284c - support for xbps install (#753)
- f90db72 - chunk printing to malloc_chunk cmd (#751)
- 5062e4a - Fixes #749 - stop showing pc marker in disasm loops (#750)
- ac7fb64 - mprotect command injecting mprotect syscall. (#740)
- d3ec217 - fix for ubuntu 20.04 (#748)
- 2a09b30 - Fixes #726 (#747)
- e3b910c - Try heap (#744)
- 4281583 - Update heap implementation (#728)
- fbd2bb3 - Fixed alignment bug in vis_heap_chunks command (#739)
- 3cf9b31 - Added suppor fot opensuse (#734)
- 0cdcd6f - Fixed misprint 'distibuted' --> 'distributed' (#733)
- d4a6ff4 - Fix command description format (#727)
- b1beacf - fixes #660, can not get correct arm64 context (#724)
- 5849d27 - [WIP] Feature: show ghidra decompiled code in context (#715)
- ab1e091 - rename ctx-watch -> ctx-unwatch (#725)
- 5c67072 - Enhance find_fake_fast (#721)
- 798bcb6 - Fix inaccuracies in vis_heap_chunks() (#708)
- a18e751 - [WIP] Context watches expressions (#711)
- 80e3959 - Don't use top chunk heuristics (#712)
- c8a846e - Replace malloc initialization heuristics (#713)
- 08a78ad - Remove temp files and dir when exit (#720)
- 64ca9a6 - Fix decompile error (#716)
- c46417f - Remove useless cat from setup (#717)
- d2fc367 - Happy new year 2020 (#718)
- f2c0efc - Per section context output (#697)
- 9aef04b - Add line indicator in decompile result (#714)
- cc0c90a - Fix vmmap crash when PG is disabled (#709)
- ca649da - Fix switching to remote debug caching bug #707
- 8cbb863 - Update init.py (#703)
- 355c09e - command: support alternatives including sub command wrapper like pwn (#701)
- ecae891 - fix spelling errors (#699)
- 829f36a - Improve probeleak command (#698)
- b2f7f90 - split inode_objfile at most once to fix #695 (#696)
- e650f92 - adding support for clear linux (#694)