To view the latest of ScareCrow or to submit an issue, reference
<h1 align="center">
<br>
<img src=Screenshots/ScareCrow.png >
<br>
ScareCrow
</h1>
ScareCrow can target these DLLs and manipulate them in memory by using the API function , which changes a section of a process’ memory permissions to a different value, specifically from Execute–Read to Read-Write-Execute.
ScareCrow uses 1 of 2 methods to unhook
When executed, ScareCrow will copy the bytes of the system DLLs stored on disk in C:\Windows\System32\. These DLLs are stored on disk “clean” of EDR hooks because they are used by the system to load an unaltered copy into a new process when it’s spawned. Since EDR’s only hook these processes in memory, they remain unaltered. ScareCrow does not copy the entire DLL file, instead it only focuses on the .text section of the DLLs. This section of a DLL contains the executable assembly, and by doing this, ScareCrow helps reduce the likelihood of detection as re-reading entire files can cause an EDR to detect that there is a modification to a system resource. The data is then copied into the right region of memory by using each function’s offset. Each function has an offset which denotes the exact number of bytes from the base address where they reside, pro the function’s location on the stack.
To do this, ScareCrow changes the permissions of the .text region of memory using . E this is a system DLL, since it has been loaded into our process (that we control), we can change the memory permissions without requiring elevated pri.
#### Indirect Syscalls
ScareCrow loads the shellcode into memory by first decrypting the shellcode, which is encrypted by one of three encryption methods (outlined below). Once decrypted and loaded, the shellcode is then executed. Depending on the loader options specified, ScareCrow will set up different export functions for the DLL. The loaded DLL also does not contain the standard DLLMain function which all DLLs typically need to operate. The DLL will still execute without any issue because the process we load into will look for those export functions and not worry about DLLMain being there.
After
<p align="center"> <img src=Screenshots/Refreshed_Dlls.png border="2px solid #555">
KnownDLLs is a list of DLLs that are loaded by Windows during the system startup process. Because these DLLs are considered to be essential to the functioning of the operating system, they are cached to help reduce load times and impro when applications start up. KnownDLLs includes DLLs such as kernel32.dll, kernelbase.dll, and ntdll.dll.
Utilizing these KnownDlls, ScareCrow maps a copy of the DLL from \KnownDlls\<dllname> using a combination of NtOpenSection and NtMap to load it into the process's memory. ScareCrow doesn't load the entire DLL, rather it only loads in the .text section of the DLL (as this contains all the syscalls). From there ScareCrow use indirect Syscalls to call NtProtect and change the permissions of the dll's .text memory section to allow Scarecrow to o the EDR’s hooks before restoring permissions.
For more information you can read modexp's detailed article
Once these the hooks are removed, ScareCrow then utilizes custom System Calls to load and run shellcode in memory. ScareCrow does this e the EDR hooks are removed to help avoid detection by non-userland, hook-based telemetry gathering tools such as Event Tracing for Windows (ETW) or other event logging mechanisms. These custom system calls are also used to perform the call to remove the hooks placed by EDRs, described above, to avoid detection by any EDR’s anti-tamper controls. This is done by calling a custom of the syscall, NtProtect. ScareCrow utilizes Golang to generate these loaders and then assembly for these custom syscall functions.
During the creation process of the loader, ScareCrow utilizes a library for blending into the background after a beacon calls home. This library does two things:
Files that are signed with 代码 signing certificates are often put under less scrutiny, making it easier to be executed without being challenged, as files signed by a trusted name are often less suspicious than others. Most antimalware products don’t have the time to and these certificates (now some do but typically the common names are included in a whitelist). ScareCrow creates these certificates by using a go package of the 工具 limelighter to create a pfx12 file. This package takes an inputted domain name, specified by the user, to create a 代码 signing certificate for that domain. If needed, you can also use your own 代码 signing certificate if you have one, using the valid command-line option.
* ScareCrow also contains the ability to take the full chain and all attributes from a legitimate 代码-signing certificate from a file and copy it onto another file. This includes the signing date, counter signatures, and other measurable attributes. This option can use DLL or .exe files to copy using the clone command-line option, along with the path to the file you want to copy the certificate from.
#### OpSec Consideration:
When signing the loader with microsoft.com, using them against WINDOWS DEFENDER ATP products may not be as effective as they can the cert as it belongs to them. If you are using a loader against a windows product, possibly use a different domain.
* Spoof the attributes of the loader:
This is done by using syso files which are a form of embedded resource files that when compiled along with our loader, will modify the attribute portions of our compiled 代码. Prior to generating a syso file, ScareCrow will generate a random file name (based on the loader type) to use. Once chosen, this file name will map to the associated attributes for that file name, ensuring that the right are assigned.
<p align="center"> <img src=Screenshots/File_Attributes.png border="2px solid #555">
With these files and the go 代码, ScareCrow will cross compile them into DLLs using the c-shared library option. Once the DLL is compiled, it is obfuscated into a broken base64 string that will be embedded into a file. This allows for the file to be remotely pulled, accessed, and programmatically executed.
-configfile command-line option, ScareCrow will use these attributes and filename instead of the pre-existing ones in ScareCrow. The file main.json contains a sample template of what the JSON structure needs to be to properly work. Note whatever you use as the "InternalName" will be the file name.See for new :
To install them, run following commands:
Make sure that the following are installed on your OS:
Then build it
In addition, ScareCrow utilizes Garble for obfuscating all loaders.
Note: Several of the dependencies do not play well on Windows when compiling, because of this it is recommended to compile your loaders on OSX or Linux.
ScareCrow can also generate binary based payloads if needed by using the -Loader command line option. These binaries do not benefit from any side-by-side loading techniques but serve as an additional technique to execute shellcode depending on the situation.
-ldflags -H=windowsgui as this is highly signatured and classified in most security products as an Indicator of Compromise.If the -console command-line option is selected, ScareCrow will not hide the process in the background. Instead, ScareCrow will add several debug messages displaying what the loader is doing.
ScareCrow uses different templates to execute shellcode. To choose which template use the -Exec command-line option. These templates include:
* RtlCopy
* NtQueueApcThreadEx
*
* ProcessInjection
This option can be used with any of the loader options. To enable process injection, use the -injection ccommand-line option along with the full path to the process you want to use to inject into. When putting the path in as an argument, it is important to either surround the full path with "" or use double \ for each directory in the path.
AMSI is a Windows native API that allows Windows Defender (or other antimalware products) to interface deep in the Windows operating system and provide enhanced protection, specifically around in-memory-based attacks. AMSI allows security products to better detect malicious indicators and help stop threats. Since AMSI is native to Windows, products don't need to "hook" AMSI, rather they load the necessary DLL to gain enhanced insight into the process. Because of this, ScareCrow loads the AMSI.dll DLL and then patches, to ensure that any results from the scanning interface come back clean. Patching AMSI is default in all loaders, if you wish to not patch AMSI use the -noamsi command-line option to disable it in your loader.
ETW utilizes built-in Syscalls to generate this telemetry. Since ETW is also a nati built into Windows, security products do not need to "hook" the ETW syscalls to gain the information. As a result, to prevent ETW, ScareCrow patches numerous ETW syscalls, flushing out the registers and returning the execution flow to the next instruction. Patching ETW is now default in all loaders, if you wish to not patch ETW, use the -noetw command-line option to disable it in your loader.
Currently, these options only work for the parent process, if the -injection command-line option is used the primary process will patch AMSI and ETW but the injected process
-obfu ccommand-line option enables Garbles Literal flag during the compilation process. This replaces any golang library references and strings with a more complex , that resolves to the same value during run-time. This process takes a longer time to complete, resulting in a larger GO file. Once the file is compiled ScareCrow parses the newly created file, stripping out any GO string-based IOCs.开发语言:Go
Star 数:2885
该项目属于黑客技术方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕ScareCrow - Payload creation 框架 designed around EDR bypass.展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。
从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。
1. 下载源码压缩包,解压到本地环境。
2. 根据项目类型准备对应的运行环境与依赖。
3. 按照 README 中的步骤完成配置与部署。
4. 在隔离的测试环境中运行验证,避免影响生产系统。
本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。
| 资源标题 | ScareCrow - ScareCrow - Payload creation framework designed ar |
| 所属分类 | 黑客技术 |
| 发布作者 | admin |
| 发布时间 | 2026-10-05 22:11:37 |
| 下载权限 | 免费下载 |
| 附件数量 | 2 个下载链接 |
| 浏览次数 | 349 |
| 讨论数量 | 0 |
| 主题状态 | 正常讨论中 |