OWASP Juice Shop is successfully deployed within an isolated cybersecurity laboratory to provide a controlled environment for web application security testing.
The HTTP traffic inspection workflow is configured using OWASP ZAP, enabling relevant requests, responses, and available security evidence to be collected during normal application activity and controlled SQL Injection testing.
Existing public web-application security data is reviewed as an additional source where suitable records are available. The project does not depend on a predefined dataset name and documents the suitability of any selected external data source.
Collected HTTP and security-related records are preprocessed into a consistent textual representation while preserving the contextual information required for investigation.
TF-IDF converts the selected log text into numerical feature vectors, providing a representation suitable for textual similarity analysis.
Cosine Similarity generates scores that indicate the degree of textual similarity between selected log entries. These scores are used to identify candidate relationships for further investigation rather than independently confirming an attack.
The event-correlation workflow combines similarity results with available timestamps, request paths, HTTP methods, request identifiers, source information, and controlled test context to identify potentially related security events.
Correlated records are arranged chronologically to reconstruct the observed sequence of events associated with the controlled SQL Injection test. The resulting timeline retains references to the original records and distinguishes observed facts from inferred relationships.
SQLite stores the collected evidence, similarity scores, event relationships, incident timeline, and investigation results in a structured format.
Gemma 2 2B Instruct analyzes the correlated evidence through Ollama and generates a readable incident summary containing the observed activity, supporting evidence, possible explanations, and recommended investigation steps.
The generated incident report is verified against the original HTTP traffic and available application or security-tool records, ensuring that unsupported statements are identified before the report is accepted.
Repeated testing with normal application activity and controlled SQL Injection scenarios provides evidence for evaluating the correlation workflow, including false correlations, missed relationships, timeline quality, and report accuracy.
The complete workflow of application deployment, controlled security testing, log collection, public-data assessment, TF-IDF feature extraction, Cosine Similarity calculation, contextual event correlation, incident reconstruction, evidence storage, LLM-assisted summarization, and final validation is demonstrated.
The final project provides a practical AI for Cybersecurity implementation focused on similarity-based security log correlation and LLM-assisted incident reconstruction. Its results demonstrate how text similarity and evidence-based analysis can assist incident investigation, while documenting the limitations of textual similarity and the need for contextual validation.