PROJECTENGRAM

INTRODUCTION TO OFFENSIVE SECURITY AND KALI LINUX

Introduction to Offensive Security and Kali Linux

Tags: #◇Computer Science #◇NSSECU2 #◇Cybersecurity #◇Offensive Security #◇Penetration Testing #◇Kali Linux #◇Ethics


◇Overview

Offensive security adopts the perspective and techniques of malicious threat actors to proactively identify, evaluate, and remediate system vulnerabilities before they can be exploited in real-world attacks. By operating under formal authorization, strict ethical boundaries, and well-defined Rules of Engagement (RoE), security practitioners evaluate defense postures using specialized toolchains—primarily within the ◇Kali Linux ecosystem—while maintaining rigorous documentation and evidence discipline.

◇Key Definitions

  • Offensive Security: A proactive, adversarial approach to cybersecurity that evaluates defensive controls by simulating real-world attacker techniques and attack vectors.
  • CIA Triad: The foundational information security model comprising Confidentiality (preventing unauthorized disclosure), Integrity (protecting data from unauthorized modification), and Availability (ensuring timely, reliable access to assets).
  • Ethical Hacking: The authorized practice of circumventing system security to discover vulnerabilities, evaluate business risk, and provide remediation guidance.
  • Rules of Engagement (RoE): A formal, legally binding document detailing the technical constraints, authorized testing windows, excluded targets, escalation pathways, and emergency communication protocols for a security assessment.
  • Scope of Work (SOW): The contractual definition of in-scope systems, IP address ranges, applications, and testing boundaries.
  • White Hat Hacker: An authorized security professional who uses adversarial skills solely for defensive enhancement and vulnerability remediation.
  • Black Hat Hacker: A malicious actor who violates computer security without authorization for personal, financial, or ideological gain.
  • Gray Hat Hacker: An individual who identifies security flaws without prior authorization but without explicit malicious intent; remains legally and ethically hazardous.
  • Script Kiddie: An unskilled attacker who relies exclusively on automated scripts, exploits, and pre-packaged tools developed by others without comprehending the underlying mechanisms.

◇Theoretical Framework / Core Concepts

1. The CIA Triad in Offensive Operations

The ◇CIA Triad provides the measurement criteria for assessing vulnerability impact across enterprise systems:

『』
TEXT
               +-----------------------+
               |     CONFIDENTIALITY   |
               | (Unauthorized Access) |
               +-----------+-----------+
                           |
                           |
       +-------------------+-------------------+
       |                                       |
+------+----------------+             +--------+---------------+
|       INTEGRITY       |             |      AVAILABILITY      |
| (Unauthorized Change) |             |  (Denial of Service)   |
+-----------------------+             +------------------------+
  1. Confidentiality: Attacker goals include credential harvesting, data exfiltration, database dumping, and intercepting unencrypted network traffic. Defenses include strong encryption, least privilege access control, and robust authentication.
  2. Integrity: Attacker goals include tampering with database records, altering source code, modifying configuration files, or planting unauthorized administrative backdoors. Defenses include cryptographic hashing, file integrity monitoring (FIM), and strict role-based access control (RBAC).
  3. Availability: Attacker goals include resource exhaustion, Denial of Service (DoS), service crashes, or ransomware encryption. Defenses include load balancing, rate limiting, redundant architectures, and disaster recovery replication.

2. Threat Actor Taxonomy & Ethical Boundaries

Security professionals must understand the spectrum of threat actors operating across modern networks:

Actor ClassAuthorizationMotivationTypical CapabilitiesOperational Restraint
White HatFull, explicit written permissionDefensive posture enhancement, risk mitigationAdvanced, systematic, methodologicalHigh; bound by RoE and legal contracts
Black HatNoneFinancial extortion, espionage, destructionVariable (Novice to Nation-State/APT)Zero; seeks maximum leverage and persistence
Gray HatNoneCuriosity, notoriety, unsolicited disclosureIntermediateLow; violates laws regardless of intent
Script KiddieNoneDisruption, vandalism, curiosityLow; automated tools without deeper understandingUnpredictable; causes collateral service damage

[!warning] Legal Reality of Security Testing
Technical skill does not grant legal immunity. Performing any scanning, probing, or exploitation against systems without explicit, signed authorization from the system owner constitutes an illegal act under international cybercrime statutes. Ethical hackers operate solely within defined scopes.

3. Penetration Testing Frameworks

Structured frameworks guarantee repeatable, objective, and defensible security assessments:

『』
TEXT
+-----------------------------------------------------------------------------------+
|                        PENETRATION TESTING FRAMEWORKS                             |
+-----------------------------------------------------------------------------------+
|  1. PTES (Penetration Testing Execution Standard)                                 |
|     -> 7 Stages: Pre-engagement, Intel Gathering, Threat Modeling,                |
|                  Vuln Analysis, Exploitation, Post-Exploitation, Reporting       |
+-----------------------------------------------------------------------------------+
|  2. OSSTMM 3 (Open Source Security Testing Methodology Manual)                    |
|     -> Quantifiable metrics: Trust Analysis, Operational Security, Human/Physical |
+-----------------------------------------------------------------------------------+
|  3. NIST SP 800-115 (Technical Guide to Information Security Testing)            |
|     -> Federal standard: Planning, Discovery, Attack, Reporting                   |
+-----------------------------------------------------------------------------------+
|  4. OWASP Web Security Testing Guide (WSTG v4.2)                                  |
|     -> Specialized web testing: Injection, Auth, Session, Logic, Config Flaws    |
+-----------------------------------------------------------------------------------+
  • PTES (Penetration Testing Execution Standard): The primary industry benchmark defining seven continuous stages from pre-engagement negotiation to final executive reporting.
  • OSSTMM 3: Focuses on measurable operational security metrics, verifying what assets do rather than what they are purported to do.
  • NIST SP 800-115: A comprehensive technical reference for federal and enterprise security auditing, detailing systematic discovery, vulnerability verification, and post-testing cleanup.
  • OWASP WSTG: The authoritative standard for web application security assessments, covering the full spectrum of client-side, server-side, and API vulnerability vectors.

