AppSensor: Real-Time Event Detection and Response - John Melton
AppSecUSA 2015 explores AppSensor: Real-Time Event Detection and Response - John Melton.
Summary
### Overview In this talk, John Melton introduces OWASP AppSensor, an open-source initiative consisting of both a broader conceptual framework and a reference implementation tool designed to give applications real-time event detection and automated response capabilities. Highlighting the shift toward DevOps, cloud architecture, and modern development speed over the preceding five years, Melton argues that traditional security solutions cannot scale without collaboration with development and operations teams. AppSensor addresses the gap between network/perimeter defenses and deep application logic by embedding detection points directly within the software, allowing systems to recognize attacker reconnaissance and act before an exploit succeeds.
### Key Topics - **Core Primitives & Terminology**: Melton defines AppSensor's central abstractions: an *Event* (a suspicious action not necessarily malicious in isolation), an *Attack* (one or more events crossing a configured threshold of badness), a *Response* (a one-to-one action taken upon detecting an attack), and a *Detection Point* (locations in application logic where suspicious behaviors are monitored). - **Architecture and Extensibility**: Although originally created six years prior as a drop-in replacement for OWASP ESAPI's intrusion detection component in Java, the AppSensor reference implementation was rebuilt. The core analysis server runs in Java, but applications can communicate across platforms and languages through modular communication modes including REST APIs, WebSockets, Kafka, RabbitMQ, and Thrift. - **Policy and Machine Learning**: Current analysis relies primarily on static, policy-driven thresholds (e.g., triggering a response if five input validation failures occur in 20 seconds from the same user). Melton details early exploratory work on machine learning and behavioral modeling developed with researchers from UNC Charlotte to identify abnormal spikes or drops in traffic without strictly pre-configured rules. - **Integration Ecosystem**: The talk details integrations such as the OWASP ASIDE plugin (an Eclipse/IDE assistant that guides developers to add AppSensor detection points and input validation checks), reporting pipelines for the ELK stack (Elasticsearch, Logstash, Kibana) and InfluxDB/Grafana developed during OWASP Summer of Code, and related industry projects like Netflix's Ensnare and Fido, Yelp's ElastAlert, and Riemann.
### Technical Details AppSensor differentiates itself from Web Application Firewalls (WAFs) by operating inside application business logic. Melton demonstrates a money transfer scenario: standard authorization code checks whether the authenticated user owns the debiting account. If a user tampers with the account number parameter in an HTTP request, an else-block fires an AppSensor event (`AC2`). AppSensor aggregates incoming events in its datastore, where listener engines evaluate policies. When an attack threshold is crossed, AppSensor issues responses back to the application or administrative pipelines—ranging from enhanced logging, alerting administrators, or actively terminating the attacker's session. Melton explains integration with Spring Security, where listeners intercept failed login events and automatically trigger framework-level actions like logging the offending user out.
### Takeaways To defend modern applications, organizations must monitor runtime behavior and leverage business logic knowledge that perimeter tools lack. AppSensor requires a baseline secure SDLC, acting as an enhancement rather than a replacement for core input validation and authorization checks. Teams can adopt the AppSensor reference implementation or implement the conceptual model using existing messaging architectures like Kafka or RabbitMQ to achieve automated, real-time threat response.
Related talks
Hackers of CypherCon·45 min
Chris Merkel | CypherCon 6.0
Chris Merkel | CypherCon 6.0 analyzes Authentication Proxy Attacks Detection, Response and Hunting.
35th Annual FIRST Conference·24 min
Industry experts analyze emerging threats surrounding Authentication Proxy Attacks: Detection, Response and Hunting.
RSAC Cybersecurity·30 min
Industry experts analyze emerging threats surrounding Webcast: MIDAS: Real-Time Streaming Anomaly Detection in Dynamic Graphs.


