Today's Deep-Dive: SafeLine
Ep. 269

Today's Deep-Dive: SafeLine

Episode description

A web application firewall (WAF) is essential for protecting online applications from threats like data theft, code execution, and server compromise. Unlike traditional network firewalls, a WAF focuses on securing HTTP traffic. Safeline, a popular self-hosted WAF, uses machine learning to intelligently filter traffic, achieving high accuracy and low false positives. It defends against various threats, including SQL injection, cross-site scripting, and brute force attacks, and offers features like rate limiting, bot defense, content protection, and access control. Safeline is designed for simplicity, with intuitive configuration and open-source roots, making it accessible for both small projects and large enterprises.

Gain digital sovereignty now and save costs

Let’s have a look at your digital challenges together. What tools are you currently using? Are your processes optimal? How is the state of backups and security updates?

Digital Souvereignty is easily achived with Open Source software (which usually cost way less, too). Our division Safeserver offers hosting, operation and maintenance for countless Free and Open Source tools.

Try it now for 1 Euro - 30 days free!

Download transcript (.srt)
0:00

Welcome to the deep dive

0:01

So if you manage a website, maybe an API really any kind of online application

0:06

You definitely know the internet can be well a pretty wild place. Absolutely. It's

0:10

a definitely not getting any safer out there exactly

0:13

So today we're really focusing in on this

0:15

Essential bit of tech it acts as the barrier, you know between your valuable data

0:21

and that constant flood of threats

0:23

We're talking about the web application firewall or a wef

0:26

Yeah, and it's just indispensable for modern defense. This deep dive is I think

0:30

really crucial because look network firewalls

0:33

They protect the connections the pipes, right?

0:35

But a wef that protects the actual conversation happening over those pipes the HTTP

0:40

traffic itself

0:42

Okay, and I mean when you've got attacks like data theft cross-site scripting or

0:45

wrote code execution just happening all the time

0:47

Understanding this layer. Well, it's often the difference between being secure and

0:51

facing a really major breach

0:53

Our mission today then is pretty straightforward. We want to unpack these

0:58

Sometimes complex security ideas. So whether you're just managing a small self-hosted

1:04

site or maybe scaling up something much bigger

1:06

You'll get what a waif is and maybe more importantly how it actually works

1:11

Yeah, how it shields you and we're gonna use a specific example today

1:15

a really robust

1:18

Production ready self-hosted tool called safeline. It's quite popular. It is. Yeah,

1:24

very solid choice

1:25

Now before we dive into the you know, the nuts and bolts the architecture

1:29

We do want to give a quick shout out to the supporter of this deep dive

1:32

This deep dive is brought to you by safe server safe servers all about hosting

1:36

software and helping you with your digital transformation

1:39

They can really help get tools like safe line set up quickly and securely makes the

1:43

whole process smoother

1:44

Definitely, you can find out more info over at www.saveserver.de check them out.

1:49

Okay, so let's unpack this safeline thing

1:50

Starting right at the basics, you know for anyone listening who's maybe new to this

1:55

I know we have to get confused with like the traditional network firewall

1:59

So what exactly is a WAF and where does safe line actually sit in the whole setup?

2:03

Okay

2:03

Yeah, good question. The best way to picture it I think is that safe line works as

2:08

a reverse proxy reverse proxy

2:10

Okay, so you know how a regular proxy often protects a client like someone

2:15

Browsing the web hiding their location or identity, right? Yeah. Well a reverse

2:21

proxy like a WAF it does the opposite

2:23

It's there to protect the server. It sits right out in front of your application

2:26

could be your online store your API

2:29

Whatever you've got running and it acts like a mandatory checkpoint. Everything has

2:33

to go through it first

2:34

So every single request

2:35

Legitimate user potential attacker whatever it has to pass through the W first

2:40

It's like the the traffic cop and the security guard rolled into one

2:44

Monitoring filtering precisely. That's a great analogy. Its core job is filtering

2:50

that

2:50

HTTP traffic based on a set of security rules or policies

2:54

But you know for a beginner the really key question is what kind of nasty stuff is

2:58

