();
29 | _lockStatusNames.Add((int)LockStatus.None, "New");
30 | _lockStatusNames.Add((int)LockStatus.SoftLockRequested, "Soft lock requested");
31 | _lockStatusNames.Add((int)LockStatus.SoftLocked, "Soft lock");
32 | _lockStatusNames.Add((int)LockStatus.SoftLockExpired, "Soft lock expired");
33 | _lockStatusNames.Add((int)LockStatus.HardLockRequested, "Hard lock requested");
34 | _lockStatusNames.Add((int)LockStatus.HardLocked, "Hard lock");
35 | _lockStatusNames.Add((int)LockStatus.HardLockExpired, "Hard lock expired");
36 | _lockStatusNames.Add((int)LockStatus.Unlocked, "Unlocked");
37 | _lockStatusNames.Add((int)LockStatus.ManuallyUnlocked, "Manually unlocked");
38 | _lockStatusNames.Add((int)LockStatus.LockError, "Error adding lock");
39 | _lockStatusNames.Add((int)LockStatus.UnlockError, "Unlock error");
40 | _lockStatusNames.Add((int)LockStatus.LicenseRequired, "License limitation");
41 | }
42 | return _lockStatusNames;
43 | }
44 | }
45 |
46 | public static string GetLockStatusName(int status) {
47 | if(LockStatusNames.ContainsKey(status)) {
48 | return LockStatusNames[status];
49 | } else {
50 | return String.Format("Status {0} not found in LockStatusNames!", status);
51 | }
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/Cyberarms.IntrusionDetection.Shared/LockType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Cyberarms.IntrusionDetection.Shared;
4 | using System.Text;
5 |
6 | namespace Cyberarms.IntrusionDetection {
7 | public enum LockType {
8 | None = Lock.LOCK_STATUS_NONE,
9 | SoftLockRequested = Lock.LOCK_STATUS_SOFTLOCK_REQUESTED,
10 | SoftLock = Lock.LOCK_STATUS_SOFTLOCK,
11 | HardLockRequested = Lock.LOCK_STATUS_HARDLOCK_REQUESTED,
12 | HardLock = Lock.LOCK_STATUS_HARDLOCK
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Cyberarms.IntrusionDetection.Shared/PluginExceptionArguments.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Cyberarms.IntrusionDetection.Shared {
7 | public enum PluginExceptionSource {
8 | Init = 0,
9 | Load = 100,
10 | Configuration = 200,
11 | ServiceAction = 300,
12 | ExecuteAction = 400,
13 | Unload = 500
14 | }
15 |
16 | public class PluginExceptionArguments {
17 | public string AssemblyName { get; set; }
18 | public string ModuleName { get; set; }
19 | public Exception Exception { get; set; }
20 | public PluginExceptionSource Source { get; set; }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Cyberarms.IntrusionDetection.Shared/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Cyberarms.IntrusionDetection.Shared")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Cyberarms Limited")]
12 | [assembly: AssemblyProduct("Cyberarms.IntrusionDetection.Shared")]
13 | [assembly: AssemblyCopyright("Copyright © Cyberarms Limited 2012-2016")]
14 | [assembly: AssemblyTrademark("Cyberarms Intrusion Detection")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("7aaca9ae-5d48-48f7-be3f-27974b2e535a")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("2.2.0")]
36 | [assembly: AssemblyFileVersion("2.2.0")]
37 |
--------------------------------------------------------------------------------
/Cyberarms.IntrusionDetection.Shared/Resources/EventsPerAgent.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | [%AGENT_NAME%]
7 |
8 | |
9 |
10 |
11 | [%INTRUSION_ATTEMPTS%]
12 |
13 | |
14 |
15 |
16 | [%SOFT_LOCKS%]
17 |
18 | |
19 |
20 |
21 | [%HARD_LOCKS%]
22 |
23 | |
24 |
--------------------------------------------------------------------------------
/Cyberarms.IntrusionDetection.Shared/Resources/HardLocksByIp.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | [%IP_ADDRESS%]
8 |
9 | |
10 |
11 |
12 |
13 | [%HARD_LOCKS%]
16 |
17 | |
18 |
--------------------------------------------------------------------------------
/Cyberarms.IntrusionDetection.Shared/Resources/IntrusionAttemptsByIp.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | [%IP_ADDRESS%]
7 |
8 | |
9 |
10 |
11 |
12 | [%INTRUSION_ATTEMPTS%]
13 |
14 | |
15 |
--------------------------------------------------------------------------------
/Cyberarms.IntrusionDetection.Shared/Resources/SoftLocksByIp.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | [%IP_ADDRESS%]
8 |
9 | |
10 |
11 |
12 |
13 | [%SOFT_LOCKS%]
16 |
17 | |
18 |
--------------------------------------------------------------------------------
/Cyberarms.IntrusionDetection.Shared/Resources/agent15px-custom-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EFTEC/Cyberarms/85afac744d8a5a8ce2686cacf45218ff5b4b6e94/Cyberarms.IntrusionDetection.Shared/Resources/agent15px-custom-dark.png
--------------------------------------------------------------------------------
/Cyberarms.IntrusionDetection.Shared/Resources/agent15px-custom-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EFTEC/Cyberarms/85afac744d8a5a8ce2686cacf45218ff5b4b6e94/Cyberarms.IntrusionDetection.Shared/Resources/agent15px-custom-white.png
--------------------------------------------------------------------------------
/Cyberarms.IntrusionDetection.Shared/Resources/agent15px-default-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EFTEC/Cyberarms/85afac744d8a5a8ce2686cacf45218ff5b4b6e94/Cyberarms.IntrusionDetection.Shared/Resources/agent15px-default-dark.png
--------------------------------------------------------------------------------
/Cyberarms.IntrusionDetection.Shared/Resources/agent15px-default-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EFTEC/Cyberarms/85afac744d8a5a8ce2686cacf45218ff5b4b6e94/Cyberarms.IntrusionDetection.Shared/Resources/agent15px-default-white.png
--------------------------------------------------------------------------------
/Cyberarms.IntrusionDetection.Shared/Resources/logIcon-hardLock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EFTEC/Cyberarms/85afac744d8a5a8ce2686cacf45218ff5b4b6e94/Cyberarms.IntrusionDetection.Shared/Resources/logIcon-hardLock.png
--------------------------------------------------------------------------------
/Cyberarms.IntrusionDetection.Shared/Resources/logIcon-loginAttempt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EFTEC/Cyberarms/85afac744d8a5a8ce2686cacf45218ff5b4b6e94/Cyberarms.IntrusionDetection.Shared/Resources/logIcon-loginAttempt.png
--------------------------------------------------------------------------------
/Cyberarms.IntrusionDetection.Shared/Resources/logIcon-softLock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EFTEC/Cyberarms/85afac744d8a5a8ce2686cacf45218ff5b4b6e94/Cyberarms.IntrusionDetection.Shared/Resources/logIcon-softLock.png
--------------------------------------------------------------------------------
/Cyberarms.IntrusionDetection.Shared/Resources/logIcon-systemMessage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EFTEC/Cyberarms/85afac744d8a5a8ce2686cacf45218ff5b4b6e94/Cyberarms.IntrusionDetection.Shared/Resources/logIcon-systemMessage.png
--------------------------------------------------------------------------------
/Cyberarms.IntrusionDetection.Shared/Resources/logIcon-unlock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EFTEC/Cyberarms/85afac744d8a5a8ce2686cacf45218ff5b4b6e94/Cyberarms.IntrusionDetection.Shared/Resources/logIcon-unlock.png
--------------------------------------------------------------------------------
/Cyberarms.IntrusionDetection.Shared/Resources/logIcon-warning.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EFTEC/Cyberarms/85afac744d8a5a8ce2686cacf45218ff5b4b6e94/Cyberarms.IntrusionDetection.Shared/Resources/logIcon-warning.png
--------------------------------------------------------------------------------
/Cyberarms.IntrusionDetection.Shared/Statistics.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Cyberarms.IntrusionDetection.Shared {
7 | public class Statistics {
8 |
9 | private List agentIds;
10 |
11 | private Statistics() {
12 | agentIds = new List();
13 | }
14 |
15 | private static Statistics _instance;
16 | public static Statistics Instance {
17 | get {
18 | if (_instance == null) {
19 | _instance = new Statistics();
20 | }
21 | return _instance;
22 | }
23 | }
24 |
25 | public void IncreaseFailedLoginStatistics(SecurityAgent agent) {
26 | if (!agentIds.Contains(agent.Id)) ConfigureStatistics(agent);
27 | agent.FailedLogins++;
28 | IncreaseStatistics(agent, "FailedLogins");
29 | }
30 |
31 | public void IncreaseHardLockStatistics(SecurityAgent agent) {
32 | agent.HardLocks++;
33 | IncreaseStatistics(agent, "HardLocks");
34 | }
35 |
36 | public void ConfigureStatistics(SecurityAgent agent) {
37 | string sqlString = "select count(*) from AgentStatistics where AgentId=@p0";
38 | object result = Database.Instance.ExecuteScalar(sqlString, agent.Id);
39 | if (Db.DbValueConverter.ToInt(result) < 1) {
40 | sqlString = "insert into AgentStatistics(AgentId, FailedLogins, SoftLocks, HardLocks) values (@p0,0,0,0)";
41 | Database.Instance.ExecuteNonQuery(sqlString, agent.Id);
42 | }
43 | agentIds.Add(agent.Id);
44 | }
45 |
46 | public void IncreaseSoftLockStatistics(SecurityAgent agent) {
47 | agent.SoftLocks++;
48 | IncreaseStatistics(agent, "SoftLocks");
49 | }
50 |
51 | public void IncreaseStatistics(SecurityAgent agent, string statisticsColumn) {
52 | try {
53 | string sqlString = String.Format("Update AgentStatistics set {0}={0}+1 where AgentId=@p0", statisticsColumn);
54 | Database.Instance.ExecuteNonQuery(sqlString, agent.Id);
55 | } catch(Exception ex) {
56 | throw ex;
57 | }
58 | }
59 |
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/Cyberarms.WebSecurity/Cyberarms.WebSecurity.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 8.0.30703
7 | 2.0
8 | {076A76AA-5A22-4FA9-B676-F95A44BDDEC7}
9 | Library
10 | Properties
11 | Cyberarms.WebSecurity
12 | Cyberarms.WebSecurity
13 | v2.0
14 | 512
15 | SAK
16 | SAK
17 | SAK
18 | SAK
19 |
20 |
21 |
22 | true
23 | full
24 | false
25 | bin\Debug\
26 | DEBUG;TRACE
27 | prompt
28 | 4
29 |
30 |
31 | pdbonly
32 | true
33 | bin\Release\
34 | TRACE
35 | prompt
36 | 4
37 |
38 |
39 | false
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
71 |
--------------------------------------------------------------------------------
/Cyberarms.WebSecurity/Cyberarms.WebSecurity.csproj.vspscc:
--------------------------------------------------------------------------------
1 | ""
2 | {
3 | "FILE_VERSION" = "9237"
4 | "ENLISTMENT_CHOICE" = "NEVER"
5 | "PROJECT_FILE_RELATIVE_PATH" = ""
6 | "NUMBER_OF_EXCLUDED_FILES" = "0"
7 | "ORIGINAL_PROJECT_FILE_PATH" = ""
8 | "NUMBER_OF_NESTED_PROJECTS" = "0"
9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
10 | }
11 |
--------------------------------------------------------------------------------
/Cyberarms.WebSecurity/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Cyberarms.WebSecurity")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Cyberarms Intrusion Detection")]
13 | [assembly: AssemblyCopyright("Copyright © Cyberarms 2014-2016")]
14 | [assembly: AssemblyTrademark("Cyberarms IDDS")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("54e6e30a-7b87-4064-8d8b-05bba75227e2")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("2.2.0")]
36 | [assembly: AssemblyFileVersion("2.2.0")]
37 |
--------------------------------------------------------------------------------
/Cyberarms.WebSecurity/SecurityMonitor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Web;
5 | using System.Reflection;
6 |
7 |
8 |
9 | namespace Cyberarms.WebSecurity {
10 | public class SecurityMonitor : IHttpModule {
11 | const string VAR_NAME_FAILED_LOGIN_RDWEB = "bFailedLogon";
12 | const string VAR_NAME_FAILED_LOGIN_DEFAULT = "bCyberarmsLoginFailed";
13 | const string EVENT_LOG_MESSAGE = "Cyberarms Web Security Monitor has recognized an unsuccessful login from computer {0} [IP = '{1}'] \nUser agent: {2}\nRequested url: {3}";
14 |
15 | public void Dispose() {
16 |
17 | }
18 |
19 |
20 | public void Init(HttpApplication context) {
21 | context.PostRequestHandlerExecute += context_PostRequestHandlerExecute;
22 | }
23 |
24 | void context_PostRequestHandlerExecute(object sender, EventArgs e) {
25 | try {
26 | bool bFailedLoginDetected = false;
27 | if (sender != null) {
28 | HttpContext context = ((HttpApplication)sender).Context;
29 | if (context != null) {
30 | IHttpHandler handler = ((HttpApplication)sender).Context.Handler;
31 | foreach (FieldInfo fi in handler.GetType().GetFields()) {
32 | if (fi.Name == VAR_NAME_FAILED_LOGIN_DEFAULT || fi.Name == VAR_NAME_FAILED_LOGIN_RDWEB) {
33 | bool bFailed = false;
34 | if (fi.GetValue(handler) != null && bool.TryParse(fi.GetValue(handler).ToString(), out bFailed)) {
35 | if (bFailed) bFailedLoginDetected = true;
36 | }
37 | }
38 | }
39 | if (bFailedLoginDetected) {
40 | // write login failed to application event log
41 | System.Diagnostics.EventLog.WriteEntry("Application",
42 | String.Format(EVENT_LOG_MESSAGE, context.Request.UserHostName, context.Request.UserHostAddress, context.Request.UserAgent, context.Request.Url),
43 | System.Diagnostics.EventLogEntryType.FailureAudit, 4625);
44 | }
45 | }
46 | }
47 | } catch {
48 | // avoid errors caused by this module
49 | }
50 | }
51 |
52 |
53 |
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/Cyberarms.vssscc:
--------------------------------------------------------------------------------
1 | ""
2 | {
3 | "FILE_VERSION" = "9237"
4 | "ENLISTMENT_CHOICE" = "NEVER"
5 | "PROJECT_FILE_RELATIVE_PATH" = ""
6 | "NUMBER_OF_EXCLUDED_FILES" = "0"
7 | "ORIGINAL_PROJECT_FILE_PATH" = ""
8 | "NUMBER_OF_NESTED_PROJECTS" = "0"
9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT"
10 | }
11 |
--------------------------------------------------------------------------------
/DemoAgent/BadAgent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using Cyberarms.IntrusionDetection.Api.Plugin;
6 |
7 | namespace DemoAgent {
8 | public class BadAgent : AgentPlugin {
9 | public BadAgent() {
10 | }
11 |
12 | protected override void OnStartAgent() {
13 | base.OnStartAgent();
14 | while (true) ;
15 |
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/DemoAgent/DemoAgent.csproj.vspscc:
--------------------------------------------------------------------------------
1 | ""
2 | {
3 | "FILE_VERSION" = "9237"
4 | "ENLISTMENT_CHOICE" = "NEVER"
5 | "PROJECT_FILE_RELATIVE_PATH" = ""
6 | "NUMBER_OF_EXCLUDED_FILES" = "0"
7 | "ORIGINAL_PROJECT_FILE_PATH" = ""
8 | "NUMBER_OF_NESTED_PROJECTS" = "0"
9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
10 | }
11 |
--------------------------------------------------------------------------------
/DemoAgent/DemoConfiguration.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Cyberarms.IntrusionDetection.Api.Plugin;
3 |
4 | namespace DemoAgent {
5 | ///
6 | /// CustomIntrusion Detectionagent configuration
7 | /// In this simple demonstration, just one property "DirectoryName" is used.
8 | /// You can provide a more complex configuration class, based on your needs
9 | ///
10 | public class DemoConfiguration : PluginConfiguration {
11 | ///
12 | /// The directory which is used by the DemoAgent to watch for changes
13 | ///
14 | public string DirectoryName { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/DemoAgent/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("DemoAgent")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("DemoAgent")]
13 | [assembly: AssemblyCopyright("Copyright © 2012")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("0111094e-98ed-45d0-813e-d2c1377215a2")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Dependencies/SQLite/sqlite-netFx40-binary-Win32-2010-1.0.84.0/SQLite.Interop.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EFTEC/Cyberarms/85afac744d8a5a8ce2686cacf45218ff5b4b6e94/Dependencies/SQLite/sqlite-netFx40-binary-Win32-2010-1.0.84.0/SQLite.Interop.dll
--------------------------------------------------------------------------------
/Dependencies/SQLite/sqlite-netFx40-binary-Win32-2010-1.0.84.0/System.Data.SQLite.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EFTEC/Cyberarms/85afac744d8a5a8ce2686cacf45218ff5b4b6e94/Dependencies/SQLite/sqlite-netFx40-binary-Win32-2010-1.0.84.0/System.Data.SQLite.dll
--------------------------------------------------------------------------------
/Dependencies/SQLite/sqlite-netFx40-binary-x64-2010-1.0.84.0/SQLite.Interop.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EFTEC/Cyberarms/85afac744d8a5a8ce2686cacf45218ff5b4b6e94/Dependencies/SQLite/sqlite-netFx40-binary-x64-2010-1.0.84.0/SQLite.Interop.dll
--------------------------------------------------------------------------------
/Dependencies/SQLite/sqlite-netFx40-binary-x64-2010-1.0.84.0/System.Data.SQLite.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EFTEC/Cyberarms/85afac744d8a5a8ce2686cacf45218ff5b4b6e94/Dependencies/SQLite/sqlite-netFx40-binary-x64-2010-1.0.84.0/System.Data.SQLite.dll
--------------------------------------------------------------------------------
/EventLogCleaner/EventLogCleaner.csproj.vspscc:
--------------------------------------------------------------------------------
1 | ""
2 | {
3 | "FILE_VERSION" = "9237"
4 | "ENLISTMENT_CHOICE" = "NEVER"
5 | "PROJECT_FILE_RELATIVE_PATH" = ""
6 | "NUMBER_OF_EXCLUDED_FILES" = "0"
7 | "ORIGINAL_PROJECT_FILE_PATH" = ""
8 | "NUMBER_OF_NESTED_PROJECTS" = "0"
9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
10 | }
11 |
--------------------------------------------------------------------------------
/EventLogCleaner/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Diagnostics;
6 |
7 | namespace EventLogCleaner {
8 | class Program {
9 | static void Main(string[] args) {
10 | Console.WriteLine("This program will remove the Cyberarms EventLog. This can not be undone.");
11 | Console.WriteLine("Are you sure that you want to continue? y/N");
12 | if (Console.ReadKey().Key == ConsoleKey.Y) {
13 | Console.WriteLine("Are you really sure? (y/N)");
14 | if (Console.ReadKey().Key == ConsoleKey.Y) {
15 | try {
16 | if (EventLog.Exists("Cyberarms Intrusion Detection")) {
17 | EventLog.DeleteEventSource("Cyberarms Intrusion Detection");
18 | Console.WriteLine("EventSource 'Cyberarms Intrusion Detection' was deleted");
19 | } else {
20 | Console.WriteLine("EventSource 'Cyberarms Intrusion Detection' was not found on this computer");
21 | }
22 | if (EventLog.Exists("Cyberarms")) {
23 | EventLog.Delete("Cyberarms");
24 | Console.WriteLine("Event Log 'Cyberarms' was deleted. You might have to restart your computer");
25 | Console.WriteLine(@"and delete the event log file at %systemroot%\system32\winevt\Logs\Cyberarms.evtx");
26 | } else {
27 | Console.WriteLine("Event Log 'Cyberarms' was not found on this computer.");
28 | }
29 | Console.WriteLine("The command has executed successfully");
30 | } catch (Exception ex) {
31 | Console.WriteLine("Sorry, we have a problem. Details:\r\n{0}", ex.Message);
32 | } finally { }
33 | return;
34 | }
35 |
36 |
37 | }
38 | Console.WriteLine("Please be sure to use this utility ONLY when advised by Cyberarms support personel.");
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/EventLogCleaner/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("EventLogCleaner")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("EventLogCleaner")]
13 | [assembly: AssemblyCopyright("Copyright © 2012-2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("8ae5de3a-ff54-46a2-adbe-924e99ede989")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("2.2.0")]
36 | [assembly: AssemblyFileVersion("2.2.0")]
37 |
--------------------------------------------------------------------------------
/IdsServiceForWindows.vsmdi:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2016 isicore GmbH, www.isicore.de
4 |
5 | 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:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | 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
10 |
11 |
--------------------------------------------------------------------------------
/Local.testsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 | These are default test settings for a local test run.
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/MailServerTest/MailServerTest.csproj.vspscc:
--------------------------------------------------------------------------------
1 | ""
2 | {
3 | "FILE_VERSION" = "9237"
4 | "ENLISTMENT_CHOICE" = "NEVER"
5 | "PROJECT_FILE_RELATIVE_PATH" = ""
6 | "NUMBER_OF_EXCLUDED_FILES" = "0"
7 | "ORIGINAL_PROJECT_FILE_PATH" = ""
8 | "NUMBER_OF_NESTED_PROJECTS" = "0"
9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
10 | }
11 |
--------------------------------------------------------------------------------
/MailServerTest/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using Cyberarms.Agents.MailServer;
6 |
7 | namespace MailServerTest {
8 | class Program {
9 | static void Main(string[] args) {
10 | Pop3Agent agent = new Pop3Agent();
11 | agent.CurrentClients.Add(1, new Pop3Client());
12 | agent.CurrentClients.Add(2, new Pop3Client());
13 | agent.CurrentClients.Add(10, new Pop3Client());
14 | agent.CurrentClients.Add(1000, new Pop3Client());
15 | for (int i = agent.CurrentClients.Keys.Max(); i > 0; i--) {
16 | if (agent.CurrentClients.ContainsKey(i) && i==10) agent.CurrentClients.Remove(i);
17 | }
18 | Console.WriteLine(agent.CurrentClients.Count);
19 | Console.ReadKey();
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/MailServerTest/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("MailServerTest")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("MailServerTest")]
13 | [assembly: AssemblyCopyright("Copyright © 2012")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("9527c05b-c7ab-4873-9f4f-d93b48cb8284")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Media/setup_banner.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EFTEC/Cyberarms/85afac744d8a5a8ce2686cacf45218ff5b4b6e94/Media/setup_banner.jpg
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Cyberarms
2 | IDDS is a free and open source intrusion detection and prevention system for Windows Server 2008 R2 and later.
3 |
4 | # Note
5 |
6 | Its a fork of https://idds.codeplex.com/ and since Codeplex is dying then this repository acts as a backup if you want to fork into github.
7 |
8 | It's not supported. I repeat, it is only a backup. :-P
9 |
10 |
11 | ## Project Description
12 | IDDS is a free and open source intrusion detection and prevention system for Windows Server 2008 R2 and later.
13 |
14 | If you want the installer of the program (compiled version), then go here:
15 |
16 | https://github.com/EFTEC/Cyberarms/blob/master/Compiled/cyberarms.intrusiondetection.setup.x64_2.2.0.zip
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/SqlServerAgentTest/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using Cyberarms.IntrusionDetection.Api.Plugin;
6 | using Cyberarms.Agents.SqlServer;
7 |
8 | namespace SqlServerAgentTest {
9 | class Program {
10 | static void Main(string[] args) {
11 | SqlFailedLoginWatcher watcher = new SqlFailedLoginWatcher();
12 | watcher.AttackDetected += new AttackDetectedHandler(watcher_AttackDetected);
13 | watcher.Start();
14 | Console.ReadKey();
15 | watcher.Stop();
16 | }
17 |
18 | static void watcher_AttackDetected(object sender, INotificationEventArgs data) {
19 | SqlFailedLoginWatcher watcher = (SqlFailedLoginWatcher)sender;
20 | Console.WriteLine("{0}: {1}", data.EventMessage, data.IpAddress);
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/SqlServerAgentTest/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("SqlServerAgentTest")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("SqlServerAgentTest")]
13 | [assembly: AssemblyCopyright("Copyright © 2012")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("80362e85-997b-47c1-bf12-0b37b7c853d8")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/SqlServerAgentTest/SqlServerAgentTest.csproj.vspscc:
--------------------------------------------------------------------------------
1 | ""
2 | {
3 | "FILE_VERSION" = "9237"
4 | "ENLISTMENT_CHOICE" = "NEVER"
5 | "PROJECT_FILE_RELATIVE_PATH" = ""
6 | "NUMBER_OF_EXCLUDED_FILES" = "0"
7 | "ORIGINAL_PROJECT_FILE_PATH" = ""
8 | "NUMBER_OF_NESTED_PROJECTS" = "0"
9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
10 | }
11 |
--------------------------------------------------------------------------------
/TlsSslTest/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | using Cyberarms.Agents.TerminalServer;
7 | using Cyberarms.IntrusionDetection.Api.Plugin;
8 |
9 | namespace TlsSslTest {
10 | class Program {
11 | static void Main(string[] args) {
12 | TlsSslAgent agent = new TlsSslAgent();
13 | agent.Trace += new EventHandler(agent_Trace);
14 | agent.Tracing = false;
15 | agent.AttackDetected += new Cyberarms.IntrusionDetection.Api.Plugin.AttackDetectedHandler(agent_AttackDetected);
16 | ((Cyberarms.Agents.TerminalServer.TslSslConfig)agent.Configuration.AgentSettings).RdpPort = 3389;
17 | agent.Start();
18 | Console.WriteLine("Press any key to abort...");
19 | Console.ReadKey();
20 | }
21 |
22 | static void agent_AttackDetected(object sender, Cyberarms.IntrusionDetection.Api.Plugin.INotificationEventArgs data) {
23 | Console.WriteLine("AttackDetected from " + data.IpAddress);
24 | }
25 |
26 | static void agent_Trace(object sender, EventArgs e) {
27 | IPHeader tls = (IPHeader)sender;
28 | //Console.WriteLine("{0} {1} {2} {3}", tls.TlsHeader.ContentType, tls.TlsHeader.MajorVersion, tls.TlsHeader.MinorVersion, tls.TlsHeader.Length);
29 | for (int i = 0; i < int.Parse(tls.TotalLength);i++ ) {
30 | Console.Write("{0:X}", tls.Data[i]);
31 | }
32 | Console.WriteLine();
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/TlsSslTest/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("TlsSslTest")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("TlsSslTest")]
13 | [assembly: AssemblyCopyright("Copyright © 2012")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("de6a1b14-8488-470b-a84c-65555e920d95")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/TlsSslTest/TlsSslTest.csproj.vspscc:
--------------------------------------------------------------------------------
1 | ""
2 | {
3 | "FILE_VERSION" = "9237"
4 | "ENLISTMENT_CHOICE" = "NEVER"
5 | "PROJECT_FILE_RELATIVE_PATH" = ""
6 | "NUMBER_OF_EXCLUDED_FILES" = "0"
7 | "ORIGINAL_PROJECT_FILE_PATH" = ""
8 | "NUMBER_OF_NESTED_PROJECTS" = "0"
9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
10 | }
11 |
--------------------------------------------------------------------------------
/TraceAndTestImpact.testsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 | These are test settings for Trace and Test Impact.
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------