Skip to content

Commit 763f89f

Browse files
devnullixcjs
andauthored
Release 2.1.3 (#69)
* turning up version number * negative permabancount means disabled (fixes #73) * #64 dont return whitelisted ips for temp ban list (#75) * #58 add all temp bans to perma (#76) * Add configuration for the Windows OpenSSH service. (#77) * Add configuration for the Windows OpenSSH service. * fixing a potential sec vulnerability * Update CONTRIBUTING.md (#78) * disable tasks with non existing bugs (#79) * finishing the release 2.1.3 Co-authored-by: Zackary Lowery <zlowery@xcjs.com>
1 parent 61b4afe commit 763f89f

19 files changed

Lines changed: 137 additions & 36 deletions

File tree

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ If there is anything you can contribute, PLEASE do so, for whatever reason (spec
44
Just make a pull request, and request it to be merged. If there are any issues you resolve with the pull request, make sure to link to them.
55

66
## Making a pull request.
7-
There is always branch for version that is currently up next (for example "v2.1.3" ). When you make a pull request, please let it base on that branch, never on master.
7+
There is always branch for version that is currently up next (for example "v2.1.4" ). When you make a pull request, please let it base on that branch, never on master.
88
Thats all.
99

1010
Every once in a while, all the things in the new version branch will be put to the test and finally become a new release.

NEWS.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
## NEWS
22

3-
### 2021-06-03 release of v.2. was completed
3+
### 2021-06-03 release of v.2.1.3 was completed
4+
- a negative perma-ban setting means that perma banning is disabled
5+
- whitelisted ips will - though they are not really banned - no longer show up in the temp ban list of the console
6+
- there is now a button that will add all temporary bans to the permanent ban list
7+
- will now protect openssh out of the box
8+
- fixed a potential security issue
9+
- tasks that rely on log sources that are not present are now disabled, instead of throwing an error on every iteration (30 secs default)
10+
11+
### 2021-06-03 release of v.2.1.2 was completed
412
- a small typo in the license was fixed
513
- severity of some messages was adjusted (moved from info to verbose) to keep a cleaner event log
614
- it contains minor bugfixes and corrections, but nothing interesting apart from that its signed now.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ It's basically a fail2ban for windows. Its goals are also mainly what we love ab
55
- *no-initial-fucking-around-with-scripts-or-config-files*
66
- *install-and-forget*
77

8-
You can download it [here](https://github.com/devnulli/EvlWatcher/blob/master/Versions/v2/EvlWatcher-v2.1.2-setup.exe) :new: ( v2.1.2 - June 2021 ) :new: .
8+
You can download it [here](https://github.com/devnulli/EvlWatcher/blob/master/Versions/v2/EvlWatcher-v2.1.3-setup.exe) ( v2.1.3 - September 2021 ) .
99

1010
## Also, we love issues!
1111

SECURITY.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
## Supported Versions
44

5-
| Version | Supported |
6-
| ------- | ------------------ |
7-
| 2.x | :white_check_mark: |
8-
| < 2.x | :x: |
5+
| Version | Supported
6+
| ------- | ------------------
7+
| 2.1.3 | :white_check_mark:
8+
| < 2.1.3 | :x:
99

1010
## Reporting a Vulnerability
1111

Source/EvlWatcher/EvlWatcher.WCF/IEvlWatcherService.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ public interface IEvlWatcherService
2525
void SetPermanentBan(IPAddress address);
2626
[OperationContract]
2727
[FaultContract(typeof(ServiceFaultDTO))]
28+
void SetPermanentBans(IPAddress[] address);
29+
[OperationContract]
30+
[FaultContract(typeof(ServiceFaultDTO))]
2831
void ClearPermanentBan(IPAddress address);
2932
[OperationContract]
3033
[FaultContract(typeof(ServiceFaultDTO))]

Source/EvlWatcher/EvlWatcher.WCF/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.0.0")]
36-
[assembly: AssemblyFileVersion("1.0.0.0")]
35+
[assembly: AssemblyVersion("2.1.3.0")]
36+
[assembly: AssemblyFileVersion("2.1.3.0")]

Source/EvlWatcher/EvlWatcher/EvlWatcher.cs

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class EvlWatcher : ServiceBase, IEvlWatcherService
4444
/// <summary>
4545
/// all loaded tasks
4646
/// </summary>
47-
private static readonly IList<LogTask> _logTasks = new List<LogTask>();
47+
private static readonly List<LogTask> _logTasks = new List<LogTask>();
4848

4949
/// <summary>
5050
/// adds some extra output
@@ -142,7 +142,7 @@ public void SetPermanentBan(IPAddress address)
142142
{
143143
EnsureClientPrivileges();
144144

145-
SetPermanentBanInternal(address);
145+
SetPermanentBanInternal(new IPAddress[] { address });
146146
}
147147

148148
public void ClearPermanentBan(IPAddress address)
@@ -181,6 +181,7 @@ public IPAddress[] GetTemporarilyBannedIPs()
181181
List<IPAddress> result = new List<IPAddress>(_lastPolledTempBans);
182182

183183
result.RemoveAll(p => _serviceconfiguration.BlacklistAddresses.Contains(p));
184+
result.RemoveAll(p => IsWhiteListed(p));
184185

185186
return result.ToArray();
186187
}
@@ -296,7 +297,6 @@ private void EnsureClientPrivileges()
296297
/// <summary>
297298
/// creates generic log tasks from configuration
298299
/// </summary>
299-
/// <param name="d"></param>
300300
private void InitWorkersFromConfig(IQueryable<IPersistentTaskConfiguration> taskConfigurations)
301301
{
302302
lock (_syncObject)
@@ -409,7 +409,7 @@ private void Run()
409409
eventTypesToTimeFramedEvents.Clear();
410410

411411
//first read all relevant events (events that are required by any of the tasks)
412-
foreach (string requiredEventType in requiredEventTypesToLogTasks.Keys)
412+
foreach (string requiredEventType in requiredEventTypesToLogTasks.Keys.ToList())
413413
{
414414
_logger.Dump($"Scanning {requiredEventType}", SeverityLevel.Debug);
415415
eventTypesToNewEvents.Add(requiredEventType, new List<ExtractedEventRecord>());
@@ -462,7 +462,10 @@ private void Run()
462462
}
463463
catch (EventLogNotFoundException)
464464
{
465-
_logger.Dump($"Event Log {requiredEventType} was not found, tasks that require these events will not work", SeverityLevel.Error);
465+
_logger.Dump($"Event Log {requiredEventType} was not found, tasks that require these events will not work and are disabled.", SeverityLevel.Info);
466+
_logTasks.RemoveAll(l => l.EventPath.Contains(requiredEventType));
467+
requiredEventTypesToLogTasks.Remove(requiredEventType);
468+
466469
}
467470
}
468471

@@ -507,8 +510,7 @@ private void Run()
507510
{
508511
if (t is IPBlockingLogTask ipTask)
509512
{
510-
foreach (IPAddress perma in ipTask.GetPermaBanVictims())
511-
SetPermanentBanInternal(perma);
513+
SetPermanentBanInternal(ipTask.GetPermaBanVictims().ToArray());
512514

513515
List<IPAddress> blockedIPs = ipTask.GetTempBanVictims();
514516

@@ -568,9 +570,10 @@ private void Run()
568570
}
569571
}
570572

571-
private void SetPermanentBanInternal(IPAddress address)
573+
private void SetPermanentBanInternal(IPAddress[] addressList)
572574
{
573-
_serviceconfiguration.AddBlackListAddress(address);
575+
foreach (IPAddress address in addressList)
576+
_serviceconfiguration.AddBlackListAddress(address);
574577

575578
PushBanList();
576579
}
@@ -624,6 +627,13 @@ public void RemoveTemporaryBan(IPAddress address)
624627
}
625628
}
626629

630+
public void SetPermanentBans(IPAddress[] addressList)
631+
{
632+
EnsureClientPrivileges();
633+
634+
SetPermanentBanInternal(addressList);
635+
}
636+
627637
#endregion
628638
}
629639
}
-306 KB
Binary file not shown.

Source/EvlWatcher/EvlWatcher/NSIS/make.nsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Name "EvlWatcher"
22

33
; The file to write
44
Icon EvlWatcher.ico
5-
OutFile "EvlWatcher-v2.1.2-setup.exe"
5+
OutFile "EvlWatcher-v2.1.3-setup.exe"
66

77
; The default installation directory
88
InstallDir $PROGRAMFILES\EvlWatcher
@@ -78,7 +78,7 @@ Section "EvlWatcher Service"
7878
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\EvlWatcher" "NoRepair" 1
7979
WriteUninstaller "uninstall.exe"
8080

81-
nsSCM::Install /NOUNLOAD "EvlWatcher" "EvlWatcher service" 16 2 "$INSTDIR\EvlWatcher.exe" "" "" "" ""
81+
nsSCM::Install /NOUNLOAD "EvlWatcher" "EvlWatcher service" 16 2 "$\"$INSTDIR\EvlWatcher.exe$\"" "" "" "" ""
8282
nsSCM::Start /NOUNLOAD "EvlWatcher"
8383

8484
SectionEnd

Source/EvlWatcher/EvlWatcher/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@
2828
// Build Number
2929
// Revision
3030
//
31-
[assembly: AssemblyVersion("2.1.2.0")]
32-
[assembly: AssemblyFileVersion("2.1.2.0")]
31+
[assembly: AssemblyVersion("2.1.3.0")]
32+
[assembly: AssemblyFileVersion("2.1.3.0")]

0 commit comments

Comments
 (0)