karimaloulou commited on
Commit
ce512f2
·
verified ·
1 Parent(s): 88598e9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -8
app.py CHANGED
@@ -66,14 +66,26 @@ demo = gr.ChatInterface(
66
  additional_inputs=[
67
  # gr.Textbox(value=f"""<s>[INST] Given these TTPs: {techniques_str}\n\n and here are {descriptions}\n\nfigure out which major techniques are used in these logs and respond in bullets points and nothing else[/INST]""", label="System message"),
68
  # gr.Textbox(value=f"""<s>[INST] Given these TTPs: {techniques_str}\n\nfigure out which major techniques are used in these logs and respond in bullets points and nothing else[/INST]""", label="System message"),
69
- gr.Textbox(value=f"""<s>[INST] In first step Given these TTPs: {techniques_str}\n\nfigure out which major techniques are used in these logs and respond in bullets points and nothing else\n\n
70
- In second step next act like a cybersecurity analyst skilled in interpreting various types of logs resulting from different cyberattacks, including phishing, malware, advanced persistent threats, denial-of-service (DoS) and distributed denial-of-service (DDoS) attacks, man-in-the-middle (MitM) attacks, SQL injection attacks, and zero-day exploits. Using the following types of logs—login failures, event logs, firewall logs, and brute force logs—analyze the data and provide an interpretation of the analysis in English.
71
- **Important:** Do not use any information outside of the input provided. Focus solely on the data and indicators given in this prompt.
72
- Indicators to investigate: Multiple IP addresses signing in to the same account within a short period or Excessive login failures including failed MFA requests, failed username/password attempts, or failures due to geo-blocking
73
- or Multiple sign-in attempts from different countries within a short period or Detection of malware on the device or Unusual activity by admin accounts, including excessive actions or Resetting passwords and changing MFA methods
74
- or Sharing emails with attachments to personal accounts or Logins occurring after working hours or General unusual user account activity.
75
- Response: Provide a detailed analysis and interpretation of the observed logs, focusing on identifying and explaining only potential security threats or breaches. Ensure that your analysis is based solely on the information and indicators provided in this prompt.
76
- [/INST]""", label="System message"),
 
 
 
 
 
 
 
 
 
 
 
 
77
  gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
78
  gr.Slider(minimum=0.1, maximum=1.0, value=0.1, step=0.1, label="Temperature"),
79
  gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),
 
66
  additional_inputs=[
67
  # gr.Textbox(value=f"""<s>[INST] Given these TTPs: {techniques_str}\n\n and here are {descriptions}\n\nfigure out which major techniques are used in these logs and respond in bullets points and nothing else[/INST]""", label="System message"),
68
  # gr.Textbox(value=f"""<s>[INST] Given these TTPs: {techniques_str}\n\nfigure out which major techniques are used in these logs and respond in bullets points and nothing else[/INST]""", label="System message"),
69
+ gr.Textbox(
70
+ value=f"""<s>[INST]
71
+ Step 1: Given these TTPs: {techniques_str}, identify the major techniques present in these logs and list them in bullet points only.\n\n
72
+
73
+ Step 2: As a cybersecurity analyst, interpret the logs provided, which include login failures, event logs, firewall logs, and brute force logs. Analyze the data and provide an interpretation based on the following indicators:
74
+ - Multiple IP addresses signing in to the same account within a short period
75
+ - Excessive login failures (failed MFA requests, failed username/password attempts, failures due to geo-blocking)
76
+ - Multiple sign-in attempts from different countries within a short period
77
+ - Detection of malware on the device
78
+ - Unusual activity by admin accounts (excessive actions, resetting passwords, changing MFA methods)
79
+ - Sharing emails with attachments to personal accounts
80
+ - Logins occurring after working hours
81
+ - General unusual user account activity
82
+
83
+ Important: Do not use any information outside of the input provided. Focus solely on the data and indicators given in this prompt.
84
+
85
+ Response: Provide a detailed analysis and interpretation of the observed logs, focusing on identifying and explaining potential security threats or breaches based solely on the information and indicators provided.
86
+ [/INST]""",
87
+ label="System message"
88
+ ),
89
  gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
90
  gr.Slider(minimum=0.1, maximum=1.0, value=0.1, step=0.1, label="Temperature"),
91
  gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),