// SOC Portfolio — Lab 29

Python Security Automation

Three SOC automation scripts built in Python 3 — log parsing, IP reputation lookup, and triage report generation

Date: May 12, 2026
Language: Python 3.11.9
Platform: Kali Linux
API: AbuseIPDB v2
Scripts: 3

Lab Summary

3Scripts Built
6Failed Logins Detected
3Source IPs Identified
1API Integrated
4Accounts Targeted

Environment

FieldDetail
PlatformKali Linux (VMware Workstation)
LanguagePython 3.11.9
EditorGNU nano 8.1
Log Fileauth.log (simulated SSH authentication log)
External APIAbuseIPDB v2 — IP reputation lookup
Scriptslog_parser.py, ip_reputation.py, alert_summary.py
Working Directory~/soc-lab-29-python

Script 1 — Log Parser

log_parser.py reads a simulated SSH authentication log and extracts all failed login attempts, displaying each event with full timestamp, account name, and source IP.

Key output:

Script 2 — IP Reputation Checker

ip_reputation.py queries the AbuseIPDB REST API to retrieve threat intelligence on a suspicious IP address identified during log analysis.

API response fields returned:

Script 3 — Alert Summary Report

alert_summary.py combines log parsing and IP analysis into a formatted SOC triage report, automatically ranking offending accounts by attempt count and generating recommended containment actions.

Report output included:

Findings

AccountFailed AttemptsSource IPsAction
admin3192.168.1.105, 10.0.0.22ESCALATE
root1192.168.1.105MONITOR
guest1192.168.1.105MONITOR
test110.0.0.22MONITOR

MITRE ATT&CK Mapping

FieldValue
TacticCredential Access (TA0006)
TechniqueBrute Force (T1110)
Sub-techniquePassword Guessing (T1110.001)
ObjectiveGain unauthorized SSH access via repeated credential attempts

Screenshots

Log Parser Output
Script 1 — log_parser.py — 6 failed login attempts detected
IP Reputation Output
Script 2 — ip_reputation.py — AbuseIPDB API response for 192.168.1.105
Alert Summary Report
Script 3 — alert_summary.py — formatted SOC triage report with recommendations

Outcome

> log_parser.py — 6 failed SSH login attempts detected across 3 source IPs
> ip_reputation.py — AbuseIPDB API integrated and queried successfully
> alert_summary.py — triage report generated with ranked offenders and recommendations
> Python scripting demonstrated as viable SOC automation tool
> Lab 29 confirmed — all scripts functional on Kali Linux