<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: openappsec</title>
    <description>The latest articles on DEV Community by openappsec (@openappsec).</description>
    <link>https://dev.to/openappsec</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F924532%2Fdfa23cfd-4246-40b8-a26f-6f5b38a5ec0a.png</url>
      <title>DEV Community: openappsec</title>
      <link>https://dev.to/openappsec</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/openappsec"/>
    <language>en</language>
    <item>
      <title>AWS WAF vs. open-appsec ML-Based open source WAF</title>
      <dc:creator>openappsec</dc:creator>
      <pubDate>Thu, 15 Dec 2022 18:00:31 +0000</pubDate>
      <link>https://dev.to/openappsec/aws-waf-vs-open-appsec-ml-based-open-source-waf-1egp</link>
      <guid>https://dev.to/openappsec/aws-waf-vs-open-appsec-ml-based-open-source-waf-1egp</guid>
      <description>&lt;p&gt;Written by: Rubaiat Hossain&lt;/p&gt;

&lt;p&gt;Web application firewalls (WAFs) are the first layer of defense for protecting your apps or services from threat actors. &lt;a href="https://aws.amazon.com/waf/" rel="noopener noreferrer"&gt;Amazon Web Services (AWS) WAF&lt;/a&gt; is a popular choice due to its seamless integration with other AWS services as well as its ability to protect from a wide range of common attacks.&lt;/p&gt;

&lt;p&gt;However, rule-based firewalls, like the one AWS offers, are only as secure as the rules they follow. As a result, traditional WAFs often fail to block sophisticated attacks faced by critical systems. In these cases, it's best to opt for an advanced WAF solution, like &lt;a href="https://www.openappsec.io/" rel="noopener noreferrer"&gt;open-appsec&lt;/a&gt;. open-appsec uses an innovative machine learning (ML)–based threat engine that automatically prevents and blocks suspicious requests.&lt;/p&gt;

&lt;p&gt;In this article, you'll compare these two WAFs based on their core feature set, installation experience, documentation quality, ease of use, and pricing and support.&lt;/p&gt;

&lt;h2&gt;
  
  
  Core Features
&lt;/h2&gt;

&lt;p&gt;AWS WAF and open-appsec both offer a robust set of features for blocking malicious HTTP requests. However, each tool has certain features that the other lacks.&lt;/p&gt;

&lt;h3&gt;
  
  
  AWS WAF Features
&lt;/h3&gt;

&lt;p&gt;AWS WAF is a security service from AWS that monitors and blocks suspicious traffic using a rule-based system. Rules in AWS WAF are definitions of how to parse the HTTP request for inspection and what to do when a rule matches. You can define rules for inspecting various parts of a web request, including the body, header, and cookie.&lt;/p&gt;

&lt;p&gt;In addition, it uses signature-based threat detection to prevent many common web attacks, including SQL injections, cross-site scripting (XSS) attacks, distributed denial-of-service (DDoS) attacks, and botnets.&lt;/p&gt;

&lt;h4&gt;
  
  
  Traditional Threat Detection
&lt;/h4&gt;

&lt;p&gt;AWS WAF's threat detection model can be effective against both regular and targeted attacks. However, signature-based detection models are reactive by design. As such, AWS WAF only detects known attack types and cannot protect from zero-day attacks. In addition, frequent rule updates are required to block newer threats.&lt;/p&gt;

&lt;h4&gt;
  
  
  Reliable Rule Sets
&lt;/h4&gt;

&lt;p&gt;The effectiveness of rule-based WAFs depends mainly on the quality of the rules. Therefore, you need a strong rule set to protect your app from complex attacks. The managed rule sets that are included with AWS WAF offer some protection; however, you may still need to create a custom rule set that fits your specific use case.&lt;/p&gt;

&lt;p&gt;You can buy these rule sets from the &lt;a href="https://aws.amazon.com/marketplace" rel="noopener noreferrer"&gt;AWS Marketplace&lt;/a&gt; or &lt;a href="https://aws.amazon.com/waf/partners/" rel="noopener noreferrer"&gt;supported partners&lt;/a&gt;. However, as you'll soon learn, managed services, like AWS WAF, can quickly become costly if you start purchasing premium add-ons.&lt;/p&gt;

&lt;h4&gt;
  
  
  Request Inspection with Rules
&lt;/h4&gt;

&lt;p&gt;Another drawback of AWS WAF is that it &lt;a href="https://docs.aws.amazon.com/waf/latest/developerguide/web-request-body-inspection.html" rel="noopener noreferrer"&gt;doesn't support inspecting large chunks of the request body&lt;/a&gt;. Instead, it only checks the first 8 KB. This means that if an attacker knows this and includes the payload after the first 8 KB of the request, AWS WAF will not block it in default settings.&lt;/p&gt;

&lt;p&gt;You can inspect oversize contents by specifying oversize handling in the component specification. But handling oversize content depends on various factors and must be done correctly. If you're using vendor-supported rules for AWS WAF, you'll need to tune the inspection levels accordingly.&lt;/p&gt;

&lt;h4&gt;
  
  
  Reliable Bot Control
&lt;/h4&gt;

&lt;p&gt;The &lt;a href="https://aws.amazon.com/waf/features/bot-control/" rel="noopener noreferrer"&gt;AWS WAF Bot Control&lt;/a&gt; mechanism provides adequate protection against bot attacks. For instance, it can detect standard and advanced bots based on their signature and heuristics. In addition, you can define rules to enforce various handling methods for bots, including rate limiting, CAPTCHA, and challenge actions.&lt;/p&gt;

&lt;p&gt;Moreover, bot visibility is clear on the intuitive Bot Control dashboard, where you can easily block scrapers, crawlers, and other invasive bots. However, you'll need to pay additional fees for using the AWS WAF Bot Control managed rule group.&lt;/p&gt;

&lt;h4&gt;
  
  
  Fraud Control Prevention
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-atp.html" rel="noopener noreferrer"&gt;AWS WAF Fraud Control&lt;/a&gt; can protect your app's login page from unauthorized sign-in attempts. It secures data and credentials using the managed AWS WAF rule group but also comes at an additional cost.&lt;/p&gt;

&lt;h3&gt;
  
  
  open-appsec WAF Features
&lt;/h3&gt;

&lt;p&gt;open-appsec is a fully automated WAF solution for securing modern web services and APIs. It uses contextual ML to identify and detect malicious web requests preemptively. This means there's no need for manual rule enforcement or maintenance. Instead, the ML engine of open-appsec learns the behavior patterns of your users through continuous monitoring and uses this information to block anomalies.&lt;/p&gt;

&lt;p&gt;Because open-appsec is ML-based, it doesn't need tuning or exception creation like AWS WAF. You can tune some parameters to speed up the learning phase of the contextual ML engine. But this isn't required for blocking common attacks.&lt;/p&gt;

&lt;h4&gt;
  
  
  Advanced Threat Detection
&lt;/h4&gt;

&lt;p&gt;The default open-appsec installation can stop regular web attacks without additional configurations. In addition, unlike AWS WAF, open-appsec doesn't suffer from attacks that contain payloads after 8 KB of the request body.&lt;/p&gt;

&lt;p&gt;Since open-appsec is preemptive by design, you can use it to protect your apps from a wide range of attacks, including &lt;a href="https://owasp.org/www-project-top-ten/" rel="noopener noreferrer"&gt;OWASP Top Ten&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Zero-day_(computing)" rel="noopener noreferrer"&gt;zero-day&lt;/a&gt;, and &lt;a href="https://www.signalsciences.com/glossary/bot-attack-protection" rel="noopener noreferrer"&gt;bot attacks&lt;/a&gt;. The robust intrusion prevention system also readily protects against over 2,800 &lt;a href="https://en.wikipedia.org/wiki/Common_Vulnerabilities_and_Exposures" rel="noopener noreferrer"&gt;Common Vulnerabilities and Exposures (CVEs)&lt;/a&gt; without new updates, including severe threats like Log4Shell and Spring4Shell.&lt;/p&gt;

&lt;p&gt;open-appsec also identifies and blocks automated bot attacks before intrusion or data theft can occur. In addition, its intuitive software-as-a-service (SaaS) WebUI makes threat visualization clear so you can mitigate problems more effectively.&lt;/p&gt;

