Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command: support alternatives including sub command wrapper like pwn #701

Merged

Conversation

anthraxx
Copy link
Member

command: support alternatives including sub command wrapper like pwn

Additionally speed up the checksec logic by removing the --version
check. Simply try to shell out and use the first working option variant
as we can't easily detect the different available alternatives in a
bulletproof way.

This implementation allows to use the sub command wrapper 'pwn' to call
checksec in case pwntools has been installed using --only-use-pwn-command

To unconditionally unify the usage, the functions cmd attribute stores
the base command to execute in form of a list that can be used to
concatenate an array of options against it and pass the final list to
call_cmd

@anthraxx anthraxx force-pushed the feature/checksec-alternative-pwntools branch from bde67b8 to e81aacb Compare January 29, 2020 01:01
@anthraxx
Copy link
Member Author

welp, rip CI, i need to figure out what that cryptic test mismatch is and why the test binaries fail horribly on the newer travis ubuntu. Maybe @disconnect3d has a hint?

@zachriggle
Copy link
Contributor

zachriggle commented Jan 29, 2020 via email

@disconnect3d
Copy link
Member

@anthraxx um, that's weird.. maybe some ld.so/libc breaking change?

Sounds like we should recompile the binaries.

@anthraxx
Copy link
Member Author

@disconnect3d yeah looks like that, i was first confused because it reads like travis creates those, but we seem to store them in the tests directory. Can you look into recompiling them against xenial?

@disconnect3d
Copy link
Member

disconnect3d commented Jan 29, 2020

@anthraxx Will do, let's skip them for now

@disconnect3d
Copy link
Member

Hmm maybe we should introduce the change to xenial in another PR?

@anthraxx anthraxx force-pushed the feature/checksec-alternative-pwntools branch from e81aacb to 5fc1925 Compare January 29, 2020 12:59
@anthraxx
Copy link
Member Author

@disconnect3d yes, i just tried to fix the CI :D pushed without

Additionally speed up the checksec logic by removing the --version
check. Simply try to shell out and use the first working option variant
as we can't easily detect the different available alternatives in a
bulletproof way.

This implementation allows to use the sub command wrapper 'pwn' to call
checksec in case pwntools has been installed using --only-use-pwn-command

To unconditionally unify the usage, the functions cmd attribute stores
the base command to execute in form of a list that can be used to
concatenate an array of options against it and pass the final list to
call_cmd
Lets try a third available version of checksec as the lowest order
variant in our cascade that works by only passing the target file
without additional specifier.
@anthraxx anthraxx force-pushed the feature/checksec-alternative-pwntools branch from 5fc1925 to 1db95f9 Compare January 29, 2020 13:35
@disconnect3d disconnect3d merged commit 355c09e into pwndbg:dev Jan 29, 2020
@anthraxx anthraxx deleted the feature/checksec-alternative-pwntools branch March 30, 2021 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants