pedrobento988 RodDoSanz commited on
Commit
3fe27ba
·
verified ·
1 Parent(s): 0a1ac14

examples_provided_in_interface (#20)

Browse files

- feat: add examples to UI (8641f03f5935c6bf5e8f418b822248caec12a8b7)


Co-authored-by: Rodrigo Domínguez Sanz <[email protected]>

Files changed (2) hide show
  1. exfiltration_ticket.txt +58 -0
  2. tdagent/grchat.py +10 -1
exfiltration_ticket.txt ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Handle the following ticket by deducing its associated MITRE technique and performing the usual course-of-action:
2
+ {
3
+ "Ticket_ID": "INC-2025-0234",
4
+ "Created_Date": "2025-06-05 03:14:22 UTC",
5
+ "Last_Updated": "2025-06-05 09:53:35 UTC",
6
+ "Status": "In Progress",
7
+ "Severity": "High",
8
+ "Category": "Data Exfiltration",
9
+
10
+ "Detection_Source": {
11
+ "System": "DLP (Data Loss Prevention)",
12
+ "Alert_ID": "DLP-2025-1842",
13
+ "Detection_Rule": "Large Data Transfer Pattern"
14
+ },
15
+
16
+ "Incident_Details": {
17
+ "Summary": "Unusual data transfer pattern detected from Finance Department workstation to unknown external IP",
18
+ "Description": "DLP system detected approximately 2.3GB of data being transferred from a workstation in Finance (IP: 192.168.45.132) to an unrecognized external IP address (176.65.144.169). The transfer occurred outside normal business hours and contained multiple compressed files with potential sensitive data.",
19
+ "Initial_Vector": "Potentially compromised credentials",
20
+ "Affected_Systems": [
21
+ "FINWS-132 (Finance Workstation)",
22
+ "Internal File Server FS-23"
23
+ ]
24
+ },
25
+
26
+ "Technical_Data": {
27
+ "Source_IP": "192.168.45.132",
28
+ "Destination_IP": "176.65.144.169",
29
+ "Timestamp": "2025-06-05 03:12:45 UTC",
30
+ "Protocol": "HTTPS",
31
+ "Port": 7702,
32
+ "Data_Volume": "2.3GB",
33
+ "File_Types": ["zip", "rar", "xlsx", "pdf"]
34
+ },
35
+
36
+ "Actions_Taken": [
37
+ {
38
+ "Time": "2025-06-05 03:14:22 UTC",
39
+ "Action": "Automatic alert generated by DLP system",
40
+ "By": "DLP-System"
41
+ },
42
+ {
43
+ "Time": "2025-06-05 03:25:10 UTC",
44
+ "Action": "Workstation isolated from network",
45
+ "By": "SOC-Analyst-John"
46
+ },
47
+ {
48
+ "Time": "2025-06-05 04:15:33 UTC",
49
+ "Action": "Initial forensic snapshot created",
50
+ "By": "SOC-Analyst-Sarah"
51
+ },
52
+ {
53
+ "Time": "2025-06-05 09:53:35 UTC",
54
+ "Action": "Initiated full system memory dump",
55
+ "By": "IR-Team-Lead"
56
+ }
57
+ ],
58
+ }
tdagent/grchat.py CHANGED
@@ -481,6 +481,12 @@ async def gr_connect_to_azure( # noqa: PLR0913
481
  # )
482
  # return "✅ Successfully connected to nebius!"
483
 
 
 
 
 
 
 
484
 
485
  async def gr_chat_function( # noqa: D103
486
  message: str,
@@ -742,7 +748,10 @@ with (
742
  chat_interface = gr.ChatInterface(
743
  fn=gr_chat_function,
744
  type="messages",
745
- examples=[], # Add examples if needed
 
 
 
746
  description="A simple threat analyst agent with MCP tools.",
747
  )
748
  with gr.TabItem("Demo"):
 
481
  # )
482
  # return "✅ Successfully connected to nebius!"
483
 
484
+ with open("exfiltration_ticket.txt") as fhandle: # noqa: PTH123
485
+ exfiltration_ticket = fhandle.read()
486
+
487
+ with open("sample_kali_linux_1.txt") as fhandle1: # noqa: PTH123
488
+ service_discovery_ticket = fhandle1.read()
489
+
490
 
491
  async def gr_chat_function( # noqa: D103
492
  message: str,
 
748
  chat_interface = gr.ChatInterface(
749
  fn=gr_chat_function,
750
  type="messages",
751
+ examples=[exfiltration_ticket, service_discovery_ticket],
752
+ example_labels=[
753
+ "Enrich & Handle exfiltration ticket 🕵️‍♂️",
754
+ "Handle service discovery ticket 🤖💻"],
755
  description="A simple threat analyst agent with MCP tools.",
756
  )
757
  with gr.TabItem("Demo"):