Skip to content
Back to search

llvm-msvc-ex

Forked LLVM focused on MSVC Compatibility. This version is designed for windows users

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026. Its scripts were only partly scanned.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/killvxk/llvm-msvc-ex with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/killvxk/llvm-msvc-ex'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/killvxk--llvm-msvc-ex/badge.svg)](/listings/killvxk--llvm-msvc-ex)

HTML

<a href="/listings/killvxk--llvm-msvc-ex"><img src="/api/listings/killvxk--llvm-msvc-ex/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 208 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # `llvm-msvc`
  2. ### add Something for ollvm
  3. ```
  4. Original obfuscation passes including bogus control flow (-bcf), split basic block (-split), control flow flattening (-fla) and substitution (-sub) and MBA-substitution(-mba-subs) and Indirect-Call(-ind-call) and StringXor(-string-obfus) and ConstVarXor(-const-obfus) and VM-Flattening (-vm-fla).
  5. ```
  6. ### 感谢
  7. ```
  8. https://github.com/gmh5225, 日天同学的llvm-msvc让人心情激动
  9. ```
  10. ### 参考
  11. ```
  12. https://github.com/gmh5225/awesome-llvm-security#ollvm
  13. ```
  14. ### 更新
  15. 放弃TAG自动Build了,自己build吧
  16. ### 计划
  17. - [x] 在vm-fla-sym添加反符号执行和反内存追踪
  18. - [x] vm-fla-enc 对vm-fla的部分数据加密
  19. - ~~[ ] MBA-subs的bug~~
  20. - ~~[ ] 移植xVMP~~
  21. - [x] 在vm-fla-enc中使用间接全局变量访问
  22. - [x] vm-fla-level 0~7 8个处理等级 7最强,0最弱,默认7
  23. - [x] 弱鸡vmp加入
  24. - [x] 添加combine功能
  25. - [x] 添加fla強化 x-fla-enh
  26. - [x] x-full 功能,在function上使用vm-fla-level=7
  27. - [x] 字符串加密等相似加了combine
  28. - [x] 自定義分割合併 combine_func[tag_number] 模式
  29. - ~~[ ] x-var-rot 待处理~~
  30. - [x] 新功能
  31. - [x] custom-cc 参数传递和返回值的方法
  32. - [x] anti-ida, copy from some other ollvm codes
  33. - [x] self build
  34. - [x] -rich for lld-link option to build pe with rich-header
  35. - [x] -x-pic for -fPIC in windows (-mllvm -x-pic -mllvm -xpic-global -mllvm -xpic-memset -mllvm -xpic-memcpy)
  36. - [x] -x-vmobf (next vm,vm_runtime is not public)
  37. - [x] -x-mba (mba easy mode)
  38. - [ ] new functions
  39. [``llvm-msvc``](https://llvm-msvc.com) is a compiler based on ``LLVM`` that isn't limited by ``MSVC``. The aim is to provide the same experience as ``MSVC`` on Windows. You can use naked functions anywhere and also add custom support like obfuscation.
  40. <img width="732" height="697" alt="image" src="https://github.com/user-attachments/assets/743ba706-24c4-48f3-92af-cc2f9e9f055f" />
  41. ## Features:
  42. - Compatible with ``MSVC`` syntax as much as possible.
  43. - Almost fully compatible with ``SEH``.
  44. - Added some special Intrinsic functions(``__vmx_vmread``/``__vmx_write``).
  45. - Supports ``x64``/``ARM64`` windows drivers.
  46. - Supports ``AArch64`` android GKI drivers.
  47. - Allows naked ``X64`` inline asm.
  48. - Enables multiple cores compilation.
  49. - Supports ``/MP`` when precompiled headers are present.
  50. - Supports ``/GL`` (LTO optimization).
  51. ## FAQ
  52. ### Why do we make this project?
  53. - ``Clang`` follows the ``GCC`` standard, while ``MSVC`` has its own unique syntax.
  54. - Some of the code is pretty hacky. Can't submit it officially.
  55. - Waiting for the official fix takes too long.
  56. ### How to use llvm-msvc?
  57. - Install Visual Studio 2015-2022 (I recommend using 2022) along with WDK11.
  58. - Download and install llvm-msvc from the following repository [llvm-msvc_X86_64_installer-PDB.exe](https://github.com/backengineering/llvm-msvc/releases).
  59. - Create your Windows driver project and choose "LLVM-MSVC_v143_KernelMode" as your platform toolset.
  60. - Compile your project.
  61. ### How to compile?
  62. ```batch
  63. X86:clang+lld+RelWithDebInfo
  64. mkdir build-RelWithDebInfo-64
  65. pushd build-RelWithDebInfo-64
  66. cmake .. -G "Visual Studio 17 2022" -A X64 -DCMAKE_CXX_FLAGS="/utf-8" -DCMAKE_C_FLAGS="/utf-8" -DLLVM_ENABLE_RPMALLOC=ON -DLLDB_ENABLE_PYTHON=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_ENABLE_PROJECTS="clang;lld;lldb" -DCMAKE_INSTALL_PREFIX=E:\llvm\install-RelWithDebInfo-64 -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_ENABLE_ZLIB=OFF -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_OBFUSCATION_LINK_INTO_TOOLS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_USE_CRT_RELEASE=MT ../llvm
  67. msbuild /m -p:Configuration=RelWithDebInfo INSTALL.vcxproj
  68. popd
  69. mkdir build-release-64-clang
  70. pushd build-release-64-clang
  71. cmake .. -G "Visual Studio 17 2022" -T "LLVM-MSVC_v143" -A X64 -DCMAKE_CXX_FLAGS="/utf-8" -DCMAKE_C_FLAGS="/utf-8" -DLLVM_ENABLE_RPMALLOC=ON -DLLDB_ENABLE_PYTHON=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_ENABLE_PROJECTS="clang;lld;lldb;compiler-rt" -DCMAKE_INSTALL_PREFIX=E:\llvm\install-RelWithDebInfo-64 -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_ENABLE_ZLIB=OFF -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_OBFUSCATION_LINK_INTO_TOOLS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_USE_CRT_RELEASE=MT ../llvm
  72. msbuild /m -p:Configuration=RelWithDebInfo INSTALL.vcxproj
  73. X86:clang+lld+release
  74. mkdir build-release-64
  75. pushd build-release-64
  76. cmake .. -G "Visual Studio 17 2022" -A X64 -DCMAKE_CXX_FLAGS="/utf-8" -DCMAKE_C_FLAGS="/utf-8" -DLLVM_ENABLE_RPMALLOC=ON -DLLDB_ENABLE_PYTHON=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_ENABLE_PROJECTS="clang;lld;lldb" -DCMAKE_INSTALL_PREFIX=E:\llvm\install-release-64 -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_ENABLE_ZLIB=OFF -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_OBFUSCATION_LINK_INTO_TOOLS=ON -DCMAKE_BUILD_TYPE=release -DLLVM_USE_CRT_RELEASE=MT ../llvm
  77. msbuild /m -p:Configuration=release INSTALL.vcxproj
  78. popd
  79. mkdir build-release-64-clang
  80. pushd build-release-64-clang
  81. cmake .. -G "Visual Studio 17 2022" -T "LLVM-MSVC_v143" -A X64 -DCMAKE_CXX_FLAGS="/utf-8" -DCMAKE_C_FLAGS="/utf-8" -DLLVM_ENABLE_RPMALLOC=ON -DLLDB_ENABLE_PYTHON=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_ENABLE_PROJECTS="clang;lld;lldb;compiler-rt" -DCMAKE_INSTALL_PREFIX=E:\llvm\install-release-64 -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_ENABLE_ZLIB=OFF -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_OBFUSCATION_LINK_INTO_TOOLS=ON -DCMAKE_BUILD_TYPE=release -DLLVM_USE_CRT_RELEASE=MT ../llvm
  82. msbuild /m -p:Configuration=release INSTALL.vcxproj
  83. ```
  84. ### 混淆例子
  85. Add To VS Project Compiler Cmdline
  86. set /GL off
  87. set /O2 on
  88. #### 最大保护(文件将超过100MB)
  89. ```
  90. -mllvm -data-obfus -mllvm -const-obfus -mllvm -string-obfus -mllvm -ind-call -mllvm -vm-fla -mllvm -fla -mllvm -sub -mllvm -sub_loop=1 -mllvm -split -mllvm -split_num=3 -mllvm -bcf -mllvm -bcf_loop=1 -mllvm -bcf_prob=40 -mllvm -vm-fla-level=7 -mllvm -x-fla-enh -mllvm -x-var-rot -mllvm -x-combine
  91. ```
  92. #### 单纯使用特色部分(轻量模式 不加Light会导致文件飞升到10MB)
  93. ```
  94. -mllvm -data-obfus -mllvm -const-obfus -mllvm -string-obfus -mllvm -ind-call -mllvm -vm-fla -mllvm -vm-fla-level=0 -mllvm -x-fla-enh -mllvm -x-combine -mllvm -x-linear -mllvm -ida-obfus
  95. ```
  96. #### 需要修改载研究的部分
  97. ```
  98. ```
  99. #### vm sample and x-full sample
  100. ```c++
  101. [[clang::annotate("x-vm,x-full,x-cfg,custom-cc")]]
  102. void crypt_func1(uint8_t *var,uint8_t*key,size_t var_size,size_t key_size){
  103. for(auto i=0;i<var_size;i++){
  104. var[i]^=key[i%key_size];
  105. }
  106. }
  107. [[clang::annotate("x-cfg,ind-br,alias-access,custom-cc")]]
  108. void crypt_func2(uint8_t *var,uint8_t*key,size_t var_size,size_t key_size){
  109. for(auto i=0;i<var_size;i++){
  110. var[i]^=key[i%key_size];
  111. }
  112. }
  113. [[clang::annotate("x-cfg,x-vm,ind-br,alias-access,custom-cc")]]
  114. void crypt_func3(uint8_t *var,uint8_t*key,size_t var_size,size_t key_size){
  115. for(auto i=0;i<var_size;i++){
  116. var[i]^=key[i%key_size];
  117. }
  118. }
  119. ```
  120. #### combine sample
  121. ```c++
  122. [[clang::annotate("combine_func[tag1]")]]
  123. int a1(int a, int b)
  124. {
  125. printf("%d , %d\r\n", a, b);
  126. printf("%x\r\n", a ^ b);
  127. return a + b;
  128. }
  129. [[clang::annotate("combine_func[tag1]")]]
  130. int a2(int a, int b)
  131. {
  132. std::cout << "hello1" << std::endl;
  133. for (auto i = std::min(a, b);i < std::max(a, b);i++)
  134. {
  135. printf("%x,", i);
  136. }
  137. printf("\n");
  138. return a * b+ a1(a, b);
  139. }
  140. [[clang::annotate("combine_func[tag2]")]]
  141. int a3(int a,int b)
  142. {
  143. printf("%d , %d\r\n", a+1, b+2);
  144. printf("%x\r\n", a ^ b);
  145. return a + b+a^b+ a2(a, b);
  146. }
  147. ```
  148. ### How to contribute?
  149. - https://github.com/HyunCafe/contribute-practice
  150. - https://docs.github.com/en/get-started/quickstart/contributing-to-projects
  151. ### How can I learn LLVM?
  152. If you don't know how to learn ``LLVM``, you can check out this [repository](https://github.com/gmh5225/awesome-llvm-security) of mine.
  153. ### Can it run on linux?
  154. Yes.
  155. ### Can it run on macos?
  156. Yes.
  157. ## Credits
  158. - ``LLVM``
  159. - Some anonymous people

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.