4. Testing Methodologies & Scoping Architecture

The level of information provided prior to an assessment dictates the testing approach:

AttributeBlack-Box TestingGray-Box TestingWhite-Box Testing
Knowledge ProvidedZero internal knowledge (only domain/IP)Partial knowledge (user credentials, architecture overview)Full knowledge (source code, architecture, root access)
Simulation RealismSimulates external opportunistic or targeted attackerSimulates compromised insider or standard registered userSimulates malicious insider, developer, or full code auditor
Efficiency & SpeedSlower; requires extensive external reconnaissanceHigh efficiency; focuses on high-impact logic pathsHighest coverage; uncovers obscure architectural bugs
Primary FocusPerimeter defenses, exposed attack surfacePrivilege escalation, business logic, API securitySource code flaws, cryptographic errors, deep logic

In-Scope vs. Out-of-Scope Assets

The Rules of Engagement strictly define operational boundaries:

  • In-Scope Targets: Explicitly enumerated IP addresses, subnets, domain names, and application endpoints (e.g., 192.168.10.0/24, api.example.com).
  • Explicit Exclusions: Critical production databases, core payment gateways, shared active directory domain controllers, third-party cloud infrastructure (without vendor authorization), and denial-of-service testing.

◇Pentest Environment & Evidence Management

1. Kali Linux Workspace Organization

A structured directory hierarchy prevents cross-contamination of client data and preserves evidence integrity:

『』
BASH
# Standardized Engagement Directory Layout
mkdir -p ~/pentest-engagements/client-alpha/{recon,scans,exploits,evidence,loot,reports}
cd ~/pentest-engagements/client-alpha/

# Verify working directory structure
tree ~/pentest-engagements/client-alpha/
  • recon/: Raw OSINT data, WHOIS records, DNS zone dumps, Shodan profiles.
  • scans/: Port scan outputs (nmap gnmap/xml/normal formats), service banners, Nikto logs.
  • exploits/: Custom scripts, PoC code, compiled validation payloads.
  • evidence/: High-resolution, unedited terminal transcripts, screen captures with timestamps.
  • loot/: Extracted hash dumps, configuration files, and non-sensitive proof artifacts.
  • reports/: Draft and final deliverable documents.

2. Evidence Recording Protocol

Every technical finding requires verifiable proof demonstrating that an observation was genuinely made:

『』
TEXT
================================================================================
EVIDENCE RECORDING STANDARD TEMPLATE
================================================================================
Timestamp (UTC):    2026-09-02T02:40:00Z
Operator / Agent:   Security Tester
Target Host / URI:  192.168.10.45:8080 /api/v1/user
Command Executed:   curl -i -s -X GET "http://192.168.10.45:8080/api/v1/user?id=102" \
                    -H "Authorization: Bearer <JWT_TOKEN>"
Terminal Output:    HTTP/1.1 200 OK
                    Content-Type: application/json
                    {"user_id": 102, "role": "admin", "email": "admin@internal.lab"}
Technical Analysis: User 101 successfully retrieved admin profile data for User 102
                    without authorization (IDOR / BOLA vulnerability).
================================================================================

[!tip] Forensic Integrity of Screenshots
When capturing graphical or terminal evidence, always include the full system clock (timestamp), full URL or IP address, active user context (whoami), and raw HTTP/command input. Never crop away identifying technical context.

◇Common Pitfalls & Investigative Restraint

  • Assumption vs. Observation: Never assume a port is vulnerable simply because a banner reports an older version; backported vendor security patches frequently retain legacy version strings.
  • Uncontrolled Tool Execution: Firing aggressive automated vulnerability scanners against production services without tuning scan rates can trigger denial-of-service conditions or account lockouts.
  • Scope Creep: Traversing from an authorized web server into an unlisted third-party analytics host or payment provider violates engagement scope.
  • Neglecting Cleanup: Leaving test accounts, temporary webshells, or elevated backdoor accounts active on client infrastructure after engagement completion.

◇References & Navigation

CONFIRMATION // 理解度の確認

ACTIVE RECALL VERIFICATION

Select an answer to verify conceptual comprehension and reveal the technical rationale.

Q1

Which element of the CIA triad is primarily compromised when an unauthorized attacker modifies database records to elevate their account balance?

Q2

What is the fundamental operational difference between a White Hat and a Gray Hat hacker?

Q3

Under the PTES (Penetration Testing Execution Standard) framework, which phase directly follows Threat Modeling?

Q4

In which testing methodology does the penetration tester operate with zero prior knowledge of the internal network architecture or source code?

Q5

Why is it critical for an ethical hacker to review the Rules of Engagement (RoE) before initiating active vulnerability scanning?

Q6

A penetration tester observes a web server banner reading Apache/2.4.41 (Ubuntu). Which action demonstrates proper investigative discipline?

Q7

What is the primary purpose of maintaining a dedicated evidence/ directory with verbatim command logs and timestamps during an assessment?

Q8

Which actor class is characterized by running automated exploitation scripts without understanding the underlying technical payload or protocol interactions?

Introduction to Offensive Security and Kali Linux | PROJECT ENGRAM