it actually shielding us from?

3:00

Yeah, what are the big threats?

3:01

We can probably group the main threats safeline is designed to block into let's say

3:06

three big categories makes it easier to grasp

3:08

Okay, good because honestly looking at the source material the list of

3:12

vulnerabilities that protects against was well

3:15

It's pretty staggering. Can you maybe group them conceptually so we can understand

3:19

the scope without getting lost in all the acronyms?

3:22

Absolutely. Let's try it this way first up. You've got data theft

3:25

This is where attackers try to manipulate your database through your application

3:29

The most famous example is probably a sequel injection, right? Right tricking the

3:33

site into coughing up user data. Exactly

3:35

So that's category one second category code execution. This includes nasty things

3:40

like cross-site scripting or XSS

3:42

That's where attackers basically force your application to run malicious code

3:46

inside the web browsers of your other users. Oh

3:48

Yeah, that's bad

3:50

And the third category sounds like maybe the scariest taking over the whole

3:55

application or even the server, correct?

3:57

That's what we can call server and application compromise and this this covers a

4:01

lot everything from remote code execution

4:03

RCE which could let an attacker run their own commands on your system now to things

4:09

like path traversal finding backdoors

4:11

Exploiting vulnerabilities like X XE or SSRF. I mean the list goes on

4:16

Safeline aims to defend across all of these vectors plus, you know

4:20

The more common stuff like brute force login attempts bot abuse traffic floods

4:25

That sounds like a massive job. How does Safeline actually manage to defend against

4:30

such a well a diverse range of threats

4:32

Especially the complex ones without just overwhelming the administrator with false

4:36

alarms because I remember the old rule based firewalls

4:39

Yeah, they needed constant painful tweaking. Ah, okay. Yeah, that's really the core

4:44

innovation here

4:45

And this is where it gets really interesting

4:47

I think Safeline uses what they call intelligent protection and intelligent

4:50

protection engine. Okay, so

4:52

Traditional firewalls like you said they worked mostly on fixed signature based

4:56

rules

4:56

If an attack changed just a little bit the rule might miss it entirely, right?

5:00

Meaning they were always kind of playing catch-up

5:02

Waiting for someone to find a new vulnerability write a signature for it then push

5:06

out the update exactly

5:07

But this intelligent engine it's powered by machine learning and it uses what's

5:12

called next-generation

5:13

Semantic analysis it doesn't just look for known patterns or signatures

5:19

It actually performs deep parsing of the HTTP traffic

5:23

Semantics so it tries to understand the meaning or the intent behind the request.

5:29

That's it

5:29

It learns what normal legitimate traffic looks like versus what a malicious request

5:34

Intends to do even if it's never seen that exact attack before this adaptive sort

5:38

of behavioral protection

5:40

That's what really puts it ahead of the old rule-based systems that shift from just

5:44

fixed rules to actually learning intent

5:47

That feels like a huge leap forward and I guess you can see the results of that

5:50

intelligence in the project's credibility, right?

5:53

It's ranked the number one do be way off project on github over what?

5:57

17,000 stars. Yeah, the numbers are impressive and they really speak to its battle

6:02

readiness

6:02

The source has mentioned safeline has over a hundred and eighty thousand

6:06

installations running right now

6:08

Wow protecting more than a million websites and handling over 30 billion HTTP

6:13

requests every single day 30 billion

6:16

Yeah, daily. Okay, those aren't hobbyist numbers. That's serious enterprise level

6:20

scale. Definitely. It's proven in production

6:23

Let's talk about accuracy then because that's always the big challenge with

6:26

security tools, right?

6:27

balancing protection with

6:30

Not blocking

6:31

Legitimate users if you look at the comparison stats they provide against

6:35

established tools like mod security or even cloudflare is free tier

6:38

That intelligence seems to really make a difference. It absolutely does the

6:42

accuracy ratings they publish

6:43

They kind of fundamentally change the conversation around waif management safe line

6:47

when it's running in its standard balance mode apparently achieves

6:50

99 point four five percent accuracy. That's incredibly high it is and maybe even

6:55

more importantly

6:56

