Tag: metasploit

ctypes:投射字符串function?

我正在阅读文章在笔测试期间躲避反病毒的提示,并对给定的Python程序感到惊讶: from ctypes import * shellcode = ‘\xfc\xe8\x89\x00\x00….’ memorywithshell = create_string_buffer(shellcode, len(shellcode)) shell = cast(memorywithshell, CFUNCTYPE(c_void_p)) shell() shellcode缩短了。 有人可以解释发生了什么吗? 我熟悉Python和C,我尝试过阅读ctypes模块,但还有两个主要问题: 什么存储在shellcode ? 我知道这与C有关(在文章中它是来自Metasploit的shellcode,并且选择了不同的ASCII符号),但是我无法确定它是否是C源(可能不是)或源自某种编译(哪一个?)。 根据第一个问题,演员阵容中发生了什么?