生成漏洞利用模板
项目描述
描述
生成漏洞利用模板
我编写了这个模板生成器来编写我的漏洞利用。
安装
从安装pip
:
pip install expl
从源安装
- 从 repo 克隆它:
git clone https://github.com/AlirezaKm/expl
- 从源安装:
cd expl
pip install -e .
用法
$ expl
Usage: expl [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
both Generate a Template for Local and Remote
local Generate Local Template
remote Generate Remote Template
有关命令的更多信息
$ expl local --help
Usage: expl local [OPTIONS] FILE
Generate Local Template
Options:
-a, --arch TEXT Architecture of Executable File [default: x86_64]
--os TEXT OS of Executable File [default: linux]
-e, --endian TEXT OS of Executable File [default: little]
-l, --loglevel TEXT Log Level of pwntools [default: info]
-r, --realpath TEXT using realpath for Executable File [default: False]
--libc TEXT Address of LIBC
--heap Adding heap functions
-o, --output TEXT write to output
--help Show this message and exit.
为本地可执行文件生成模板
$ expl local vuln
#!/usr/bin/python2
from pwn import *
context(arch='x86_64', os='linux', endian='little', log_level='info')
def info(s):
log.info(s)
def exploit(r):
r.interactive()
if __name__ == '__main__':
r = process(['vuln'])
print(util.proc.pidof(r))
pause()
exploit(r)