Skip to content

Conversation

A13501350
Copy link

what

  • Added ModSecurityIISMessage.mc event message resource file
  • Updated Makefile.win to:
    • Compile ModSecurityIISMessage.mc to .res resource file
    • Link generated resource into existing ModSecurityIIS.dll
  • Modified installer.wxs to register event source pointing to ModSecurityIIS.dll

why

example results

After the fix, event logs now display properly formatted messages:

PS C:\Users\Hyper-V> get-eventLog -LogName Application -Source ModSecurity -Newest 8

   Index Time          EntryType   Source                 InstanceID Message
   ----- ----          ---------   ------                 ---------- -------
     561 Aug 28 23:10  Information ModSecurity                     1 ModSecurity: StatusEngine call failed. Query: G...
     560 Aug 28 23:10  Information ModSecurity                     1 ModSecurity: StatusEngine call: "2.9.12,IIS,1.7...
     559 Aug 28 23:10  Information ModSecurity                     1 ModSecurity: LIBXML compiled version="2.9.14"
     558 Aug 28 23:10  Information ModSecurity                     1 ModSecurity: YAJL compiled version="2.1.0"
     557 Aug 28 23:10  Information ModSecurity                     1 ModSecurity: LUA compiled version="Lua 5.4"
     556 Aug 28 23:10  Information ModSecurity                     1 ModSecurity: PCRE compiled version="8.45 "; loa...
     555 Aug 28 23:10  Information ModSecurity                     1 ModSecurity: APR compiled version="1.7.6"; load...
     554 Aug 28 23:10  Information ModSecurity                     1 ModSecurity for IIS (STABLE)/2.9.12 (http://www...

references

- Added ModSecurityIISMessage.mc message resource file for event source metadata
- Updated Makefile.win to compile .mc to .res resource file and link into ModSecurityIIS.dll
- Modified installer.wxs to register event source pointing to ModSecurityIIS.dll
@airween
Copy link
Member

airween commented Aug 28, 2025

Hi @A13501350,

many thanks for this excellent PR - great description! I added only one note, see above.

Copy link

@airween
Copy link
Member

airween commented Aug 29, 2025

Thanks @A13501350!

@airween airween merged commit f3f00e3 into owasp-modsecurity:v2/master Aug 29, 2025
82 checks passed
@A13501350 A13501350 deleted the v2/master branch August 29, 2025 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants