add ropper
This commit is contained in:
parent
b61a844605
commit
dc989748f0
5
.gitignore
vendored
5
.gitignore
vendored
@ -145,4 +145,7 @@ out/*
|
||||
rop.txt
|
||||
|
||||
# netcat
|
||||
netcat-0.7.1
|
||||
netcat-0.7.1
|
||||
|
||||
# Ropper
|
||||
Ropper
|
||||
|
@ -84,14 +84,17 @@ class ROPMakerX86(object):
|
||||
return p
|
||||
|
||||
def __write4bytes(self, address, data, data_addr, popDst, popSrc, write4where):
|
||||
# write address to dst
|
||||
p = pack("<I", popDst['vaddr'])
|
||||
p += pack("<I", address)
|
||||
p += self.__padding(popDst, {})
|
||||
p += self.__padding(popDst, {})
|
||||
|
||||
# write data to src
|
||||
p += pack("<I", popSrc['vaddr'])
|
||||
p += data
|
||||
p += self.__padding(popSrc, {popDst["gadget"].split()[1]: data_addr}) # Don't overwrite reg dst
|
||||
|
||||
# write src to [dst] (address pointed to by dst)
|
||||
p += pack("<I", write4where['vaddr'])
|
||||
p += self.__padding(write4where, {})
|
||||
|
||||
|
@ -113,4 +113,4 @@ if run:
|
||||
print()
|
||||
print(f"[ Run Program : ./{exec_file} {rop_file} ]")
|
||||
os.execv(exec_file, [exec_file, rop_file])
|
||||
|
||||
|
||||
|
7
init.sh
7
init.sh
@ -31,6 +31,13 @@ python3 -m pip uninstall --yes ROPgadget
|
||||
|
||||
cd /home/vagrant/cw && ./ropinstall.sh
|
||||
|
||||
python3 -m pip install --upgrade keystone-engine capstone filebytes pyvex
|
||||
cd /home/vagrant/cw && git clone https://github.com/sashs/Ropper.git
|
||||
cd /home/vagrant/cw/Ropper && git submodule init && git submodule update
|
||||
cd /home/vagrant/ && git clone https://github.com/Z3Prover/z3.git && cd z3 && python3 scripts/mk_make.py && cd build && make -j$(nproc) && sudo make install
|
||||
cp -R /home/vagrant/z3/build/python/z3 /home/vagrant/cw/Ropper
|
||||
|
||||
|
||||
sudo apt-get clean
|
||||
|
||||
echo ":)"
|
Loading…
Reference in New Issue
Block a user