152334h / pwnscripts Goto Github PK
View Code? Open in Web Editor NEWVery simple script(s) to hasten binary exploit creation
License: GNU General Public License v3.0
Very simple script(s) to hasten binary exploit creation
License: GNU General Public License v3.0
As I outlined in a writeup:
So far I have tried
- Using LD_PRELOAD, which in the correct order (ld-linux.so first) will run the binary without crashing, although other issues still surface
- Running ./ld-linux.so, as outlined in the writeup. This has numerous side effects, including the actual binary getting allocated to an 0x7f.* page instead of the expected 0x5.* address
- LD_LIBRARY_PATH, which is finicky enough that I have not investigated it throughly in the past
Additional suggestions from #9 (comment)_
There are several ways to resolve this issue:
1. Set up a ubuntu18-04 docker environment
2. Use patchelf to change the path of interpreter and and library path
3. (The ugly way but the way i used most frequently other than docker) use vim to edit the binary directly to change the interpreter to ./ld.so and libc to ./libcccc (it's ./libcccc because it has the same number of letters as libc.so.6)
4. Run the binary as LD_PRELOAD=./libc.so.6 ./ld.so <challenge>. But this method will treat the challenge as a library so you end up with a different memory layout from normal execution
here is my code:
context.libc_database = '/home/gavin/libc-database/db'
there is an error when i run this code:
Traceback (most recent call last):
File "easywrite.py", line 5, in
context.libc_database = '/home/gavin/libc-database/db'
AttributeError: 'ContextType' object has no attribute 'libc_database'
i already use 'https://github.com/niklasb/libc-database' to download all libc , what should i do next?
You've got a lot of really great ideas implemented here, it would be really cool if you could try to port them to Pwntools and open some Pull Requests!
pwn
hasn't been updated since 2014
When running pwnscripts I get:
Traceback (most recent call last):
File "/home/sealmove/.virtualenvs/attack/lib/python3.9/site-packages/pwnlib/elf/elf.py", line 360, in __init__
self._populate_plt()
File "/home/sealmove/.virtualenvs/attack/lib/python3.9/site-packages/pwnlib/elf/elf.py", line 1041, in _populate_plt
res = emulate_plt_instructions(self,
File "/home/sealmove/.virtualenvs/attack/lib/python3.9/site-packages/pwnlib/elf/plt.py", line 52, in emulate_plt_instructions
log.debug("%#x -> %#x", pc, target)
File "/home/sealmove/.virtualenvs/attack/lib/python3.9/site-packages/pwnlib/log.py", line 388, in debug
self._log(logging.DEBUG, message, args, kwargs, 'debug')
File "/home/sealmove/.virtualenvs/attack/lib/python3.9/site-packages/pwnlib/log.py", line 292, in _log
msg = six.ensure_text(msg)
AttributeError: module 'six' has no attribute 'ensure_text'
>>> import six
>>> print(six.__version__)
1.10.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.