&lt;h4&gt;
  
  
  Cloud-Native
&lt;/h4&gt;

&lt;p&gt;The cloud-native design of open-appsec offers seamless integration with modern continuous integration, continuous delivery (CI/CD) tools.&lt;/p&gt;

&lt;p&gt;You can automate everything from installation and upgrades to configuration management using simple APIs or declarative infrastructure as code (IaC). For deployment, you can choose from &lt;a href="https://helm.sh/" rel="noopener noreferrer"&gt;Helm charts&lt;/a&gt;, &lt;a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/" rel="noopener noreferrer"&gt;Kubernetes annotations&lt;/a&gt;, or &lt;a href="https://www.terraform.io/" rel="noopener noreferrer"&gt;Terraform&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Free and Open Source
&lt;/h4&gt;

&lt;p&gt;Another key feature of open-appsec is that it's open source. Anyone can use this &lt;a href="https://docs.openappsec.io/getting-started/using-the-advanced-machine-learning-model" rel="noopener noreferrer"&gt;ML-based threat detection engine&lt;/a&gt; to protect their web apps and APIs for free.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation Experience and Documentation
&lt;/h2&gt;

&lt;p&gt;While features can be beneficial, choosing the right WAF solution for you is more complex. You also need to take into account how the tool is installed, as well as what documentation is available.&lt;/p&gt;

&lt;p&gt;To use AWS WAF, you need to &lt;a href="https://docs.aws.amazon.com/waf/latest/developerguide/getting-started.html" rel="noopener noreferrer"&gt;set it up&lt;/a&gt; and create a web access control list (web ACL) using the AWS console. Then you need to choose the AWS resources that you want to protect and add rules and rule groups that you'll use for filtering traffic.&lt;/p&gt;

&lt;p&gt;You can't associate your AWS WAF directly with Amazon EC2 or S3 instances. Instead, you need to associate your AWS WAF with an &lt;a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html" rel="noopener noreferrer"&gt;Application Load Balancer (ALB)&lt;/a&gt;, which will forward the traffic to your web app.&lt;/p&gt;

&lt;p&gt;AWS is a leader in the cloud industry and generally offers good documentation for its services. The &lt;a href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html" rel="noopener noreferrer"&gt;AWS WAF documentation&lt;/a&gt; covers a broad range of topics, from initial setup to custom rule enforcement. Moreover, AWS also offers &lt;a href="https://docs.aws.amazon.com/whitepapers/latest/guidelines-for-implementing-aws-waf/" rel="noopener noreferrer"&gt;whitepapers&lt;/a&gt; to support its WAF users.&lt;/p&gt;

&lt;p&gt;However, new AWS users may find the documentation too extensive and hard to follow. Some customers also report that they could use more detailed guides on how to best use the rules, as well as a more dedicated configuration process.&lt;/p&gt;

&lt;p&gt;In contrast, you can deploy open-appsec as agents for &lt;a href="https://docs.openappsec.io/getting-started/start-with-kubernetes" rel="noopener noreferrer"&gt;Kubernetes Ingress&lt;/a&gt;, &lt;a href="https://docs.openappsec.io/getting-started/start-with-nginx" rel="noopener noreferrer"&gt;Nginx/Nginx Plus plugin&lt;/a&gt;, and &lt;a href="https://github.com/openappsec/openappsec#placing-the-agent-code-inside-an-alpine-docker-image" rel="noopener noreferrer"&gt;Docker&lt;/a&gt;. Using the interactive command line tool, you can quickly install this WAF for Kubernetes and Nginx.&lt;/p&gt;

&lt;p&gt;Advanced users can also use &lt;a href="https://docs.openappsec.io/getting-started/start-with-kubernetes/install-using-k8s-custom-resource-definition-advanced" rel="noopener noreferrer"&gt;Kubernetes CustomResourceDefinitions (CRDs)&lt;/a&gt; for installation. The SaaS management portal makes connecting with deployed agents and managing assets and policies painless.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://docs.openappsec.io/" rel="noopener noreferrer"&gt;open-appsec documentation&lt;/a&gt; contains detailed instructions on how to install and set up the WAF. In addition, you'll find information on everything needed to perform day-to-day operations. The reference materials also cover topics on &lt;a href="https://docs.openappsec.io/references/writing-snort-signatures" rel="noopener noreferrer"&gt;writing Snort signatures&lt;/a&gt; and &lt;a href="https://docs.openappsec.io/references/events-logs-schema" rel="noopener noreferrer"&gt;using an Event Query Language (EQL) for log visualization&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ease of Use
&lt;/h2&gt;

&lt;p&gt;For users with some cloud experience, AWS WAF is easy to use. All you need to get started is an AWS account. In addition, creating and configuring the ACL is also straightforward, thanks to the intuitive wizards.&lt;/p&gt;

&lt;p&gt;However, since AWS WAF requires add-ons for additional features, managing this WAF will require a detailed understanding of the components. You'll also need to manage, update, and audit the rule sets to keep up with emerging threats.&lt;/p&gt;

&lt;p&gt;In comparison, open-appsec also offers excellent usability, and getting started with this WAF is fast, thanks to its detailed, &lt;a href="https://docs.openappsec.io" rel="noopener noreferrer"&gt;step-by-step documentation&lt;/a&gt;. The interactive CLI tool, open-appsec-ctl, makes deployment straightforward. Once deployed, you can use the centralized SaaS management UI to connect with the agents and set up assets and policies:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FKOclv1N.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FKOclv1N.png" alt="open-appsec SaaS portal"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Visualization is available as a single-pane view of important security events. In addition, the monitoring dashboard is intuitive to use and displays valuable statistics about the attacks:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FIBaoKpQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FIBaoKpQ.png" alt="open-appsec event dashboard"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can click the dashboard controls for in-depth details of events. The &lt;strong&gt;Event&lt;/strong&gt; view gives a tabular view of the events and displays event cards highlighting the incident types, severity, assets under attack, and mitigation steps taken by open-appsec:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F9yKI5WJ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F9yKI5WJ.png" alt="open-appsec event view"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also filter events based on time ranges. This gives better visibility regarding individual attacks:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FyaJyux4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FyaJyux4.png" alt="open-appsec event filters"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Pricing and Support
&lt;/h2&gt;

&lt;p&gt;Cost is an essential factor when choosing a WAF solution. AWS WAF is a relatively cheap option compared to traditional WAF services, like &lt;a href="https://www.f5.com/products/security/advanced-waf" rel="noopener noreferrer"&gt;F5 Advanced Web Application Firewall (WAF)&lt;/a&gt; and &lt;a href="https://www.akamai.com/products/kona-site-defender" rel="noopener noreferrer"&gt;Kona Site Defender from Akamai&lt;/a&gt;. Users are charged based on the number of ACLs created, the number of rules in each group, and the volume of requests.&lt;/p&gt;

&lt;p&gt;At the time of writing this article, the pricing for AWS WAF starts at $5 USD per ACL, $1 USD per rule, and $0.60 USD per million requests processed. In addition, you'll have to pay additional fees for AWS WAF Bot Control and AWS WAF Fraud Control services and any purchased rules. Moreover, if you want dedicated support, you need to sign up for a support plan with AWS, which will also increase the cost.&lt;/p&gt;

&lt;p&gt;This pricing model can be a bit confusing for new AWS users. So you can use the &lt;a href="https://calculator.aws/#/createCalculator/WAF" rel="noopener noreferrer"&gt;AWS Pricing Calculator&lt;/a&gt; to get an idea of how much it would cost to protect your application with AWS WAF.&lt;/p&gt;

&lt;p&gt;In contrast, open-appsec is a fully open source solution that offers all the core features, including the ML-based detection engine, for free, and this version is more than enough to get you started.&lt;/p&gt;

