* Add offsets to symbol names in LLDB
* Disable context line reservations if colors are disabled
* LLDB: More aggresively verify memory writes
* LLDB: Add support for disabling ASLR
* Add `-a` flag to `plt` command to show all symbols
* Start shellcode execution at next aligned instruction address, instead of current PC
* Improve execution speed for the `nextproginstr` command
* When resolving address expressions in windgb commands, try resolving as symbol firt
* LLDB: Relay exceptions from commands
* LLDB: Capture stderr in addition to stdout when capturing command output
* Move disabling of line reservations to LLDB test host
* Update docs
* recoverying from rm -rf
* refactored kconfig
* collapsing merge history
* cleaning up
* refactored out buddydump and slab type helpers
* improving bud and slub
* improved arch specific symbol handling
* improved handling of vmemmap and vmalloc bases when symbols do not exist
* misc
* doc
* properly naming kernel symbol files
* try except for cases where ptrace_scope is enabled
* fixing test
* clarify offset extra message
* clarify free and avail slots in ng-explain
* clarify hdr reserved == 7
* fix up donated group message
* fixup is_mmaped() check
* make ng-ctx lookup more strict, better UX
* fix our ctx reference becoming stale
* simplify class Mallocng init code
* fix edge case in ng-find
* change shallow=True to always get the outermost group, instead of the first group hit
* add missing type annotations
* ng-metaarea to dump meta_area objects
* ng-ctx: command to dump the __malloc_context object
* autogen docs
* properly bail if we cant find the __malloc_context
* take the p var out of `from_start`
* allow ng-find to return free/avail slots
also pulled out Mallocng.find_slot which returns the Slot instead of just the address
* better slot_state calculation, print it with ng-slot*
* propagate group/meta info when going through find
* add GroupedSlot to propagate find_slot information
* show GroupedSlot data to user when local reading fails
* gate the search behind a config option
* sanely handle insane slots
* use alt values for some meta fields
* get rid of set_padding
* add extra line for visual clarity
* autogen docs
* fix extra alignment
* Add --show-all flag to cymbol to list all custom structure names
* Fix: Apply ruff formatting to cymbol.py
* Fix: Regenerate cymbol docs for --show-all flag
---------
Co-authored-by: parrot <parrot@localhost.localdomain>
* detect the location of __malloc_context
* MallocContext class
* MetaArea class
* implement Mallocng.containing
* traverse nested groups
* add mallocng-find command
* fixup rebase
* add --shallow option to ng-find
* add --metadata option to ng-find
* add --all to ng-find
* autogen docs & lint
* fix from_start() calculation
* make code more portable by getting rid of magic numbers
* update 'belongs to stack' check
* Mallocng.secret becomes bytearray
but MallocContext.secret stays an int because we will be dumping it
* value -> values + move before loop
* fix secret offset
* get rid of hardcoded struct sizes
* use helper function for extracting ints
* add signed int typeinfo and memory util
* constructing the mallocng types
* cleanup a bit
* mallocng-user-slot
* print meta and group with slot
* ng-meta and ng-group commands
* handle corrupt data structures cleanly
* extra uslot annotations
* support multiple lines of extra
* group size corruption check, bit more annotation
* print both meta and group on ng-group and ng-meta
* fix pretty print to use colored_ljust
* fix for lldb; inferior must be loaded for aglib
* autogen docs
* fixup rebase
* ng-uslot -> ng-slotu
* fix idx calculation edge case
* hex() -> :#x
* str(e) -> e
* precalculate strings in PropertyPrinter::add
* lint
* fix perf issues
* add signed int typeinfo and memory util
* constructing the mallocng types
* cleanup a bit
* mallocng-user-slot
* print meta and group with slot
* ng-meta and ng-group commands
* handle corrupt data structures cleanly
* extra uslot annotations
* support multiple lines of extra
* group size corruption check, bit more annotation
* print both meta and group on ng-group and ng-meta
* fix pretty print to use colored_ljust
* fix for lldb; inferior must be loaded for aglib
* autogen docs
* fixup rebase
* ng-uslot -> ng-slotu
* fix idx calculation edge case
* hex() -> :#x
* str(e) -> e
* precalculate strings in PropertyPrinter::add
* lint
* Implements kdmesg for Linux kernels 5.10+.
* Minor optimizations and fixes to kdmesg.
* Fix lint errors
* Add test_command_kdmesg() to test_commands_kernel.py to test kdmesg.
* Fix lint errors
* Add docs
* Docs
* Improved documentation
* Lint fixes
* Improve documentation
* Fix lint errors
* Add functionality for -T, --ctime argument to print time in human readable format
* Fix lint errors
* Docs update
* Add test for -T arg in kdmesg
* Fix lint errors
* Fix -T arg to reflect current time, not offset
* Fix lint errors
* Bugfix for older versions of the kernel
* Fix lint errors
* Error checks
* Fix lint errors
* Test fix
* Fix lint errors
The order of the context section windows in the pre-configured pwndbg layouts didn't match the order in which they are drawn in the CLI context output as specified by the `context-sections` config. This caused glitches while rendering the section titles.
This is a workaround for the current TUI layout and the context-sections order. If the order is changed later, it might break again.
Fixes#3045
* page walks
* implemented pagewalk
* added pagewalk test
* improved testing / output
* added docs
* renaming
* actually adding the remamed file
* adding decoration for cpu arch
* Revert "adding decoration for cpu arch"
This reverts commit 84aa120f68.
* added arch check for pagewalk
* refactored pagewalk helpers
* improved pagewalk helper function signature
* refactored a bit more
* refactored a bit more
* removed changes to kernel/vmmap
* highlight pwndbg prompts in code blocks
* instant loading + thing that needs to be run on page load = pain
* better colors maybe
* new js in mkdocs
* better callback!
* change prompt color to green
* add short intro to configuration
* spruce up attachp message
* move notes and examples to appropriate sections, and assert that
* leakfind upd and add probeleak
* track-heap: report chunk size as hex
* add more commands to docs
* add comment to the profiler
* add docstrings for each top-level module
* highlight in profiler description
* fix attachp test
Large resolutions could cause the space allocated for the legend row to be too big causing it to show up with empty lines below.
Reduce the weight to 0 to make it as small as possible every time.
Fixes#3044
* pwndbg isn't an lldb plugin, mention bata24/gef, update sizes
* rephrase one readme line
* make what about... section more concise
* add a reference to original blog post
* lengthen description for dev-dump-instruction
* unbork go debugging page
* rename misc -> tutorials
* ida integration
* update context command description
* add video example to context docs
* add more clear separation in configuration docs
* proper capitalization on GDB, Pwndbg, LLDB in docs
* lint :P
* upd readme line
* fix tests and more clear grammar
* use `pwndbg` in gif instead of `gdb --quiet`
* update contributing/making-a-gif
* install uv and use it to create venv
* fix lint.sh to use all necessary deps
* make the test scripts use uv
* put uv into system path
* more clear setup.sh output
* don't look for uv in venv
* update the workflows to use uv
* lowercase pwndbg in upd message
* fix coverage invocation
* more robust test invocation
* pre-sync docs build
* don't pass venv to find_uv in [gdb/lldb]init
* uv sync before lint for more robustness
* make lldb work out of the box together with gdb
* don't uninstall dependancies when syncing
* modify scripts to use uv inside venv
* update workflows
* fix lint for scripts/
* update doc verifier workflow
* let nix magic check uv.lock
* use the venv as specified from venv in scripts so it works in docker
* add uv to project deps
* fix tests venv location
* revert uv venv lookup changes
* fix kernel tests
* fix nix
* work without venv, refactor code, packagers enjoy
* fix dockerfiles
* no posix; bash is my new best friend
* dont make venv in nix
* cleaned up paths
* Update gdbinit.py
* rebase: update link and uv lock
* Update lldbinit.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update scripts/common.sh
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update gdbinit.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fixup bad rebase (setuptools)
* don't use UV if the .skip-venv file exists
* document the PWNDBG_PLEASE_SKIP_VENV option
* fix nix devshell
* Update lldbinit.py
* extend -> append
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* cwatch: move example from features to source
* also mention syscall in dumpargs
* move FEATURES.md to docs/ and factor out stuff
* move integrations out
* move disasm+emu/ redo heap section
* pwndbg->Pwndbg, lldb, windbg, commands section, remove qemu-user section
* commands section
* clarify slab command
* cleanup: readme link, formatting, del extra file
* reduce some screenshot sizes
* fixup some markdown issues in improving-annotations.md
* tidy up dev notes
* Update docs/contributing/improving-annotations.md
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
* add a doc page about pwndbg mentions in the wild
* Update docs/misc/pwndbg_users.md
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
* Add the rebase address for elf command.
* linting
* linting
* Add file offset and rel address in memory. Build a table for display
* Modify the display information table. Add the coloring based output
* generate docs
* cant set the flags register if the process is not running
* add some asserts to prevent people from duplicating help lines
* rewrite the contributing guide on adding a command
* assert string in correct field
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* cleanly handle parameter differences
* cleanly handle command differences
* cleanly handle function differences
* add note about supported debuggers for commands and parameters
* reduce h1 bottom margin
* make it more obvious we only support functions in gdb
* autogen docs
* fixup buddydump
* uppercase debugger name in supported debuggers message
* update docs
* restructure development docs
* clarify that qemu-tests are actually qemu-system-tests are actually kernel tests
* finish index.md; factor out dev notes and writing tests
* cleanup 'writing tests' and loose links/anchors
* update .github files
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
* added/modified registers for kernel pwning
* added a RegisterContext class for more complex register context handling
* cleaned up register context selection and flag bits
* further cleaned up register context selection
* fixing None deref issue
* handling NoneType registers
* linting
* removed most of the extra register classes
* fully removed extra register classes in commands/context.py
* renamed var so that the linter doesn't confuse the var name with dataclass type name
* some comments on newly added classes
* fixed issues based on suggestions
* fixed issues when debug symbols are not present in x64 kernel
* added full buddy allocator debugging support and abstracted indent context
* added options for pcplist
* added dynamic arg checking and implemented __len__ for GDBValue
* added new ParsedBuddyArgs class and THBs support and improved overall handling
* handling function params using a class to cleanly pass values around such that can find free pages
* added help info
* added comments for newly added classes
* changed cmd name and added test
* added reference and linting
* added docs
* fixed typo
* fixed quotes
* supporting filter by numa node index
* actually filtering by node index
* add support for examples and notes
* port epilog usage to 'examples'
* enforce example/note location
* generate notes, examples and epilog in the docs
* disable search highlight
* autogen docs
* cleanup a bit
* expand and add examples to pwndbg convenience functions
* update usage descriptions in _gen_*
* refactor out some common logic
* implement function doc generation
* change some mkdocs defaults around to be better for the general case
* generate function docs
* cleanup some examples, help, and quote escaping explanation
* move fsbase and gsbase definitions (and use decorator)
* cleanup signature for fsbase and gsbase
* autogen functions
* type annotation
* fix ida and binja descriptions
* rename arguments, reorder docs for `help function` and assert convention
* add missing imports
* use inspect.getdoc instead of directly accessing __doc__
for more consistency across python versions
* regen docs with getdoc()
* rewire exit and lint
* let users know about convenience functions through the `pwndbg` command
* sys.exit instead of exit
* readme/docs changes in install methods
* tip
* tip
* tip
* cleanup installation instructions
* gdb/lldb is bundled
---------
Co-authored-by: k4lizen <124312252+k4lizen@users.noreply.github.com>
* make parameter scope an enum
* brighter code text, smaller top-margins for level 2 headings
* cleanup configuration logic, add assertions
* add script for generating configuration docs, move out some common logic
* move heap-config to pwndbg category since it should encompass other allocators as well
* docs update for heap-config move
* don't annotate code blocks with line numbers; add ability to use github flavoured markdown-type tasklist
* hand write configuration index, auto generate other docs
oops the auto-generated docs/commands/index.md change is in this commit
* fix bug of discarding help_docstring
* auto-gen docs for previous bugfix
* make parameter help's work with markdown
* autogen docs again
* add scripts to lint and lint them
* import missing stuff
* update docs-live script
* fixups
* update docs
* change branch-if-(not)taken command category to breakpoint
* more descriptive onegadget text
* add check for extraneous files in docs/commands, move the break command's files
* remove example since it renders wrong on the web doc
and the example itself is :(
* delete extra docs with gen
* make category a mandatory argument for commands
* cleanup doc generating script, add option to verify, allow handwritten edits
* regenerated docs
* lint
* add verification to ci
* add gdb to docs ci
* run verification from uv?
* run pwndbg xd
* fixup! regenerated docs
* fixup! regenerated docs
* what?
* test
* ensure consistent doc generation by fixing term width
* change marker text a bit
* index generation
* update comment on usage
* add comments in mkdocs, autogenerate nav
* reorganize the docs folder structure so they look good when the nav is autogenerated
* add really cool Source page
* fix edit, hide nav in setup, cleanup mkdocstrings config a bit
* fix doc CI build failure
* cleanup mkdocs.yml
* allow mkdocstrings to use linter
* remove empty files
* show parameters cleaner
according to the google style guide, we shouldn't specify types when they are in annotation, so using table which always shows types doesn't make sense
* Move docs dependencies into pyproject, install with poetry in GH action
* Remove old sphinx files
* Remove custom theme dir
* Hide navigation and toc on the blog page
* Remove fetch-depth from docs GH workflow
* Source venv before running mkdocs build
* Remove caching from docs GH workflow
* Remove python version in docs GH workflow