Pentest

Definition

A pentest, or penetration test, is a simulated cyber attack against a computer system, network, or web application to identify vulnerabilities that could be exploited by attackers. It involves a series of planned and controlled attempts to breach security defenses using various tools and techniques, mimicking the strategies of malicious actors. The goal is to uncover security weaknesses before they can be exploited in real-world attacks, thereby enhancing the overall security posture of the organization.

Secure Settings Example

# Example of a secure Kubernetes PodSecurityPolicy
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
  name: restricted
spec:
  privileged: false
  allowPrivilegeEscalation: false
  requiredDropCapabilities:
    - ALL
  runAsUser:
    rule: 'MustRunAsNonRoot'
  seLinux:
    rule: 'RunAsAny'
  fsGroup:
    rule: 'MustRunAs'
    ranges:
      - min: 1
        max: 65535
  volumes:
    - 'configMap'
    - 'emptyDir'
    - 'persistentVolumeClaim'

Insecure Settings Example

# Example of an insecure Kubernetes PodSecurityPolicy
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
  name: permissive
spec:
  privileged: true
  allowPrivilegeEscalation: true
  runAsUser:
    rule: 'RunAsAny'
  seLinux:
    rule: 'RunAsAny'
  fsGroup:
    rule: 'RunAsAny'
  volumes:
    - '*'