Skip to content

Commit

Permalink
feat: Add signature versioning (#597)
Browse files Browse the repository at this point in the history
  • Loading branch information
simar7 committed Mar 8, 2021
1 parent 6486492 commit a6ceb2e
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions tracee-rules/signature_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ func Test_getSignatures(t *testing.T) {
gotMetadata, err := sigs[0].GetMetadata()
assert.Equal(t, types.SignatureMetadata{
ID: "TRC-2",
Version: "0.1.0",
Name: "Anti-Debugging",
Description: "Process uses anti-debugging technique to block debugger",
Tags: []string{"linux", "container"},
Expand Down
3 changes: 2 additions & 1 deletion tracee-rules/signatures/golang/examples/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ func (sig *counter) Init(cb types.SignatureHandler) error {
// GetMetadata implements the Signature interface by declaring information about the signature
func (sig *counter) GetMetadata() (types.SignatureMetadata, error) {
return types.SignatureMetadata{
Name: "count to " + strconv.Itoa(sig.target),
Version: "0.1.0",
Name: "count to " + strconv.Itoa(sig.target),
}, nil
}

Expand Down
1 change: 1 addition & 0 deletions tracee-rules/signatures/golang/stdio_over_socket.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func (sig *stdioOverSocket) Init(cb types.SignatureHandler) error {
func (sig *stdioOverSocket) GetMetadata() (types.SignatureMetadata, error) {
return types.SignatureMetadata{
ID: "TRC-1",
Version: "0.1.0",
Name: "Standard Input/Output Over Socket",
Description: "Redirection of process's standard input/output to socket",
Tags: []string{"linux", "container"},
Expand Down
1 change: 1 addition & 0 deletions tracee-rules/signatures/rego/anti_debugging_ptraceme.rego
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package tracee.TRC_2

__rego_metadoc__ := {
"id": "TRC-2",
"version": "0.1.0",
"name": "Anti-Debugging",
"description": "Process uses anti-debugging technique to block debugger",
"tags": ["linux", "container"],
Expand Down
1 change: 1 addition & 0 deletions tracee-rules/signatures/rego/code_injection.rego
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import data.tracee.helpers

__rego_metadoc__ := {
"id": "TRC-3",
"version": "0.1.0",
"name": "Code injection",
"description": "Possible code injection into another process",
"tags": ["linux", "container"],
Expand Down
1 change: 1 addition & 0 deletions tracee-rules/signatures/rego/dynamic_code_loading.rego
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import data.tracee.helpers

__rego_metadoc__ := {
"id": "TRC-4",
"version": "0.1.0",
"name": "Dynamic Code Loading",
"description": "Writing to executable allocated memory region",
"tags": ["linux", "container"],
Expand Down
1 change: 1 addition & 0 deletions tracee-rules/signatures/rego/fileless_execution.rego
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import data.tracee.helpers

__rego_metadoc__ := {
"id": "TRC-5",
"version": "0.1.0",
"name": "Fileless Execution",
"description": "Executing a precess from memory, without a file in the disk",
"tags": ["linux", "container"],
Expand Down
1 change: 1 addition & 0 deletions tracee-rules/signatures/rego/kernel_module_loading.rego
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package tracee.TRC_6

__rego_metadoc__ := {
"id": "TRC-6",
"version": "0.1.0",
"name": "kernel module loading",
"description": "Attempt to load a kernel module detection",
"tags": ["linux", "container"],
Expand Down
1 change: 1 addition & 0 deletions tracee-rules/signatures/rego/ld_preload.rego
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import data.tracee.helpers

__rego_metadoc__ := {
"id": "TRC-7",
"version": "0.1.0",
"name": "LD_PRELOAD",
"description": "Usage of LD_PRELOAD to allow hooks on process",
"tags": ["linux", "container"],
Expand Down
1 change: 1 addition & 0 deletions tracee-rules/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type Signature interface {
//SignatureMetadata represents information about the signature
type SignatureMetadata struct {
ID string
Version string
Name string
Description string
Tags []string
Expand Down

0 comments on commit a6ceb2e

Please sign in to comment.