&lt;p&gt;If you want more advanced protection and dedicated support, consider signing up for &lt;a href="https://www.checkpoint.com/cloudguard/appsec/" rel="noopener noreferrer"&gt;CloudGuard AppSec&lt;/a&gt;, the enterprise version of open-appsec. You can explore the available plans from their &lt;a href="https://www.openappsec.io/pricing" rel="noopener noreferrer"&gt;&lt;strong&gt;Pricing&lt;/strong&gt; page&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;AWS WAF and &lt;a href="https://www.openappsec.io/" rel="noopener noreferrer"&gt;open-appsec&lt;/a&gt; are both great options for protecting your apps. They can detect and block many common attacks that would otherwise cause service disruption. However, both of these tools perform their tasks differently.&lt;/p&gt;

&lt;p&gt;AWS WAF is a rule-based solution that integrates easily with other AWS services and offers managed and custom rules for effective blocking.&lt;/p&gt;

&lt;p&gt;In contrast, open-appsec uses a modern, ML-based threat detection engine to detect attacks preemptively. This means that there's no need to write rules or manage them. Moreover, the proactive nature of open-appsec allows engineers to focus more on development than security. open-appsec also blocks many severe threats, like the &lt;a href="https://www.openappsec.io/post/log4jshell-preemptive-protection" rel="noopener noreferrer"&gt;Log4Shell and Spring4Shell vulnerabilities&lt;/a&gt;, in default settings.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>waf</category>
      <category>devops</category>
      <category>cybersecurity</category>
    </item>
    <item>
      <title>How to protect Apps and APIs in Kubernetes from zero day attacks?</title>
      <dc:creator>openappsec</dc:creator>
      <pubDate>Thu, 01 Dec 2022 21:45:16 +0000</pubDate>
      <link>https://dev.to/openappsec/how-to-protect-apps-and-apis-in-kubernetes-from-zero-day-attacks-30k0</link>
      <guid>https://dev.to/openappsec/how-to-protect-apps-and-apis-in-kubernetes-from-zero-day-attacks-30k0</guid>
      <description>&lt;p&gt;Written by: Eze Onukwube&lt;/p&gt;

&lt;p&gt;A zero-day attack is a cybersecurity incident that occurs when a hacker exploits a vulnerability before anyone else, including key stakeholders like the product vendor or developers, realize anything is wrong.&lt;/p&gt;

&lt;p&gt;To counteract these attacks, you can use &lt;a href="https://www.openappsec.io" rel="noopener noreferrer"&gt;open-appsec&lt;/a&gt;, a fully automated, open-source web application firewall (WAF). As a cutting-edge cybersecurity tool, open-appsec prevents zero-day attacks through its preemptive web app and API protection that leverages the dynamism of continuous machine learning (ML). However, its ML-based engine isn't a signature-based solution. &lt;/p&gt;

&lt;p&gt;This differentiates open-appsec from most security products on the market, especially antivirus, intrusion detection systems (IDS) and existing WAF solutions that rely on discerning threat signatures to detect malware and malicious code. As a result, open-appsec is ideal for remediating pen test results and protecting against zero-day and other &lt;a href="https://owasp.org/www-project-top-ten/" rel="noopener noreferrer"&gt;Open Web Application Security Project (OWASP) Top 10&lt;/a&gt; attacks such as broken access control, data integrity failures, authentication failures, and code injections. &lt;/p&gt;

&lt;p&gt;In this article, you’ll learn about zero-day attacks and how to set up and use open-appsec to secure your web application. &lt;/p&gt;

&lt;h3&gt;
  
  
  open-appsec and ML
&lt;/h3&gt;

&lt;p&gt;The key to open-appsec's ability to prevent zero-day attacks lies with its contextual ML engine. &lt;br&gt;
It uses two machine ML models:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A supervised learning model that was trained offline based on millions of requests, both malicious and benign.&lt;/li&gt;
&lt;li&gt;An unsupervised model to train itself in real time on incoming HTTP/S requests. This allows it to establish a baseline of what constitutes normal or benign traffic for a specific web application or API.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In order to enable an ML engine to quickly learn how an application is used, it should be allowed to run in &lt;a href="https://www.forbes.com/sites/forbestechcouncil/2017/05/02/how-does-a-machine-learn/?sh=5d951a1e7441" rel="noopener noreferrer"&gt;learn/detect mode&lt;/a&gt; for two to three days. This typically provides ample time for the ML engine to train itself on a substantial amount of diverse traffic for better prediction accuracy.   &lt;/p&gt;

&lt;p&gt;As a result, open-appsec is able to detect suspicious patterns and anomalous behavior that is not in line with the web application or API's conventional traffic, unlike most WAFs that are typically rule-based. This equips the ML engine to detect zero-day attacks without having any prior knowledge of the attack vector, threat signature, or payload used. In addition, a security administrator can apply tuning suggestions to the ML engine to improve targeted accuracy. &lt;/p&gt;
&lt;h2&gt;
  
  
  Agents and Other Key Concepts of open-appsec
&lt;/h2&gt;

&lt;p&gt;In this tutorial, you'll use agents to implement open-appsec. But before you begin this tutorial, let's talk a bit more about what an open-appsec agent is and what it does.&lt;/p&gt;
&lt;h3&gt;
  
  
  What Is an open-appsec Agent?
&lt;/h3&gt;

&lt;p&gt;Agents are the primary means of deployment in open-appsec. They're ideal for any infrastructure due to their light digital footprint, minimal latency, and the fact that they don't alter the existing infrastructure.&lt;/p&gt;

&lt;p&gt;The first step in implementing open-appsec for your application is deciding the type of agent deployment you want to use. In order to make an informed decision, it's imperative to understand how agents and their different deployment types work in open-appsec.&lt;/p&gt;

&lt;p&gt;While agents are designed as standalone components, open-appsec also gives you the option to connect them to the software as a service (SaaS) management portal (more on this in the following sections). &lt;/p&gt;

&lt;p&gt;Agents are generally deployed on any computing endpoint where client requests are received or routed such as a web server, reverse proxy, or Kubernetes Ingress. Because of this, the agent is best poised to detect and prevent malicious threats since the open-appsec core ML engine is designed to process incoming HTTP/S requests. &lt;/p&gt;

&lt;p&gt;Agents are empowered to act as standalone entities since their security processing is done locally. However, they can be managed by a master SaaS component called a &lt;a href="https://docs.openappsec.io/concepts/agents" rel="noopener noreferrer"&gt;Fog&lt;/a&gt;. The Fog is responsible for logging in addition to configuration and software updates necessary for ML learning data synchronization between agents. &lt;/p&gt;

&lt;p&gt;To further bolster security, agents communicate with the Fog only through encrypted and authenticated channels. When the Fog is unreachable for one reason or another, the agent is still capable of security enforcement. However, some administrative functions will be unavailable when the Fog is unattainable. &lt;/p&gt;

&lt;p&gt;open-appsec aims for flexibility and it provides three agent deployment types: container, NGINX addon, and Kubernetes Ingress Controller. &lt;/p&gt;
&lt;h3&gt;
  
  
  Deploying an Agent Stand-Alone vs. Connected to the SaaS Management Portal
&lt;/h3&gt;

&lt;p&gt;After you've deployed an open-appsec agent, you have the option of managing the deployment with the SaaS Central Management web user interface. If you choose to use SaaS Central Management, its portal allows you to centrally manage your open-appsec deployment with more flexibility and comfort.&lt;/p&gt;

&lt;p&gt;However, there is a significant difference between deploying a standalone agent and deploying one connected to the SaaS management portal. While the former is adequate for implementing open-appsec security, the latter offers more to users with its multilayered functionality that provides granular control and oversight of several agent deployments. &lt;/p&gt;

&lt;p&gt;With the SaaS management portal, you can edit your web application/API security settings from the convenience of a user-friendly web UI. In addition to policy editing, its web interface provides advanced situational awareness tools. This is a huge benefit, especially when you are managing large deployments:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fy3IxDq0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fy3IxDq0.png" alt="A diagram showing the SaaS management portal"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, it provides three major hubs, namely: &lt;strong&gt;Protection&lt;/strong&gt;, &lt;strong&gt;Central Management&lt;/strong&gt;, and &lt;strong&gt;Situational Visibility&lt;/strong&gt;. While deploying standalone open-appsec for Kubernetes Ingress provides effective protection, you have more opportunities and options when you connect to the management portal.&lt;/p&gt;
&lt;h2&gt;
  
  
  Implementing open-appsec for Your API or Web Application
