d4em0n / exrop Goto Github PK
View Code? Open in Web Editor NEWAutomatic ROPChain Generation
License: MIT License
Automatic ROPChain Generation
License: MIT License
currently we don't fully support caching actually, because AstNode in Gadget.memory_write_ast
and Gadget.regAst
can't be serialized using pickle, but other information except memory_write_ast and regAst can be cached and we must still rebuild memory_write_ast and regAst everytime when gadget is being solve.
JonathanSalwan/Triton#843
(venv) me@DESKTOP-123456:~$ ROPgadget --binary '/bin/ls' --string '.+\w+(.)?\\.+'
Strings information
============================================================
0x000000000001c7bf : ��G��BI�\��
0x000000000001c7f7 : ��G��BI�\��
0x000000000001ca32 : ��A��BN�\
Traceback (most recent call last):
File "/home/me/erop/venv/bin/ROPgadget", line 12, in <module>
ropgadget.main()
File "/home/me/erop/venv/lib/python3.8/site-packages/ropgadget/__init__.py", line 30, in main
sys.exit(0 if Core(args.getArgs()).analyze() else 1)
File "/home/me/erop/venv/lib/python3.8/site-packages/ropgadget/core.py", line 246, in analyze
return self.__lookingForAString(self.__options.string)
File "/home/me/erop/venv/lib/python3.8/site-packages/ropgadget/core.py", line 176, in __lookingForAString
print("0x{{0:0{}x}} : {{1}}".format(8 if arch == CS_MODE_32 else 16).format(vaddr, match.decode()))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb0 in position 12: invalid start byte
(venv) me@DESKTOP-123456:~$
Create a hexdump for it so that it can decode the string properly, for example (in core.py):
class Core(cmd.Cmd):
....
def __hexdump(self, s):
acceptable = string.printable[0:-6] # everything except \x00 and shit like that
results = []
for c in list(s):
if c in acceptable:
results.append(c)
else:
results.append(".")
return "".join(results)
...
def __lookingForAString(self, string):
....
try:
match = section["opcodes"][ref:ref + len(string)]
print("0x{{0:0{}x}} : {{1}}".format(8 if arch == CS_MODE_32 else 16).format(vaddr, match.decode()))
except UnicodeDecodeError:
match = self.__hexdump(section["opcodes"][ref:ref + len(string)].decode())
print("0x{{0:0{}x}} : {{1}}".format(8 if arch == CS_MODE_32 else 16).format(vaddr, match))
return True
This way if anything comes up thats not printable you can still see it without crashing the program
Hi!
We would like to make a comparison of existing ROP compilers on performing execve call with badchars option. Unfortunately, for now exrop's syscall and func_call don't have this parameter. As your tool supports badchars for other functions, we would be glad to provide more accurate results, if you add it for calls.
I would like to compare ROP compilers with bad chars support. Could you please add bad bytes parameter to syscall?
Hi!
We compared your tool with other existing ROP compilers. You can find results here.
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.