Skip to content

Commit

Permalink
Integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NachoEchevarria committed Nov 20, 2024
1 parent c5c2b53 commit 52bba01
Show file tree
Hide file tree
Showing 19 changed files with 800 additions and 34 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
[
{
TraceId: Id_1,
SpanId: Id_2,
Name: aspnet_core_mvc.request,
Resource: GET /iast/executecommand,
Service: Samples.Security.AspNetCore2,
Type: web,
ParentId: Id_3,
Tags: {
aspnet_core.action: executecommand,
aspnet_core.controller: iast,
aspnet_core.route: iast/executecommand,
component: aspnet_core,
env: integration_tests,
language: dotnet,
span.kind: server,
_dd.origin: appsec
}
},
{
TraceId: Id_1,
SpanId: Id_3,
Name: aspnet_core.request,
Resource: GET /iast/executecommand,
Service: Samples.Security.AspNetCore2,
Type: web,
Tags: {
actor.ip: 86.242.244.246,
appsec.blocked: true,
appsec.event: true,
aspnet_core.route: iast/executecommand,
component: aspnet_core,
env: integration_tests,
http.endpoint: iast/executecommand,
http.method: GET,
http.request.headers.accept-language: en_UK,
http.request.headers.host: localhost:00000,
http.request.headers.user-agent: Mistake Not...,
http.request.headers.x-forwarded-for: 86.242.244.246,
http.response.headers.content-type: application/json,
http.route: iast/executecommand,
http.status_code: 403,
http.url: http://localhost:00000/Iast/ExecuteCommand?file=/bin/rebootCommand&argumentLine=-f&fromShell=false,
http.useragent: Mistake Not...,
language: dotnet,
runtime-id: Guid_1,
span.kind: server,
_dd.appsec.fp.http.endpoint: http-get-92238171-0a2bbc6e-,
_dd.appsec.fp.http.header: hdr-0100000001-3626b5f8-3-bf93958a,
_dd.appsec.fp.http.network: net-1-1000000000,
_dd.appsec.fp.session: ssn--bd9bce81-d0fff5a7-,
_dd.appsec.json: {"triggers":[{"rule":{"id":"rasp-932-110","name":"OS command injection exploit","tags":{"category":"vulnerability_trigger","type":"command_injection"}},"rule_matches":[{"operator":"cmdi_detector","operator_value":"","parameters":[{"address":null,"highlight":["/bin/rebootCommand"],"key_path":null,"value":null}]}],"span_id": XXX}]},
_dd.origin: appsec,
_dd.runtime_family: dotnet
},
Metrics: {
process_id: 0,
_dd.appsec.enabled: 1.0,
_dd.appsec.rasp.duration: 0.0,
_dd.appsec.rasp.duration_ext: 0.0,
_dd.appsec.rasp.rule.eval: 1.0,
_dd.appsec.waf.duration: 0.0,
_dd.appsec.waf.duration_ext: 0.0,
_dd.top_level: 1.0,
_dd.tracer_kr: 1.0,
_sampling_priority_v1: 2.0
},
MetaStruct: {
appsec: ,
_dd.stack:
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
_dd.appsec.fp.http.header: hdr-0100000001-3626b5f8-3-bf93958a,
_dd.appsec.fp.http.network: net-1-1000000000,
_dd.appsec.fp.session: ssn--bd9bce81-d0fff5a7-,
_dd.appsec.json: {"triggers":[{"rule":{"id":"rasp-932-100","name":"Shell injection exploit","tags":{"category":"vulnerability_trigger","type":"command_injection"}},"rule_matches":[{"operator":"shi_detector","operator_value":"","parameters":[{"address":null,"highlight":[";evilCommand"],"key_path":null,"value":null}]}],"span_id": XXX}]},
_dd.appsec.json: {"triggers":[{"rule":{"id":"rasp-932-100","name":"Shell command injection exploit","tags":{"category":"vulnerability_trigger","type":"command_injection"}},"rule_matches":[{"operator":"shi_detector","operator_value":"","parameters":[{"address":null,"highlight":[";evilCommand"],"key_path":null,"value":null}]}],"span_id": XXX}]},
_dd.origin: appsec,
_dd.runtime_family: dotnet
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
[
{
TraceId: Id_1,
SpanId: Id_2,
Name: aspnet_core_mvc.request,
Resource: GET /iast/executecommand,
Service: Samples.Security.AspNetCore5,
Type: web,
ParentId: Id_3,
Tags: {
aspnet_core.action: executecommand,
aspnet_core.controller: iast,
aspnet_core.route: iast/executecommand,
component: aspnet_core,
env: integration_tests,
language: dotnet,
span.kind: server,
_dd.origin: appsec
}
},
{
TraceId: Id_1,
SpanId: Id_3,
Name: aspnet_core.request,
Resource: GET /iast/executecommand,
Service: Samples.Security.AspNetCore5,
Type: web,
Tags: {
actor.ip: 86.242.244.246,
appsec.blocked: true,
appsec.event: true,
aspnet_core.endpoint: Samples.Security.AspNetCore5.Controllers.IastController.ExecuteCommand (Samples.Security.AspNetCore5),
aspnet_core.route: iast/executecommand,
component: aspnet_core,
env: integration_tests,
http.endpoint: iast/executecommand,
http.method: GET,
http.request.headers.accept-language: en_UK,
http.request.headers.host: localhost:00000,
http.request.headers.user-agent: Mistake Not...,
http.request.headers.x-forwarded-for: 86.242.244.246,
http.response.headers.content-type: application/json,
http.route: iast/executecommand,
http.status_code: 403,
http.url: http://localhost:00000/Iast/ExecuteCommand?file=/bin/rebootCommand&argumentLine=-f&fromShell=false,
http.useragent: Mistake Not...,
language: dotnet,
runtime-id: Guid_1,
span.kind: server,
_dd.appsec.fp.http.endpoint: http-get-92238171-0a2bbc6e-,
_dd.appsec.fp.http.header: hdr-0000000001-3626b5f8-3-bf93958a,
_dd.appsec.fp.http.network: net-1-1000000000,
_dd.appsec.fp.session: ssn--bd9bce81-d0fff5a7-,
_dd.appsec.json: {"triggers":[{"rule":{"id":"rasp-932-110","name":"OS command injection exploit","tags":{"category":"vulnerability_trigger","type":"command_injection"}},"rule_matches":[{"operator":"cmdi_detector","operator_value":"","parameters":[{"address":null,"highlight":["/bin/rebootCommand"],"key_path":null,"value":null}]}],"span_id": XXX}]},
_dd.origin: appsec,
_dd.runtime_family: dotnet
},
Metrics: {
process_id: 0,
_dd.appsec.enabled: 1.0,
_dd.appsec.rasp.duration: 0.0,
_dd.appsec.rasp.duration_ext: 0.0,
_dd.appsec.rasp.rule.eval: 1.0,
_dd.appsec.waf.duration: 0.0,
_dd.appsec.waf.duration_ext: 0.0,
_dd.top_level: 1.0,
_dd.tracer_kr: 1.0,
_sampling_priority_v1: 2.0
},
MetaStruct: {
appsec: ,
_dd.stack:
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
_dd.appsec.fp.http.header: hdr-0000000001-3626b5f8-3-bf93958a,
_dd.appsec.fp.http.network: net-1-1000000000,
_dd.appsec.fp.session: ssn--bd9bce81-d0fff5a7-,
_dd.appsec.json: {"triggers":[{"rule":{"id":"rasp-932-100","name":"Shell injection exploit","tags":{"category":"vulnerability_trigger","type":"command_injection"}},"rule_matches":[{"operator":"shi_detector","operator_value":"","parameters":[{"address":null,"highlight":[";evilCommand"],"key_path":null,"value":null}]}],"span_id": XXX}]},
_dd.appsec.json: {"triggers":[{"rule":{"id":"rasp-932-100","name":"Shell command injection exploit","tags":{"category":"vulnerability_trigger","type":"command_injection"}},"rule_matches":[{"operator":"shi_detector","operator_value":"","parameters":[{"address":null,"highlight":[";evilCommand"],"key_path":null,"value":null}]}],"span_id": XXX}]},
_dd.origin: appsec,
_dd.runtime_family: dotnet
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
[
{
TraceId: Id_1,
SpanId: Id_2,
Name: aspnet.request,
Resource: GET /iast/executecommand,
Service: sample,
Type: web,
Tags: {
actor.ip: 86.242.244.246,
appsec.blocked: true,
appsec.event: true,
env: integration_tests,
http.method: GET,
http.request.headers.accept-language: en_UK,
http.request.headers.host: localhost:00000,
http.request.headers.user-agent: Mistake Not...,
http.request.headers.x-forwarded-for: 86.242.244.246,
http.route: {controller}/{action}/{id},
http.status_code: 403,
http.url: http://localhost:00000/Iast/ExecuteCommand?file=/bin/rebootCommand&argumentLine=-f&fromShell=false,
http.useragent: Mistake Not...,
language: dotnet,
runtime-id: Guid_1,
span.kind: server,
_dd.appsec.fp.http.endpoint: http-get-92238171-0a2bbc6e-,
_dd.appsec.fp.http.header: hdr-0000000001-3626b5f8-3-bf93958a,
_dd.appsec.fp.http.network: net-1-1000000000,
_dd.appsec.fp.session: ssn--bd9bce81-d0fff5a7-,
_dd.appsec.json: {"triggers":[{"rule":{"id":"rasp-932-110","name":"OS command injection exploit","tags":{"category":"vulnerability_trigger","type":"command_injection"}},"rule_matches":[{"operator":"cmdi_detector","operator_value":"","parameters":[{"address":null,"highlight":["/bin/rebootCommand"],"key_path":null,"value":null}]}],"span_id": XXX}]},
_dd.origin: appsec,
_dd.runtime_family: dotnet
},
Metrics: {
process_id: 0,
_dd.appsec.enabled: 1.0,
_dd.appsec.rasp.duration: 0.0,
_dd.appsec.rasp.duration_ext: 0.0,
_dd.appsec.rasp.rule.eval: 1.0,
_dd.appsec.waf.duration: 0.0,
_dd.appsec.waf.duration_ext: 0.0,
_dd.top_level: 1.0,
_dd.tracer_kr: 1.0,
_sampling_priority_v1: 2.0
},
MetaStruct: {
appsec: ,
_dd.stack:
}
},
{
TraceId: Id_1,
SpanId: Id_3,
Name: aspnet-mvc.request,
Resource: GET /iast/executecommand,
Service: sample,
Type: web,
ParentId: Id_2,
Tags: {
aspnet.action: executecommand,
aspnet.controller: iast,
aspnet.route: {controller}/{action}/{id},
env: integration_tests,
http.method: GET,
http.request.headers.host: localhost:00000,
http.status_code: 403,
http.url: http://localhost:00000/Iast/ExecuteCommand?file=/bin/rebootCommand&argumentLine=-f&fromShell=false,
http.useragent: Mistake Not...,
language: dotnet,
span.kind: server,
_dd.origin: appsec
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
_dd.appsec.fp.http.header: hdr-0000000001-3626b5f8-3-bf93958a,
_dd.appsec.fp.http.network: net-1-1000000000,
_dd.appsec.fp.session: ssn--bd9bce81-d0fff5a7-,
_dd.appsec.json: {"triggers":[{"rule":{"id":"rasp-932-100","name":"Shell injection exploit","tags":{"category":"vulnerability_trigger","type":"command_injection"}},"rule_matches":[{"operator":"shi_detector","operator_value":"","parameters":[{"address":null,"highlight":[";evilCommand"],"key_path":null,"value":null}]}],"span_id": XXX}]},
_dd.appsec.json: {"triggers":[{"rule":{"id":"rasp-932-100","name":"Shell command injection exploit","tags":{"category":"vulnerability_trigger","type":"command_injection"}},"rule_matches":[{"operator":"shi_detector","operator_value":"","parameters":[{"address":null,"highlight":[";evilCommand"],"key_path":null,"value":null}]}],"span_id": XXX}]},
_dd.origin: appsec,
_dd.runtime_family: dotnet
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
[
{
TraceId: Id_1,
SpanId: Id_2,
Name: aspnet.request,
Resource: GET /iast/executecommand,
Service: sample,
Type: web,
Tags: {
actor.ip: 86.242.244.246,
appsec.blocked: true,
appsec.event: true,
env: integration_tests,
http.method: GET,
http.request.headers.accept-language: en_UK,
http.request.headers.host: localhost:00000,
http.request.headers.user-agent: Mistake Not...,
http.request.headers.x-forwarded-for: 86.242.244.246,
http.response.headers.content-type: application/json; charset=utf-8,
http.route: {controller}/{action}/{id},
http.status_code: 403,
http.url: http://localhost:00000/Iast/ExecuteCommand?file=/bin/rebootCommand&argumentLine=-f&fromShell=false,
http.useragent: Mistake Not...,
language: dotnet,
runtime-id: Guid_1,
span.kind: server,
_dd.appsec.fp.http.endpoint: http-get-92238171-0a2bbc6e-,
_dd.appsec.fp.http.header: hdr-0000000001-3626b5f8-5-6cdcf2fe,
_dd.appsec.fp.http.network: net-1-1000000000,
_dd.appsec.fp.session: ssn--bd9bce81-d0fff5a7-,
_dd.appsec.json: {"triggers":[{"rule":{"id":"rasp-932-110","name":"OS command injection exploit","tags":{"category":"vulnerability_trigger","type":"command_injection"}},"rule_matches":[{"operator":"cmdi_detector","operator_value":"","parameters":[{"address":null,"highlight":["/bin/rebootCommand"],"key_path":null,"value":null}]}],"span_id": XXX}]},
_dd.origin: appsec,
_dd.runtime_family: dotnet
},
Metrics: {
process_id: 0,
_dd.appsec.enabled: 1.0,
_dd.appsec.rasp.duration: 0.0,
_dd.appsec.rasp.duration_ext: 0.0,
_dd.appsec.rasp.rule.eval: 1.0,
_dd.appsec.waf.duration: 0.0,
_dd.appsec.waf.duration_ext: 0.0,
_dd.top_level: 1.0,
_dd.tracer_kr: 1.0,
_sampling_priority_v1: 2.0
},
MetaStruct: {
appsec: ,
_dd.stack:
}
},
{
TraceId: Id_1,
SpanId: Id_3,
Name: aspnet-mvc.request,
Resource: GET /iast/executecommand,
Service: sample,
Type: web,
ParentId: Id_2,
Tags: {
aspnet.action: executecommand,
aspnet.controller: iast,
aspnet.route: {controller}/{action}/{id},
env: integration_tests,
http.method: GET,
http.request.headers.host: localhost:00000,
http.status_code: 403,
http.url: http://localhost:00000/Iast/ExecuteCommand?file=/bin/rebootCommand&argumentLine=-f&fromShell=false,
http.useragent: Mistake Not...,
language: dotnet,
span.kind: server,
_dd.origin: appsec
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
_dd.appsec.fp.http.header: hdr-0000000001-3626b5f8-5-6cdcf2fe,
_dd.appsec.fp.http.network: net-1-1000000000,
_dd.appsec.fp.session: ssn--bd9bce81-d0fff5a7-,
_dd.appsec.json: {"triggers":[{"rule":{"id":"rasp-932-100","name":"Shell injection exploit","tags":{"category":"vulnerability_trigger","type":"command_injection"}},"rule_matches":[{"operator":"shi_detector","operator_value":"","parameters":[{"address":null,"highlight":[";evilCommand"],"key_path":null,"value":null}]}],"span_id": XXX}]},
_dd.appsec.json: {"triggers":[{"rule":{"id":"rasp-932-100","name":"Shell command injection exploit","tags":{"category":"vulnerability_trigger","type":"command_injection"}},"rule_matches":[{"operator":"shi_detector","operator_value":"","parameters":[{"address":null,"highlight":[";evilCommand"],"key_path":null,"value":null}]}],"span_id": XXX}]},
_dd.origin: appsec,
_dd.runtime_family: dotnet
},
Expand Down
Loading

0 comments on commit 52bba01

Please sign in to comment.