&lt;/h2&gt;

&lt;p&gt;The fastest way to set up open-appsec for K8s is through the interactive Kubernetes CLI tool. One of the best things about this tool is that it's easy to use, and guides you through most of the common customizations needed. &lt;/p&gt;

&lt;p&gt;However, a certain amount of Kubernetes knowledge and system resources are needed before you can successfully install and run this interactive tool. According to &lt;a href="https://docs.openappsec.io/getting-started/start-with-kubernetes/install-using-interactive-cli-tool" rel="noopener noreferrer"&gt;open-appsec's documentation&lt;/a&gt;, the following are the prerequisites required to use the Kubernetes CLI tool:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An understanding of Kubernetes Ingress, in addition to knowing how to configure it or having previously deployed Ingress.&lt;/li&gt;
&lt;li&gt;A Kubernetes 1.16.0+ cluster with role-based access control (RBAC) enabled cluster admin permissions.&lt;/li&gt;
&lt;li&gt;Access to command line tools such as &lt;a href="https://www.gnu.org/software/wget/" rel="noopener noreferrer"&gt;wget&lt;/a&gt; and &lt;a href="https://kubernetes.io/docs/reference/kubectl/" rel="noopener noreferrer"&gt;kubectl&lt;/a&gt; on either a bastion host or a cloud platform that provides you with a Kubernetes cluster. &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://helm.sh/blog/helm-3-released/" rel="noopener noreferrer"&gt;Helm 3&lt;/a&gt;, the Kubernetes package manager, installed on your local machine. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can also peruse the &lt;a href="https://github.com/openappsec/" rel="noopener noreferrer"&gt;open-appsec source code and information in this GitHub repo&lt;/a&gt; to gain more insight into the nuts and bolts of the system.&lt;/p&gt;
&lt;h3&gt;
  
  
  Deploying an Agent to Your Application
&lt;/h3&gt;