It has a ridiculously low point zero seven percent false positive rate zero point

7:01

zero seven percent

7:02

Yeah, which means developers aren't spending all day chasing ghosts investigating

7:06

legitimate traffic that got flagged by mistake

7:09

That minimizes a huge operational headache and probably the most compelling claim

7:15

The one that really highlights the power of that ML engine is its ability to find

7:20

the stuff

7:21

Nobody knows about yet the zero days. Yes

7:23

The claim is that this intelligent engine has detected over 10 zero day

7:27

vulnerabilities annually in the wild 10 a year

7:31

That's the claim and it's not finding them by luck

7:34

It's detecting them because the intent analysis spots unusual dangerous looking

7:38

behavior before there's any official patch or signature for it

7:42

That's well, that's truly next level security and a massive potential benefit for

7:46

anyone using it. Okay, that's seriously impressive

7:48

So beyond that really smart core engine, what specific tools does this this digital

7:54

shield actually give you if I install Safeline?

7:57

What are the key defensive features I get right out of the box, right?

8:00

We can probably group those main features into functional roles kind of like we did

8:03

with the threats

8:04

Makes it easier to remember first. You've got traffic management. You can think of

8:08

this as the throttler. It uses rate limiting

8:11

Limiting how many requests can come in exactly it defends against those sheer?

8:16

Volume attacks like denial of service or maybe someone trying to brute-force logins

8:21

over and over it just

8:22

Restricts requests that go over certain limits you define that seems critical for

8:27

just keeping things stable, right?

8:28

I'd like for an e-commerce site during a big sale or if you get hit by a denial of

8:32

service attack

8:33

Absolutely essential for availability. Okay, second main area bot defense. Let's

8:37

call this the gatekeeper dealing with all the automated traffic

8:40

Yeah, it uses what they call a proactive anti bot challenge

8:44

This tries to cleverly distinguish real human users from automated scrapers

8:49

malicious crawlers and other bots

8:51

It blocks the bad bots but lets legitimate users through without annoying them too

8:56

much

8:56

Okay, and that's usually paired with some sophisticated malicious IP detection as

9:00

well blocking known bad actors

9:02

What about protecting the actual content say I'm hosting? I don't know premium

9:07

articles or maybe a sensitive API

9:08

I need to protect the underlying source code or data from being scraped

9:13

Right that a huge issue for content providers. Good point that brings us to the

9:17

third area

9:18

Content protection or maybe the obfuscator. Okay obfuscator. This involves dynamic

9:23

protection

9:24

specifically things like

9:26

HTML and JavaScript code encryption. The interesting part according to the source

9:30

notes is that the code is dynamically encrypted

9:33

Every single time the site is visited every time

9:36

Yeah

9:36

So if someone tries to scrape your site the code they grab is basically useless the

9:40

moment they try to refresh or reuse it

9:42

It makes automated content theft way way harder, huh?

9:46

That sounds incredibly useful for media sites sauce platforms anywhere the code or

9:51

content itself is valuable

9:52

Okay, so we have the throttler the gatekeeper the obfuscator. What's the fourth

9:57

pillar?

9:57

The fourth is straightforward access control here

10:01

You get a robust web access control list or ACL that lets you filter traffic based

10:06

on things like IP address geographic location, etc

10:09

Standard firewall stuff, but at the application level exactly and it also includes

10:13

an authentication challenge feature

10:15

This lets you actually require a password before visitors can even reach your

10:19

application layer at all an

10:21

extra barrier for sensitive areas

10:23

When you look at the typical use cases, they mention it really seems like this

10:28

combination of features makes

10:30

Safeline pretty versatile, you know securing high-stake stuff like e-commerce

10:35

transactions making sure things stay up during peak traffic

10:38

Yeah, and crucially protecting those modern API's rest

10:43

Graph QL that power so many SaaS platforms and cloud services today for sure and

10:49

like you mentioned with content for media services

10:51

It's providing real-time security for streaming stopping scraping and handling

10:55

things like geo blocking which is often needed for you know

10:57

Copyright reasons there was a lot around it really does now for the listener who's

