Who is this workflow for? The Suspicious Login Detection workflow automates the monitoring and response to potentially unauthorized login attempts. By analyzing login events in real-time, it leverages multiple APIs to assess threat levels and notifies relevant personnel through integrated communication channels, enhancing your organization’s security posture..
What does this workflow do?
Triggering the Workflow: The workflow can be initiated manually within the n8n UI for testing purposes or automatically via a webhook whenever a new login event is detected.
Data Extraction: Upon activation, the workflow extracts key details from the incoming webhook payload, including IP address, user agent, timestamp, URL, and user ID.
Parallel Processing Paths:
GreyNoise Integration: Queries GreyNoise’s Community API with the IP address to obtain threat intelligence. Based on the response, the login attempt is prioritized as High, Medium, or Low. A corresponding alert is sent to a designated Slack channel.
Geolocation Data Retrieval: Uses IP-API’s Geolocation API to fetch location data for the IP address and combines it with user information from the UserParser node. This enriched data is merged with GreyNoise’s data for a comprehensive view.
User Agent Analysis: The UserParser node queries APIs to gather information about the user’s IP and browser details, which is then merged with the geolocation and threat intelligence data.
Threat Assessment: The workflow analyzes the combined data to determine if the IP address is an unknown threat by examining specific fields from GreyNoise.
Historical Data Check: If an unknown threat is identified, the workflow retrieves the last 10 login records for the associated user from a Postgres database.
Discrepancy Detection: Compares current login information with historical data to identify any anomalies, such as new locations or devices.
User Notification: If discrepancies are found, an email alert is sent to inform the user of the suspicious activity.
Error Handling and Security: Ensures that API credentials for GreyNoise and UserParser are securely managed and replaces hardcoded API keys with secure credentials. The workflow also includes validation steps to minimize false positives and negatives.
🤖 Why Use This Automation Workflow?
Automated Threat Assessment: Quickly evaluate login attempts using trusted APIs to determine their legitimacy.
Real-Time Notifications: Instantly notify your team of high-priority security incidents via Slack.
Comprehensive Data Integration: Combine geolocation, user agent, and threat intelligence data for accurate detection and response.
👨💻 Who is This Workflow For?
This workflow is ideal for IT security teams, system administrators, and organizations looking to enhance their security monitoring capabilities without extensive manual intervention. It is suitable for businesses of all sizes that require automated incident response to protect user accounts and sensitive data.
🎯 Use Cases
Preventing Unauthorized Access: Automatically detect and respond to login attempts from suspicious IP addresses, reducing the risk of account breaches.
Enhancing Incident Response: Streamline the process of investigating and addressing security alerts by consolidating relevant data and automating notifications.
Compliance and Auditing: Maintain detailed records of login activities and security incidents, aiding in compliance with industry regulations and internal policies.
TL;DR
The Suspicious Login Detection workflow provides a robust and automated solution for monitoring login activities, assessing potential threats, and notifying relevant stakeholders. By integrating multiple data sources and communication channels, it ensures timely and informed responses to enhance your organization’s security measures.