Here you'll find Martina Tivadar's training slides and labs, along with the scripts to automate malware detection on macOS using the OpenAI o4‑mini model with GitHub actions as part of the last lab.
Martina Tivadar, research assistant at iVerify showed us how large-language models (LLMs) can help in macOS malware detection.
We used Python, Apple's Endpoint Security framework and local running LLMs with LM Studio / OpenAI's API to detect macOS malware.
If you're interested to learn more about #OFTW from Objective-See foundation and the training check my blog post: https://jaybird1291.github.io/blog-cyber/posts/oftw-v3
OFTW-v3-training/
├── .github/
│ └── workflows/
│ └── main.yml # CI: Fetch → Preprocess → Analyze → Commit results
├── data/ # Raw EndpointSecurity JSON logs (empty - used in the GitHub Action)
├── data_preprocessed/ # Truncated & pruned logs (empty - used in the GitHub Action)
├── fetch_data.py # Download raw ES logs from Google Drive
├── preprocess_data.py # Prune fields & limit token context
├── use_llm.py # Send JSON to LLM and parse response
├── results.csv # Latest analysis output (malware detection results)
└── README.md # (you are here)
- macOS 12+ VM (with UTM for example)
- Python 3 (and pip)
- LM Studio (local LLMs) or an OpenAI API key
- GitHub repo with actions enabled (for CI/CD automation)
You can either follow the slides & labs or just fork this repo and:
- Open your repository
- Go to Settings
- In the sidebar, click "Secrets and variables" and then "Actions"
- Click "New repository secret"
- Name the secret
OPENAI_API_KEYand paste your token as the value (likesk-proj-xxxxxxxxxxxx-xxxxxxxxxxxx-xxxxxxxxxxxx-xxxxxxxxxxxx-xxxxxxxxxxxx-xxxxxxxxxxxx). - Click "Add secret" to save
To use another JSON file, create your own Google Drive repository, upload your file and then edit the FILE_ID in fetch_data.py with your own.