11:01

thinking okay?

11:02

This sounds powerful, but maybe complicated

11:04

The interesting thing is the emphasis safeline seems to place on simplicity by

11:09

design. Ah, okay

11:10

So it's not just for security gurus

11:12

Apparently not they talk about having intuitive wizard based configuration options

11:19

a modular architecture

11:21

The claim is you can actually deploy an enterprise-grade web with just a single

11:25

command one command

11:26

That's bold it is and a huge factor for many is that it's entirely self-hosted

11:33

You run it on your own infrastructure, which means you keep full control over your

11:37

data your logs your environment

11:39

No sending sensitive traffic off to a third party unless you choose to exactly that

11:44

self-hosted control

11:46

Potentially without massive complexity is a really big draw for a lot of people and

11:50

since it started as an open source project

11:52

And still has that strong open source presence alongside commercial options the

11:56

path to getting started seems quite accessible doesn't it?

11:59

What are the options there? Yeah, the pricing tiers make it pretty approachable.

12:02

There's a personal vision

12:03

This is designed for you know

12:04

The learner someone managing a personal project or maybe just a few small sites and

12:08

it's zero dollars forever free forever

12:11

Yeah, you get with that you get the core intelligent detection engine the rate

12:14

limiting we talked about the web ACL

12:16

And you can protect up to 10 applications with it Wow that's actually a lot of

12:21

value for free perfect entry point definitely

12:23

Then if you need a bit more, there's a light edition. It's priced pretty affordably

12:28

adds features like geo blocking

12:30

Bumps the application limit up and includes things like notifications

12:33

Okay, so a step up for growing needs right and then there's a pro edition

12:38

This is aimed more at businesses and enterprises. It removes the application limit

12:43

entirely

12:43

So unlimited apps and comes with top priority support more advanced configuration

12:48

options

12:49

Basically the full suite for larger deployments make sense and for support

12:54

especially for the free or late tiers

12:56

Where do people usually go the main hub seemed to be the community resources?

13:01

Primarily the dedicated Safeline discord community or the safe point discussion

13:05

boards online

13:06

That's where users help each other out ask questions and interact with the

13:09

developers good to know there's a community aspect

13:12

Okay. Well, we have covered a ton of ground today. We really have we started off

13:16

just demystifying

13:17

What a web application firewall even is that smart reverse proxy?

13:21

We defined those three core kinds of threats that aims to stop data theft code

13:26

execution and server compromise

13:28

Yeah, and then we really dug into how Safeline

13:32

Specifically uses that ml powered intelligent engine to achieve really high

13:37

accuracy

13:37

While still being self hosted and aiming for simplicity combining that intelligence

13:41

with practical features like rate limiting bot defense

13:44

Dynamic protection and access control exactly. So as we wrap up

13:49

Maybe we can leave our listeners with a final thought something to chew on. Yeah, I

13:52

was thinking about this

13:53

Give them the incredibly high accuracy rates

13:55

We're seeing now from modern ml powered WF's like Safeline tools that can

13:59

potentially spot zero days and understand intent

14:02

Mm-hmm. It raises a pretty fundamental question, doesn't it?

14:05

Okay, how does the role of the traditional purely rule based network firewall need

14:10

to adapt in the coming years?

14:12

I mean if the application layer defense is becoming this sophisticated

14:15

Is that layer now the only real battleground that truly matters are the old network

14:20

firewalls becoming less relevant?

14:22

Hmm. That is a fascinating question. Where do you focus your defenses when the

14:27

application itself is becoming so much smarter at protecting itself?

14:30

Something definitely to mull over as you plan your security strategy food for

14:34

thought

14:35

Absolutely. Well, thank you for joining us for this deep dive today

14:38

We really hope you walk away feeling a bit more informed and confident about

14:43

securing your web applications

14:44

And one final reminder that this deep dive was supported by safe server

14:49

They're there to help with hosting solutions and digital transformation. You can

14:53

find out more at

14:54

Check them out. Thanks for listening and we'll see you next time on the deep dive

14:54

Check them out. Thanks for listening and we'll see you next time on the deep dive