Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sysmon memory leak #92

Closed
uncletimmy3 opened this issue Jun 8, 2018 · 0 comments
Closed

Sysmon memory leak #92

uncletimmy3 opened this issue Jun 8, 2018 · 0 comments

Comments

@uncletimmy3
Copy link

I faced a bug in Sysmon (ver. 7.01 and 7.03) - Sysmon's driver (SysmonDrv.sys) consumes new area in Nonpaged pool memory every time configuration reloads, but driver does not free old area in Nonpaged pool memory. As a result, We can see memory leak. I found this problem on my VM, which had only 4GB RAM and more than 180 uptime days.
I used this script to reproduce bug:
$sleep = 0
$ErrorActionPreference = "SilentlyContinue"
$iterationPeriod = New-TimeSpan -Seconds 2
$scriptDuration = New-TimeSpan -Hours 1
$scriptStopWatch = [System.Diagnostics.Stopwatch]::StartNew()
while($scriptStopWatch.ElapsedMilliseconds -le $scriptDuration.TotalMilliseconds)
{
if($sleep -gt 0){Start-Sleep -Milliseconds $sleep }
$iterationStopWatch = [System.Diagnostics.Stopwatch]::StartNew()
Invoke-Expression 'C:\Windows\Sysmon64.exe -c "C:\Windows\SysmonConfig.xml"' |Out-Null
$iterationStopWatch.Stop()
$iterationTime = $iterationStopWatch.Elapsed
$sleep = $iterationPeriod.TotalMilliseconds - $iterationTime.TotalMilliseconds
}
$scriptStopWatch.Stop()

SysR is Sysmon driver tag, as you see, it took 252313744 Bytes (240 MBytes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant