Instructions to protect PHP application with K2 Platform
Overview
In this section, we outline the steps for protecting your first PHP application with the K2 Platform.
Prerequisites
Please check our support matrix for PHP.
Language
Server
DBs
Attack Coverage
Deployments
Supported OS
PHP 5.4
PHP 5.5
PHP 5.6
PHP 7 (All versions)
PHP 8
Apache (pre fork) (mod_php handler),
Apache (Prefork, Event and worked using PHP-FPM)
MYSQL
Procedural
Object-Oriented
PDO
MSSQL
Procedural
Object Oriented
PDO
POSTGRESQL
Procedural
Object Oriented
PDO
RCE
LDAP
Application Integrity Violation
File Access Attacks
Read Access
Write Access
SSRF
SQL Injection
XSS
XPath
Host Mode
Container Mode
CentOS (7)
Ubuntu (16.04, 18.04)
RHEL (7)
Debian
Fedora
Steps
Step 1 : K2 Portal and Account Creation
We need to make sure In order to use K2 Platform You need to create an account on K2 Portal.
K2 Portal can be used as SaaS model or you can deploy entire portal on your On-Premises.
K2 Platform is offered as SaaS software and can be used directly visiting SaaS portal i.e. https://k2io.net or if you are an AWS customer then you can buy subscription to K2 SaaS portal on AWS Marketplace.
K2 Platform is also offered as On-Premises based solution and can be deployed directory on your local infrastructure or if you are an AWS customer then you can subscribe to K2Cloud AMI and deploy K2 On-Premises portal on AWS.
For demonstration purposes we are creating a docker container with non secure application and running it with our already downloaded K2 PHP language agent.
Attach PHP Agent
SQL Injection Attack
Now you can go to Attacks section in K2 Manager and see there will be one attack captured by K2 Manager or Alternatively go to Attacks | K2 Portal.