Skip to content
Notifications
Clear all

Check out what I made: A script to auto-ticket for repeated attack patterns.

10 Posts
10 Users
0 Reactions
73 Views
(@cloud_infra_rookie)
Noble Member
Joined: 5 months ago
Posts: 552
Topic starter   [#22157]

Hey everyone! I'm still pretty new to managing cloud infrastructure, especially around security stuff. I've been learning about Radware for DDoS protection and noticed we were getting similar attack patterns over and over, which meant a lot of manual ticketing.

So I tried making a small script that watches our Radware alerts and automatically creates a ticket in our system if it detects the same attack signature multiple times within a set timeframe. It's basically just parsing logs and using a simple API call.

I'm sure this is super basic for most of you, but I was really happy it worked! 😅 Has anyone else tried automating parts of their Radware workflow? I'm curious if there are better ways to do this or if I should be looking at other tools for this kind of automation.



   
Quote
(@chrisp)
Honorable Member
Joined: 4 months ago
Posts: 462
 

Nice! That's a solid first step. Automating repetitive alert noise is such a win. I've done something similar for our A/B testing alerts when the same error pops up.

For your next iteration, you might think about adding a simple "cool-down" period for the ticket creation. Otherwise, if an attack sputters on and off for an hour, you could end up with a flood of duplicate tickets instead of just one. A small cache of recent signatures can handle that.

Ever thought about logging those patterns to a dashboard? Could help you spot which ones are truly frequent versus one-offs.


✌️


   
ReplyQuote
(@harryj)
Reputable Member
Joined: 4 months ago
Posts: 381
 

Great first step! That exact kind of automation is a huge time-saver. Parsing logs and hitting an API is the core of it.

Since you mentioned looking for other tools, you might check if your ticketing system has any built-in webhook ingestion or simple alert-to-ticket rules. Some can do the de-duplication for you, so your script just passes the raw alert.

Also, think about adding a priority tag based on the attack volume. Makes triage faster for the team.


Automate the boring stuff.


   
ReplyQuote
(@backend_builder)
Prominent Member
Joined: 8 months ago
Posts: 605
 

That's a great practical start. Log parsing + API is exactly how a lot of useful backend automation gets built.

If you're curious about other tools, you could look at something like Fluentd or Vector to handle the log ingestion part more robustly. They can parse, buffer, and ship logs to your script, which lets you focus just on the signature matching and ticket logic.

For the matching itself, are you just doing exact string comparison on the signature? You might get even more mileage by bucketing similar patterns (e.g., same attack type, target IP block) using a regex or a small set of rules. That could cut down on tickets even more.

What's your script written in? Python?


Latency is the enemy, but consistency is the goal.


   
ReplyQuote
(@ci_cd_junkie)
Honorable Member
Joined: 8 months ago
Posts: 476
 

Totally agree on looking at Fluentd or Vector for the log ingestion. It's a game-changer to separate the ingestion pipeline from the business logic - makes the script way more resilient to log format changes or spikes.

> bucketing similar patterns

This is a great point. Exact string matching on signatures can get noisy. We did something similar by adding a small rules engine that groups attacks by type and target subnet. Cut our ticket volume by like 40%. A simple regex to normalize IPs into /24 blocks was a huge part of that.

Probably Python, right? That's my guess for a quick script. If it is, the `re` module and a dict for the buckets would be the next easy step.


pipeline all the things


   
ReplyQuote
(@harukik)
Honorable Member
Joined: 4 months ago
Posts: 400
 

Oh, that's a really good point about the ticketing system handling de-duplication itself. I hadn't thought to check for that. Our system is Jira - do you know if that's a common feature there, or is it more for specialized ITSM tools?

Adding a priority tag based on volume is a smart next step too. I'm just counting occurrences now, but I could pull the Mbps from the logs.



   
ReplyQuote
(@alexr)
Reputable Member
Joined: 4 months ago
Posts: 356
 

Jira's de-duplication features are somewhat limited out of the box for this specific use case. It's not a core strength of generalized project management tools. You'd typically rely on third-party add-ons from the Atlassian Marketplace, like ScriptRunner or automation plugins, to implement true alert correlation and suppress duplicate ticket creation based on a custom key (like your attack signature).

That said, you can approximate it with Jira's native automation rules by using a combination of 'issue exists' conditions and smart values to check for recent similar issues. It's often more brittle than handling it in your own script where you control the state and timing logic completely.

Pulling Mbps for priority is a solid plan. Just be mindful of log latency - the peak volume might not be reflected in the first alert that triggers your script. You might need a short aggregation window to capture the true max.


Measure twice, cut once.


   
ReplyQuote
(@alexf)
Reputable Member
Joined: 4 months ago
Posts: 233
 

Jira can't do real dedupe on its own. You'll need a plugin or handle it in your script, which is more reliable anyway.

Pulling Mbps for priority is good, but watch out for log timestamps. The peak might be in a later log entry, so your ticket could get the wrong initial priority.


Optimize or die.


   
ReplyQuote
(@harryk)
Reputable Member
Joined: 4 months ago
Posts: 453
 

You're absolutely right about handling deduplication in the script being more reliable. We learned that the hard way when a plugin update broke our Jira automation, and a storm of duplicate tickets slipped through. It's worth the extra few lines of code to own that logic.

The timestamp point is super important, and it gets even trickier with distributed systems. If logs are coming from multiple Radware sensors in different regions, you can't guarantee order. Our script had to start buffering alerts for a short window, then calculate the peak volume from the batch before creating the ticket, which also helped with the cool-down period others mentioned.

Has your team run into issues with logs arriving out of sequence?


Architect first, buy later


   
ReplyQuote
(@data_pipeline_guy_42)
Reputable Member
Joined: 5 months ago
Posts: 271
 

Exactly. The plugin brittleness is a huge hidden cost. You think you're outsourcing complexity, but you're just trading script maintenance for black-box dependency management.

Buffering for out-of-order logs is the right move, but you have to be careful with the window size. Too short and you miss stragglers, too long and your ticket creation latency spikes. We settled on a 5-minute tumbling window with a watermark that allowed for 60 seconds of late data. Anything after that gets logged as a late arrival and dropped from the volume calculation. It's a trade-off.

And yes, we saw out-of-order logs constantly from cloud front-ends versus on-prem sensors. Timestamps from the host aren't worth much. You need to use the log generation timestamp, if your source provides one, and even then you're at the mercy of their system clock.


garbage in, garbage out


   
ReplyQuote