[Paper Review] GPT-2C: A GPT-2 parser for Cowrie honeypot logs
This paper presents GPT-2C, a fine-tuned GPT-2 language model that parses dynamic, unstructured logs from the Cowrie SSH honeypot by treating log parsing as a Question Answering task. The system achieves 89% F1-score on out-of-sample test data with acceptable inference latency, enabling automated, domain-adaptive log extraction for SIEM and EDR integration.
Deception technologies like honeypots produce comprehensive log reports, but often lack interoperability with EDR and SIEM technologies. A key bottleneck is that existing information transformation plugins perform well on static logs (e.g. geolocation), but face limitations when it comes to parsing dynamic log topics (e.g. user-generated content). In this paper, we present a run-time system (GPT-2C) that leverages large pre-trained models (GPT-2) to parse dynamic logs generate by a Cowrie SSH honeypot. Our fine-tuned model achieves 89\% inference accuracy in the new domain and demonstrates acceptable execution latency.
Motivation & Objective
- To address the lack of interoperability between honeypot logs and SIEM/EDR tools due to dynamic, unstructured log content.
- To automate the parsing of attacker-generated commands and utilities in Cowrie logs without relying on static templates or labeled training data.
- To evaluate the feasibility of using large pre-trained language models for domain-specific log parsing in cybersecurity.
- To reduce manual effort in log transformation by replacing rule-based or template-based parsers with an AI-driven, adaptable system.
Proposed method
- Fine-tuned a GPT-2 model on the CyberLab honeynet dataset containing Cowrie logs in JSON format from May 2019 to February 2020.
- Reformulated log parsing as a span-based Question Answering task, where the model predicts utilities or commands from attacker log lines.
- Deployed the model via a FastAPI-based Inference Server that accepts JSON payloads, performs real-time inference, and returns predictions with confidence scores.
- Integrated the system into a pipeline using Logstash for log ingestion, Elasticsearch for indexing, and Kibana for visualization and monitoring.
- Loaded the pre-trained GPT-2 model into memory once at startup to enable low-latency inference on incoming attacker commands.
- Used a dual learning curve analysis to validate model convergence and generalization during training.
Experimental results
Research questions
- RQ1Can a fine-tuned GPT-2 model effectively parse dynamic, unstructured log content from a Cowrie honeypot with high accuracy?
- RQ2How does the performance of the GPT-2-based parser compare to traditional template-based or rule-based log parsing methods in terms of accuracy and adaptability?
- RQ3What is the inference latency of the deployed model in a real-time, production-like environment?
- RQ4Can the model generalize to out-of-sample log data without requiring extensive retraining or labeled data?
Key findings
- The GPT-2C model achieved an F1-score of 89.827% on the out-of-sample test set, demonstrating strong performance in parsing dynamic log content.
- The training and validation loss curves showed a good fit, with losses ranging from 0.07 to 0.10, indicating stable convergence.
- Inference latency was acceptable, with the 99th percentile of response times reaching up to 4 seconds in 1 in 100 cases, while most responses were sub-second.
- The system successfully extracted and categorized attacker tools and commands, with top predictions visualized in Kibana dashboards.
- The deployment architecture using FastAPI enabled concurrent inference and decoupled log processing from model inference, improving system scalability and maintainability.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.