forked from wazuh/wazuh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
376 changed files
with
20,693 additions
and
18,925 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
' Copyright (C) 2015, Wazuh Inc. | ||
' Created by Wazuh, Inc. <[email protected]>. | ||
' This program is free software; you can redistribute it and/or modify it under the terms of GPLv2 | ||
|
||
@startuml class-testtool | ||
title FIMDB - Test tool | ||
package "testtool" <<folder>> #DDDDDD { | ||
package "action" <<Folder>> { | ||
abstract IAction { | ||
+ void execute() | ||
+ void ~IAction() | ||
} | ||
class "RemoveFileAction" { | ||
+void execute() | ||
} | ||
class "GetFileAction" { | ||
+void execute() | ||
} | ||
class "CountEntriesAction" { | ||
+void execute() | ||
} | ||
class "UpdateFileAction" { | ||
+void execute() | ||
} | ||
class "SearchFileAction" { | ||
+void execute() | ||
} | ||
class "RunIntegrityAction" { | ||
+void execute() | ||
} | ||
class "PushMessageAction" { | ||
+void execute() | ||
} | ||
class "StartTransactionAction" { | ||
+void execute() | ||
} | ||
class "SyncTxnRowsAction" { | ||
+void execute() | ||
} | ||
class "GetDeletedRowsAction" { | ||
+void execute() | ||
} | ||
} | ||
interface "Main" <<(F,#FF7700)>> { | ||
+void main() | ||
} | ||
} | ||
|
||
IAction <|-- RemoveFileAction | ||
IAction <|-- GetFileAction | ||
IAction <|-- CountEntriesAction | ||
IAction <|-- UpdateFileAction | ||
IAction <|-- SearchFileAction | ||
IAction <|-- RunIntegrityAction | ||
IAction <|-- PushMessageAction | ||
IAction <|-- StartTransactionAction | ||
IAction <|-- SyncTxnRowsAction | ||
IAction <|-- GetDeletedRowsAction | ||
Main -- IAction | ||
@enduml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
' Copyright (C) 2015, Wazuh Inc. | ||
' Created by Wazuh, Inc. <[email protected]>. | ||
' This program is free software; you can redistribute it and/or modify it under the terms of GPLv2 | ||
|
||
@startuml Test tool - Sequence Diagram | ||
title FIMDB - Test tool | ||
|
||
actor FIMDBTestTool as tool | ||
participant Configuration as config | ||
participant IAction as action | ||
database Output as output | ||
|
||
tool -> config : Get Configuration | ||
config --> tool | ||
tool -> tool : Initialize | ||
loop n-actions | ||
tool -> action : Execute action | ||
action -> output : Write action output | ||
action --> tool | ||
end | ||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
@startuml ER FIM DB | ||
|
||
entity "file_entry" { | ||
path : text **<<PK>>** | ||
-- | ||
mode : integer | ||
last_event : integer | ||
scanned : integer | ||
options : integer | ||
checksum : text | ||
dev : integer | ||
inode : integer | ||
size : integer | ||
perm : text | ||
attributes : text | ||
uid : integer | ||
gid : integer | ||
user_name : text | ||
group_name : text | ||
hash_md5 : text | ||
hash_sha1 : text | ||
hash_sha256 : text | ||
mtime : integer | ||
} | ||
|
||
entity "registry_key" { | ||
path : text **<<PK>>** | ||
arch : text **<<PK>>** | ||
-- | ||
perm : text | ||
uid : integer | ||
gid : integer | ||
user_name : text | ||
group_name : text | ||
mtime : integer | ||
scanned : integer | ||
last_event : integer | ||
checksum : text | ||
hash_full_path : text | ||
} | ||
|
||
entity "registry_data" { | ||
path : text **<<PK>>** | ||
arch : text **<<PK>>** | ||
name : text **<<PK>>** | ||
-- | ||
registry_key_path **<<FK>>** | ||
registry_key_arch **<<FK>>** | ||
type : integer | ||
size : integer | ||
hash_md5 : text | ||
hash_sha1 : text | ||
hash_sha256 : text | ||
scanned : integer | ||
last_event : integer | ||
checksum : text | ||
hash_full_path : text | ||
} | ||
registry_data }o--|| registry_key | ||
|
||
|
||
@enduml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
' Copyright (C) 2015, Wazuh Inc. | ||
' Created by Wazuh, Inc. <[email protected]>. | ||
' This program is free software; you can redistribute it and/or modify it under the terms of GPLv2 | ||
|
||
@startuml sequence_diagram_fim_synchronization | ||
actor "wazuh-agent" as agent | ||
participant FIM_sync_thread | ||
participant RSync_thread | ||
actor "wazuh-manager" as manager | ||
|
||
skinparam SequenceGroupBodyBackgroundColor #FFFFFF90 | ||
|
||
agent -> FIM_sync_thread : FIM sync thread started | ||
FIM_sync_thread -> RSync_thread : Execute sync | ||
|
||
loop #LightSkyBlue Each current interval seconds | ||
alt If at least "response timeout"\n seconds since last sync message | ||
alt If last sync was successful | ||
FIM_sync_thread -> FIM_sync_thread: Reset current interval | ||
end | ||
FIM_sync_thread -> RSync_thread : Execute sync | ||
else | ||
FIM_sync_thread -> FIM_sync_thread: Duplicate current interval | ||
alt If max interval reached | ||
FIM_sync_thread -> FIM_sync_thread: Limit interval to maximum configured | ||
end | ||
end | ||
end loop | ||
|
||
group #LightSkyBlue sync function | ||
RSync_thread -> manager : First sync msg\n("integrity_check_global"\nor "integrity_clear") | ||
alt | ||
manager -> RSync_thread : Manager response msg | ||
RSync_thread -> manager : Agent "state" msg | ||
note over RSync_thread, manager | ||
Synchronization is considered successful | ||
when these messages are not exchanged | ||
between manager and agent | ||
end note | ||
end | ||
end | ||
|
||
@enduml |
Oops, something went wrong.