&lt;p&gt;To download and run the open-appsec installer, you can set up open-appsec either in the &lt;a href="https://killercoda.com/playgrounds" rel="noopener noreferrer"&gt;Killercoda Playground&lt;/a&gt; (which is what you'll use her) or on your own Kubernetes cluster.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Please note: The information given and explained in this section (and subsequent ones) can be found in the &lt;a href="https://docs.openappsec.io/getting-started/start-with-kubernetes/install-using-interactive-cli-tool" rel="noopener noreferrer"&gt;official open-appsec documentation&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  Setting Up open-appsec to Use the Kubernetes CLI Tool
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://killercoda.com/" rel="noopener noreferrer"&gt;Killercoda's Playground&lt;/a&gt; provides interactive environments. As its name implies, these playground environments can be used risk-free for quick and easy deployment and first hands-on experience with modern solutions like open-appsec in immediately available, ready-to-use environments. &lt;/p&gt;

&lt;p&gt;You can launch open-appsec's Playground by navigating to &lt;a href="https://killercoda.com/open-appsec/scenario/simple-appsec-kubernetes-ingress" rel="noopener noreferrer"&gt;Killercoda's website&lt;/a&gt; or by clicking on the Playground menu item on the SaaS portal:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F7UCR0jF.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F7UCR0jF.png" alt="The Playground menu option on the SaaS management portal "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you haven't logged in, or if you don't have an open-appsec Playground account, you'll see an interface with various options to sign in or create an account, using either GitLab, GitHub, Google, or email:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fae4cUQb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fae4cUQb.png" alt="Playground along with a signup/login form "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Playground provides you with a free, computing environment through a terminal in your browser. After you've successfully logged in and the Playground has finished initializing, you’ll see a terminal interface similar to this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F0Igr5Jp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F0Igr5Jp.png" alt="An authenticated Playground interface fully initialized"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To begin using open-appsec, you need to download the install script and adjust its permissions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wget https://downloads.openappsec.io/open-appsec-k8s-install &amp;amp;&amp;amp; chmod +x open-appsec-k8s-install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you're using the Playground, all you need to do is click on the link following &lt;strong&gt;Download open-appsec install script&lt;/strong&gt; to activate the download:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FBWMWpiz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FBWMWpiz.png" alt="A completed execution of the open-appsec download script"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, run the downloaded install script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./open-appsec-k8s-install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you're using the interactive Playground, you'll notice the script is run as &lt;code&gt;./open-appsec-k8s-install --prevent&lt;/code&gt;. However, in a live environment, you don't want to add the &lt;code&gt;--prevent&lt;/code&gt; attribute since you'll want to start open-appsec in its learn-detect mode. This allows its ML engine to learn the traffic patterns of your application. &lt;/p&gt;

&lt;p&gt;Once the install script has been successfully executed (it may take some time), you should see a message similar to this on the command line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;open-appsec for Kubernetes Ingress Installer v1.2232.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Most likely, you'll see a variation of the current Kubernetes version that open-appsec is using. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After the Kubernetes installer version is displayed, a subsequent line will give you a heads-up and preview of what the installer will be doing next:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FTrpSxay.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FTrpSxay.png" alt="Image of Installer information on generating manifest and Helm charts"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Below is a panoramic view of Playground after running the install script:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F2ZUgJYc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F2ZUgJYc.png" alt="A successful execution of the open-appsec installation"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Adding the open-appsec Agent to Kubernetes Ingress
&lt;/h3&gt;

&lt;p&gt;After downloading and running the installer, the next step involves adding open-appsec to either a duplicate of an existing Ingress or directly to an existing Ingress.&lt;/p&gt;

&lt;p&gt;Immediately after the successful installation of open-appsec, the installer displays a table of the existing ingresses, detailing information pertaining to it:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Ffwsk8ic.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Ffwsk8ic.png" alt="Image of existing Ingress with headings"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As shown in a prior image depicting its successful installation, Playground then provides you with two options to apply to the existing Ingress:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Duplicate an existing Ingress and add open-appsec to it. &lt;/li&gt;
&lt;li&gt;Add open-appsec to an existing Ingress resource.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The first option allows the existing Ingress to operate without disruption to traffic while you add open-appsec and conduct tests on the newly created Ingress. The second option merely adds open-appsec to the existing Ingress. Due to the risk of disruption, the second option is suited for testing purposes or use in a non-critical production environment.&lt;/p&gt;

&lt;p&gt;Select the option that corresponds to your situation and you'll be prompted to enter both the name and namespace of the existing or duplicate Ingress.&lt;/p&gt;

&lt;p&gt;The next step gives you the opportunity to change the Ingress' policy. The CLI displays the default policy rules of the current Ingress:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FG60rrYW.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FG60rrYW.png" alt="Image display the default rules of the current Ingress"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You have the option of using the default Ingress policy as it is or selecting other options. As you can see from the image below, some of the options presented include changing a rule, adding a rule, deleting a rule, or saving the current policy:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FRtol04L.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FRtol04L.png" alt="Saving and/or changing the default policy"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For instance, if you decide to change the rule of the default policy, and select option 1 (&lt;code&gt;Change Rule&lt;/code&gt; in the previous screenshot), you’ll be asked to make further choices. You can choose to set a new name, namespace, Ingress rule, protection level, mode, or web response:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FAwrZsGr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FAwrZsGr.png" alt="Image for change rule options for the default policy"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The final step of adding the open-appsec agent to Kubernetes Ingress applies the configuration options you selected in the previous two steps to either a manifest (YAML file) or a Helm chart. Finally, save your current policy by selecting one of those options:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FaP5hREK.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FaP5hREK.png" alt="Apply configuration options to the Kubernetes Ingress "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When executed, the installer will apply your configuration to one of these three files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;&lt;code&gt;ingress.yaml&lt;/code&gt;&lt;/strong&gt; file, which is the manifest created based on your instructions in the first step.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;&lt;code&gt;open-appsec-policy.yaml&lt;/code&gt;&lt;/strong&gt; file, which is created based on your selections in the second step.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;open-appsec Helm chart&lt;/strong&gt;, which includes CRDs and other necessary files.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because you selected to save your current policy, your setup should be saved to the &lt;code&gt;open-appsec-policy.yaml&lt;/code&gt; file:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FNLafR5i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FNLafR5i.png" alt="Image of setup saved to open-appsec-policy.yaml"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You may see something different depending on the prior options you chose.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Playground will then notify you it's time for the final configuration step. This is initiated when you execute the &lt;code&gt;Run now&lt;/code&gt; option:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fm6w0zoq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fm6w0zoq.png" alt="Image for running the commands to apply the configuration"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After you execute the run command, you will see the installation steps being executed (for open-appsec Helm chart, Ingress resource and the open-appsec policy custom resource):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FNyIIvrx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FNyIIvrx.png" alt="Complete installation of open-appsec"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Connect Your Deployment to the SaaS Web-Based Management
&lt;/h2&gt;

&lt;p&gt;As its name suggests, the SaaS web-based management portal provides the convenience of a graphical UI interface along with sophisticated functionality to oversee, optimize, and control the security configuration of open-appsec deployed agents. You can also analyze all security logs in a flexible way. Before you can connect the deployed open-appsec agent to the SaaS web-based management portal, you'll be required to first create an account on it. &lt;/p&gt;

&lt;h3&gt;
  
  
  Creating an Account on the open-appsec Portal
&lt;/h3&gt;

&lt;p&gt;To reach the open-appsec portal's main page, navigate to &lt;a href="https://my.openappsec.io" rel="noopener noreferrer"&gt;https://my.openappsec.io&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You should see a web form that asks you to create an open-appsec account using your Google, GitHub, or email account. Once you provide your credentials and are authenticated, you will be taken to the &lt;strong&gt;Getting Started&lt;/strong&gt; page.&lt;/p&gt;

&lt;p&gt;After you create and deploy an agent to protect a website or app, you have the option of connecting it to SaaS web-based management.&lt;/p&gt;

&lt;p&gt;The SaaS-based management provides central policy editing using a web interface and other advanced situational awareness tools. These are huge benefits when managing large deployments. &lt;/p&gt;

&lt;p&gt;Once you’ve logged in successfully, you'll be redirected to the home page. Once there, you need to confirm your agent has been deployed. Under the &lt;strong&gt;Protection&lt;/strong&gt; box, check "I deployed an agent" which will enable the &lt;strong&gt;Central Management&lt;/strong&gt; box:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FRbMqfsK.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FRbMqfsK.png" alt="Image acknowledging agents have been deployed to SaaS"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, under &lt;strong&gt;Central Management&lt;/strong&gt;, select &lt;strong&gt;Manage&lt;/strong&gt;, and from the dropdown menu, select &lt;strong&gt;Kubernetes Profile&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FsmyGO1Q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FsmyGO1Q.png" alt="Central management drop-down with profile options"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This creates a Kubernetes profile that represents and controls the agents deployed in your cluster:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F75bPz9Z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F75bPz9Z.png" alt="Download and deployment form to copy code for creating a profile"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In order to create secure communication between your agent and the SaaS management, you need to connect to the SaaS application. Onscreen instructions might advise you to enforce the policy if you haven’t already done so:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FQBZznu0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FQBZznu0.png" alt="Enforce the Kubernetes policy"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Under &lt;strong&gt;Downloads &amp;amp; Deployment&lt;/strong&gt;, you'll also see a message reiterating the need to enforce the policy (if you haven’t already done so).  After this message, copy the commmand required to connect to your deployment from the &lt;strong&gt;Connect your deployment&lt;/strong&gt; box, which contains the open-appsec token. This token connects your agents deployment to the newly created profile and creates a secure communication channel between the open-appsec deployment and the cloud:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F1ublk4h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F1ublk4h.png" alt="Copy code to connect your deployment"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Paste the command into the Kubernetes console, which could be Playground or your own Kubernetes setup. After it executes, your deployment can now be centrally managed in the SaaS portal.&lt;/p&gt;

&lt;h2&gt;
  
  
  Monitoring Cybersecurity Events after You Simulate an Attack
&lt;/h2&gt;

&lt;p&gt;The best way to understand how open-appsec's event monitoring works is to simulate a cyber attack. This enables you to see how it chronicles threat protection and other relevant sequences of actions.&lt;/p&gt;

&lt;p&gt;Fortunately, you don't have to come up with a cybersecurity incident on your own. Through the Playground, you can access open-appsec's &lt;strong&gt;Acme Audit&lt;/strong&gt; application to simulate a SQL injection attack:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FmmH7p6f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FmmH7p6f.png" alt="Acme audit application"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Validating open-appsec Protection and Events Monitoring After Attack Simulation
&lt;/h3&gt;

&lt;p&gt;In open-appsec, event monitoring is done through the SaaS management portal. You need to have previously configured it with a deployed open-appsec agent protecting the website or the application. This is why, in the previous section, you used the Playground interactive environment to simulate an attack on the &lt;strong&gt;Acme Audit&lt;/strong&gt; application. &lt;/p&gt;

&lt;p&gt;As you can see from the following image, the SQL injection attack attack on the &lt;strong&gt;Acme Audit&lt;/strong&gt; app failed, HTTP error 403 is shown indicating that open-appsec successfully prevented the threat:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fcf5qbDb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fcf5qbDb.png" alt="open-appsec’s Playground showing successful prevention of a SQL injection cyberattack"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This signals that the Kubernetes Ingress and its services were protected. However, it's also beneficial to see how the threat protection worked by viewing the actions and events generated by the attack. &lt;/p&gt;

&lt;p&gt;To do this, log in to the SaaS portal and select &lt;strong&gt;Monitoring&lt;/strong&gt; and the &lt;strong&gt;All Events&lt;/strong&gt; tab. This will display the relevant actions triggered by the attack and its threat prevention:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FSy7KZCr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FSy7KZCr.png" alt="Threat events captured during a 7-day time span"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, a table is displayed with rows containing all the events that occurred within a certain time range. It includes the timestamps of the individual events, along with their level of severity, source IP address, and several other details. &lt;/p&gt;

&lt;p&gt;You can see that there was a critical severity event that occurred precisely on Oct 4, 2022, at 4:49:33 PM. It reports that the incident type was a SQL injection attack that was prevented. &lt;/p&gt;

&lt;p&gt;When you scroll horizontally to the right across the table, you'll find other granular details that help you better understand the nature of the threat and attack vector used. For instance, the text command used for the SQL injection attack is revealed under the &lt;strong&gt;Matched String&lt;/strong&gt; field, while &lt;strong&gt;HTTP URI Path&lt;/strong&gt; shows the exploit was carried out during a login procedure:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F4c1lmpy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F4c1lmpy.png" alt="Critical threat events"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Alternatively, you can select the &lt;strong&gt;Important Events&lt;/strong&gt; tabs to display only those security events with critical and high severity. To target event types more narrowly, filters are activated by checking the box options you want to view:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fu7v0xNC.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fu7v0xNC.png" alt="Important events tab"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Additionally, the portal provides you with a panoramic and graphical appsec dashboard through which you can access various sections with important security sections. These sections include security actions, overall HTTP traffic, malicious activity, attack levels, and top attacked assets. You can drill down for more information by clicking on individual sections. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FAs9xhcb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FAs9xhcb.png" alt="open-appsec dashboard"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;ML-based threat prevention is the best and most practical defense against zero-day attacks. In this article you learned how to configure and deploy an &lt;a href="https://www.openappsec.io" rel="noopener noreferrer"&gt;open-appsec&lt;/a&gt; in Kubernetes. You also learned how to leverage open-appsec’s SaaS management portal as an effective agent monitoring dashboard to provide centralized logging, events analysis, and handling of multiple deployments in a scalable manner. &lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>cybersecurity</category>
      <category>waf</category>
    </item>
    <item>
      <title>NGINX WAF alternatives: App Protect vs. ModSecurity vs. open-appsec</title>
      <dc:creator>openappsec</dc:creator>
      <pubDate>Thu, 24 Nov 2022 21:02:30 +0000</pubDate>
      <link>https://dev.to/openappsec/nginx-waf-alternatives-app-protect-vs-modsecurity-vs-open-appsec-325f</link>
      <guid>https://dev.to/openappsec/nginx-waf-alternatives-app-protect-vs-modsecurity-vs-open-appsec-325f</guid>
      <description>&lt;p&gt;Written by: Rubaiat Hossain&lt;/p&gt;

&lt;p&gt;Nginx is a popular web server software that can also be used for caching, load balancing, and reverse proxying. Its asynchronous, event-driven architecture makes Nginx a good choice for high-traffic systems, which is the reason a lot of DevOps engineers and web developers choose to use it. However, having a high-performance web server is only helpful when you protect your web app accordingly.&lt;/p&gt;

&lt;p&gt;This is where web application firewalls (WAFs) come into play. WAFs sit between your web app and its traffic, and they filter out malicious HTTP requests. A solid WAF solution can prevent various layer 7 attacks, including the &lt;a href="https://owasp.org/www-project-top-ten/" rel="noopener noreferrer"&gt;OWASP Top Ten&lt;/a&gt;, &lt;a href="https://www.kaspersky.com/resource-center/threats/botnet-attacks" rel="noopener noreferrer"&gt;bot attacks&lt;/a&gt;, and &lt;a href="https://www.checkpoint.com/cyber-hub/threat-prevention/what-is-zero-day-attack/" rel="noopener noreferrer"&gt;zero-day attacks&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5vxhatwkocmzs9dn0j7e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5vxhatwkocmzs9dn0j7e.png" alt="Web Application Firewall" width="642" height="307"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Since Nginx has different use cases, protecting your application depends on how and where you use it. It's recommended that you have a reliable WAF solution since they block most harmful requests in the first place. In this article, you'll compare three tools—&lt;a href="https://www.modsecurity.org" rel="noopener noreferrer"&gt;ModSecurity&lt;/a&gt;, &lt;a href="https://www.nginx.com/products/nginx-app-protect/" rel="noopener noreferrer"&gt;F5 Nginx App Protect&lt;/a&gt;, and &lt;a href="https://www.openappsec.io" rel="noopener noreferrer"&gt;open-appsec&lt;/a&gt;—based on their active development, advanced security features, and open source commitment to help you figure out which tool is right for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  ModSecurity
&lt;/h2&gt;

&lt;p&gt;ModSecurity is an open source WAF that has been developed since 2002. It's proved to be a great success, and developers across the world use it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Active Development
&lt;/h3&gt;

&lt;p&gt;Before addressing ModSecurity's active development, it's important to define what the term &lt;em&gt;active development&lt;/em&gt; means here. In this article, when a tool is reviewed based on its active development, it's in reference to the program having a continuous development effort and a committed community.&lt;/p&gt;

&lt;p&gt;Effective July 1, 2024, Trustwave SpiderLabs, the developers behind ModSecurity, &lt;a href="https://www.trustwave.com/en-us/resources/security-resources/software-updates/end-of-sale-and-trustwave-support-for-modsecurity-web-application-firewall/" rel="noopener noreferrer"&gt;announced the end-of-life (EOL)&lt;/a&gt; support for this WAF. The open source community should continue the development of ModSecurity, as the code is freely available and many projects use it. However, commercial support will no longer be available after the EOL date.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/SpiderLabs/ModSecurity#what-is-the-difference-between-this-project-and-the-old-modsecurity-v2xx" rel="noopener noreferrer"&gt;ModSecurity v3&lt;/a&gt; has also introduced major changes in how ModSecurity works. The entire WAF is not packed together anymore. Instead, the single libmodsecurity engine is paired with a connector module that interfaces the application with the server. Different connectors are available based on the server and are hosted as independent packages. This means that there's a separate &lt;a href="https://github.com/SpiderLabs/ModSecurity-nginx/" rel="noopener noreferrer"&gt;ModSecurity v3 Nginx Connector&lt;/a&gt; project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Advanced Security Features
&lt;/h3&gt;

&lt;p&gt;Advanced security features of a WAF are the functionalities that set it apart. As a public-facing component of the internet, modern WAFs require solid defense mechanisms to protect from rapidly emerging new threads and malicious activities.&lt;/p&gt;

&lt;p&gt;ModSecurity offers many powerful features, such as continuous inspection of HTTP streams, reliable blocking capabilities, and a robust rule engine complemented by a straightforward rule language called SecRule. What sets ModSecurity apart is its flexibility. You can use its features any way you see fit, from real-time application monitoring to full traffic logging, and URL encoding to web app hardening—the scope of creativity is unlimited.&lt;/p&gt;

&lt;p&gt;Its solid HTTP blocking capabilities and flexible rule engine allow ModSecurity to patch vulnerabilities without touching the application itself. This practice is known as virtual patching, and it can protect any app using communication channels like HTTP. However, it should be noted that signature-based solution are reactive by nature, meaning that often signatures aren't available until after vulnerabilities have been known for some time and exploits are put into circulation. &lt;/p&gt;

&lt;p&gt;ModSecurity also excels in logging HTTP requests. Since most web servers log a few pieces of information by default, ModSecurity's effective logging capabilities make it a lucrative choice from a security standpoint.&lt;/p&gt;

&lt;h3&gt;
  
  
  Open Source
&lt;/h3&gt;

&lt;p&gt;ModSecurity is an open source project, with its codebase open for third-party contributions. It has an &lt;a href="https://github.com/SpiderLabs/ModSecurity" rel="noopener noreferrer"&gt;active GitHub community&lt;/a&gt; of open source developers who maintain the project and fix issues. You can easily fork this WAF and tune features yourself. However, with its backing organization announcing ModSecurity's end of support, you can expect little to no active development from the vendor in the future.&lt;/p&gt;

&lt;h2&gt;
  
  
  Nginx App Protect
&lt;/h2&gt;

&lt;p&gt;Nginx App Protect is a premium WAF solution that seamlessly integrates with Nginx and provides robust features for DevOps teams. F5 has acquired Nginx and is actively developing its paid offerings. As a result, Nginx App Protect should be viable for those looking to safeguard enterprise systems and data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Active Development
&lt;/h3&gt;

&lt;p&gt;You can expect new features and updates to be added &lt;a href="%E2%80%8B%E2%80%8Bhttps://docs.nginx.com/nginx-app-protect/releases/release-notes-3.12/"&gt;once every few months&lt;/a&gt; to Nginx App Protect for handling newer threats, and support is available on demand. Coupled with &lt;a href="https://docs.nginx.com/nginx-app-protect/" rel="noopener noreferrer"&gt;Nginx's extensive documentation&lt;/a&gt; and active community, finding support should be effortless for developers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Advanced Security Features
&lt;/h3&gt;

&lt;p&gt;Nginx App Protect is a capable WAF solution that can protect modern web applications, APIs, containers, and microservices. Nginx App Protect follows the same role-based access control policy used by ModSecurity. It benefits from the security rules derived from other F5 security solutions and excels at preventing regular layer 7 attacks. Like ModSecurity it is based on signatures and so usually reactive to &lt;a href="https://www.openappsec.io/post/zero-day-attack-prevention" rel="noopener noreferrer"&gt;zero day attacks&lt;/a&gt; as signatures aren't available until after vulnerabilities have been known for some time and exploits are put into circulation.&lt;/p&gt;

&lt;p&gt;This WAF solution aligns with modern software architecture and continuous integration, continuous deployment (CI/CD) principles. The platform-agnostic nature and declarative policies used by Nginx App Protect allow engineers to focus on innovation rather than worrying about security right from the very beginning.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://docs.nginx.com/nginx-controller/app-delivery/security/concepts/what-is-waf/" rel="noopener noreferrer"&gt;Nginx Controller App Security&lt;/a&gt; allows to manage declarative configuration files for App Protect in a centralized manner. It makes managing Nginx App Protect simpler than ModSecurity, which, though immensely flexible, lacks central control.&lt;/p&gt;

&lt;h3&gt;
  
  
  Open Source
&lt;/h3&gt;

&lt;p&gt;Nginx App Protect is a closed source solution. To use the WAF product, you'll need to sign up for a premium offering from F5 Nginx that includes NGINX Plus or NGINX Ingress Plus and a licence for App Protect. U.S. List Prices starts at $362 per month for Nginx Plus for Single Instance and Standard Support, plus $620 per month for the App Protect Add-On for Single Instance.&lt;/p&gt;

&lt;p&gt;Although the enterprise nature of Nginx App Protect ensures prompt support and in-depth documentation, the absence of an open source model prevents DevOps engineers or developers from auditing the code themselves and diving deeper into the features.&lt;/p&gt;

&lt;h2&gt;
  
  
  open-appsec
&lt;/h2&gt;

&lt;p&gt;open-appsec is a modern-day WAF solution that leverages machine learning (ML) to detect and prevent unknown "zero-day" attacks as well as standard known attacks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Active Development
&lt;/h3&gt;

&lt;p&gt;open-appsec is under active development, and the code is open source and public. This move allows for regular feature updates and bug fixes by open source developers. The core open-appsec WAF engine is developed in C++ and is available &lt;a href="https://github.com/openappsec/openappsec" rel="noopener noreferrer"&gt;via GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Additional security components are written in C and Go and are readily available. The developers are actively adding new features and adjustments to the ML-based threat engine. In addition, the open source codebase is updated regularly and offers &lt;a href="https://docs.openappsec.io/" rel="noopener noreferrer"&gt;thorough documentation&lt;/a&gt;, making it a suitable choice for securing modern-day Nginx systems.&lt;/p&gt;

&lt;h3&gt;
  
  
  Advanced Security Features
&lt;/h3&gt;

&lt;p&gt;open-appsec offers several advanced security features, of which the flagbearer is its &lt;a href="https://www.openappsec.io/tech" rel="noopener noreferrer"&gt;ML-based threat detection engine&lt;/a&gt;. The ML-powered core &lt;a href="https://www.openappsec.io/post/open-appsec-protects-pre-emptively-against-apache-text4shell-zero-day-attack-cve-2022-42889" rel="noopener noreferrer"&gt;automatically prevents OWASP Top Ten and zero-day attacks&lt;/a&gt; without requiring any tuning or configurations. The intelligent WAF engine continuously analyzes user behavior and transaction profiles to detect and mitigate threats before escalation.&lt;/p&gt;

&lt;p&gt;This shift toward proactive threat mitigation from the reactive approaches utilized by standard rule-based WAFs makes open-appsec a worthy WAF solution for the future generation of web apps.&lt;/p&gt;

&lt;p&gt;Moreover, open-appsec's seamless integration with modern CI/CD tools allows developers to spend less time securing apps and more time shipping new builds. It's also a breeze to automate. You can use declarative infrastructure as a service (IaaS) or APIs to take care of heavy tasks.&lt;/p&gt;

&lt;p&gt;In addition, open-appsec needs little manual administration. It's an install-and-forget solution that preemptively prevents newer threats and reduces the attack surface significantly compared to traditional WAFs like ModSecurity, which require manual rule enforcement to stop the latest threats. Users of paid solutions like Nginx App Protect must also wait for vendor-supplied signaure/rules for newer vulnerabilities.&lt;/p&gt;

&lt;h3&gt;
  
  
  Open Source
&lt;/h3&gt;

&lt;p&gt;open-appsec provides a fully open source solution that can be audited by third parties or extended by individual developers. As previously stated, the project is hosted on GitHub and has undergone rigorous auditing by independent security experts.&lt;/p&gt;

&lt;p&gt;The code is easy to read and understand. You can also compile open-appsec with standard compilation tools, and it makes analyzing program behavior simple using traditional code analysis tools.&lt;/p&gt;

&lt;p&gt;This WAF solution also meets the [security standards of the &lt;a href="https://bestpractices.coreinfrastructure.org/en/criteria/0" rel="noopener noreferrer"&gt;Open Source Security Foundation (OpenSSF)&lt;/a&gt;, which indicates the high quality of the source material. The &lt;a href="https://github.com/openappsec/openappsec#machine-learning-models" rel="noopener noreferrer"&gt;advanced machine learning model&lt;/a&gt; of this tool is also open source and available for download by anyone.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Nginx is one of the most widely used software for serving web content, proxying, and load balancing. However, you still need to secure your Nginx-consuming web apps from threat actors and malware. A solid WAF should be your first layer of defense, as they block harmful requests at the application layer.&lt;/p&gt;

&lt;p&gt;In this article, you reviewed ModSecurity, Nginx App Protect, and &lt;a href="https://www.openappsec.io" rel="noopener noreferrer"&gt;open-appsec&lt;/a&gt; based on their active development, advanced security features, and open source principles.&lt;/p&gt;

&lt;p&gt;ModSecurity is a robust solution that offers an advanced rule engine and an open source codebase. But it lacks active development commitments from the vendor. In contrast, Nginx App Protect is actively being developed and offers intelligent features and CI/CD integrations. However, it doesn't offer any open source edition.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.openappsec.io" rel="noopener noreferrer"&gt;open-appsec&lt;/a&gt; is the only WAF in this list that not only is under active development but also offers the solution as open source software. These, coupled with its advanced ML-based threat detection engine, make open-appsec a viable solution for modern web apps.&lt;/p&gt;

</description>
      <category>python</category>
      <category>django</category>
      <category>beginners</category>
    </item>
    <item>
      <title>open-appsec NGINX WAF makes machine learning friendly using gamification</title>
      <dc:creator>openappsec</dc:creator>
      <pubDate>Wed, 28 Sep 2022 00:31:53 +0000</pubDate>
      <link>https://dev.to/openappsec/open-appsec-nginx-waf-makes-machine-learning-friendly-using-gamification-32m0</link>
      <guid>https://dev.to/openappsec/open-appsec-nginx-waf-makes-machine-learning-friendly-using-gamification-32m0</guid>
      <description>&lt;p&gt;In a &lt;a href="https://dev.to/openappsec/kubernetes-ingress-security-using-machine-learning-4hlp"&gt;previous blog&lt;/a&gt; we explained how &lt;a href="https://www.openappsec.io" rel="noopener noreferrer"&gt;open-appsec&lt;/a&gt;, an open source WAF project, is using machine-learning to preemptively block attacks against Web Apps &amp;amp; APIs.&lt;/p&gt;

&lt;p&gt;Machine learning is often a black-box which is difficult to understand and track. open-appsec uses &lt;a href="https://en.wikipedia.org/wiki/Gamification" rel="noopener noreferrer"&gt;gamification&lt;/a&gt; in order to demonstrate the learning progress.&lt;/p&gt;

&lt;p&gt;We developed a system that uses human understandable terms to describe the progress of learning as well as explanation as to what is needed in order to reach the next level.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq0dt32g881bri271fgtp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq0dt32g881bri271fgtp.png" alt="open-appsec machine learning levels"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Depending on amount and variance of traffic the machine learning engine will reach a stage where it has observed a sufficient amount of web requests to understand how the application is used. The faster this stage is reached, the faster detection is accurate and it is recommended to move to Prevent mode.&lt;/p&gt;

&lt;p&gt;When the learning level becomes Graduate, it is recommended to change the  Mode to Prevent. Graduate level ensures very good level of accuracy (e.g. low amount of false positives).  To reach Master or PhD level is is necessary to configure Trusted Sources. The Phd level is the highest level, which means that more learning is less likely going to improve the model further.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp7keah48q3gsh7q2zvr5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp7keah48q3gsh7q2zvr5.png" alt="open-appsec machine learning gamification"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To speed up the learning period the Contextual Machine Learning engine proposes tuning suggestions. The administrator can review the tuning suggestions and help the engine reach even better accuracy, a Machine Learning process also known as supervised learning.&lt;/p&gt;

&lt;p&gt;We get nice feedbacks from users saying that this allows them to understands the status and what they are expected to do no next.&lt;/p&gt;

&lt;p&gt;For additional details see &lt;a href="https://docs.openappsec.io/how-to/track-learning-and-move-from-learn-detect-to-prevent" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>cloudnative</category>
      <category>nginx</category>
      <category>kubernetes</category>
      <category>appsec</category>
    </item>
    <item>
      <title>Kubernetes Ingress Security using Machine Learning</title>
      <dc:creator>openappsec</dc:creator>
      <pubDate>Sat, 17 Sep 2022 19:20:54 +0000</pubDate>
      <link>https://dev.to/openappsec/kubernetes-ingress-security-using-machine-learning-4hlp</link>
      <guid>https://dev.to/openappsec/kubernetes-ingress-security-using-machine-learning-4hlp</guid>
      <description>&lt;p&gt;&lt;a href="https://https://openappsec.io/?utm_medium=social&amp;amp;utm_source=devto&amp;amp;utm_content=ml"&gt;open-appsec&lt;/a&gt; is an open-source initiative that builds on Machine Learning. It utilizes a three-phase approach for detecting and preventing web application and API attacks. &lt;/p&gt;

&lt;p&gt;This blog explains how these three phases deliver accurate results with a very low amount of false positives and how they protect the environment against known and unknown zero-day attacks with real-time protection.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--I5i1q2Mx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8b8y0e30yr7xforgki02.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--I5i1q2Mx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8b8y0e30yr7xforgki02.png" alt="open-appsec ML-based WAF" width="880" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Phase 1 – Payload Decoding
&lt;/h2&gt;

&lt;p&gt;Effective machine learning requires a deep understanding of the underlying application protocols which is continuously evolving. The engine analyzes all fields of the HTTP request including the URLs, HTTP headers, which are critical in this case, JSON/XML extraction and payload normalization such as base64 and other decoding's. A set of parsers covering common protocols feeds the relevant data into phase 2.&lt;br&gt;
For example, in the case of Log4Shell attacks, some exploit attempts were using base64 and escaping encoding so it was possible to pass a space character for applying parameters. &lt;/p&gt;

&lt;h2&gt;
  
  
  Phase 2 – Attack Indicators
&lt;/h2&gt;

&lt;p&gt;Following parsing and normalization, the network payload input is fed into a high-performance engine which is looking for attack indicators. An attack indicator is a pattern of exploiting vulnerabilities from various families. We derive these attack patterns based on on-going off-line supervised learning of huge number of payloads that are each assigned a score according to the likelihood of being benign or malicious. This score represents the confidence level that this pattern is part of an attack. Since combinations of these patterns can provide a better indication for an attack a score is also calculated for the combination of patterns.&lt;/p&gt;

&lt;p&gt;For example, in the case of Log4Shell and Spring4Shell attacks, open-appsec used several indicators from Command Injection / Remote Code Execution / Probing families that signaled payloads to be malicious in a very high score which was enough on its own, but to ensure accuracy and avoidance of false positives, the engine always moves to the third and last phase.&lt;/p&gt;

&lt;h2&gt;
  
  
  Phase 3 – Contextual Evaluation Engine
&lt;/h2&gt;

&lt;p&gt;This contextual engine is using machine learning techniques to make a final determination whether the payload is malicious, in the context of a specific customer/environment, user, URL and field that in a weighted function sums up to a confidence score. If the score is larger than the threshold the request is dropped.&lt;/p&gt;

&lt;p&gt;These are the factors that are considered by the engine:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reputation factor&lt;/strong&gt;&lt;br&gt;
In each request, the request originator is assigned a score. The score represents the originator’s reputation based on previous requests. This score is normalized and used to increase or decrease the confidence score.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Application awareness&lt;/strong&gt;&lt;br&gt;
Often modern applications allow users to modify web pages, upload scripts, use elaborate query search syntax, etc. These provide a better user experience but without application awareness, these are detected as malicious attacks. We use ML to analyze and baseline the underlying application’s behavior.&lt;br&gt;
Learn user input format&lt;br&gt;
The system can identify special user input types that are known to cause false detection and apply ML to modify our detection process and allow legitimate behavior without compromising attack detection.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;False detection factor&lt;/strong&gt;&lt;br&gt;
If there is an inconsistency in detection a factor is applied to the confidence score based on the reputation factor per detection location.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Supervised learning module&lt;/strong&gt;&lt;br&gt;
Optional module that shows administrators payload and ask them to classify them thus accelerating the learning process.&lt;/p&gt;

</description>
      <category>devsecops</category>
      <category>kubernetes</category>
      <category>nginx</category>
      <category>aws</category>
    </item>
    <item>
      <title>Hello, world! about open-appsec beta program.</title>
      <dc:creator>openappsec</dc:creator>
      <pubDate>Sun, 11 Sep 2022 18:50:53 +0000</pubDate>
      <link>https://dev.to/openappsec/hello-world-about-open-appsec-beta-program-1gk9</link>
      <guid>https://dev.to/openappsec/hello-world-about-open-appsec-beta-program-1gk9</guid>
      <description>&lt;p&gt;Open-source has enabled the tech industry to creatively use, build, connect and innovate. Can you imagine a modern tech stack without open-source projects like Linux, Kubernetes, Kafka, Python, NodeJS, ElasticSearch, NGINX, Redis, MySQL, Mongo and numerous others?&lt;/p&gt;

&lt;p&gt;In November 2002 Ivan Ristić, an English engineer, released a module for monitoring application traffic for Apache HTTP Server, known as ModSecurity or ModSec. A few years later, the module was released under an open-source license, and together with OWASP Core Rule Set (CRS) — a set of signatures for detecting web exploits, became the cornerstone of the entire WAF industry.&lt;/p&gt;

&lt;p&gt;In 2022, many companies including Imperva, AWS, Microsoft, CloudFlare, Akamai, F5, NGINX and others are providing WAF products based on open-source ModSec concepts, signature-based technology and code.&lt;/p&gt;

&lt;p&gt;Signature-based solutions are well proven, but they are reactive by nature, meaning that often signatures aren’t available until after vulnerabilities have been known for some time and exploits are put into circulation, as such they don’t provide good enough response for modern fast-spreading attacks. From an operational perspective they require constant tuning and exception handling to avoid false positives.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PWtNsIdE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lbx3k8053r8jtyxclder.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PWtNsIdE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lbx3k8053r8jtyxclder.png" alt="open-appsec" width="180" height="175"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We are now starting &lt;a href="https://openappsec.io?utm_medium=web&amp;amp;utm_source=devto&amp;amp;campaign=hello_world_blog"&gt;open-appsec&lt;/a&gt; beta program — a new open-source initiative that builds on machine learning to provide enterprise web application and API security with the visibility, protection and manageability that is required by modern workloads.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;open-appsec:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;protects web applications &amp;amp; APIs preemptively against OWASP-Top-10- and zero-day attacks using patented machine learning with no threat signature upkeep&lt;/li&gt;
&lt;li&gt;blocks attacks such as Log4Shell and Spring4Shell, with default settings and no updates, due to its pre-emptive nature&lt;/li&gt;
&lt;li&gt;delivers precise threat prevention through continuous learning, finding attacks while eliminating the tuning &amp;amp; exception creation inherent to traditional WAFs&lt;/li&gt;
&lt;li&gt;can be deployed as add-on to Kubernetes Ingress (Kubernetes WAF), NGINX (NGINX WAF), Envoy (Envoy WAF) and API Gateways and provides CI/CD-friendly deployment and automation — from installation to upgrades, to configuration — using declarative infra-as-code or APIs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The open-appsec program is now in initial beta exposure. You are welcome to learn about the &lt;a href="https://www.openappsec.io?utm_medium=web&amp;amp;utm_source=devto&amp;amp;campaign=hello_world_blog"&gt;project&lt;/a&gt;, read the &lt;a href="https://docs.openappsec.io?utm_medium=web&amp;amp;utm_source=devto&amp;amp;campaign=hello_world_blog"&gt;documentation&lt;/a&gt; and &lt;a href="https://docs.openappsec.io/getting-started?utm_medium=web&amp;amp;utm_source=devto&amp;amp;campaign=hello_world_blog"&gt;test&lt;/a&gt; it in your environment.&lt;/p&gt;

&lt;p&gt;We are working to make the code available on GitHub once we have additional community feedback.&lt;/p&gt;

&lt;p&gt;Please join our &lt;a href="https://docs.openappsec.io/community?utm_medium=web&amp;amp;utm_source=devto&amp;amp;campaign=hello_world_blog"&gt;community&lt;/a&gt;, share your feedback and thoughts.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>kubernetes</category>
      <category>aws</category>
      <category>cybersecurity</category>
    </item>
  </channel>
</rss>
