Dark Arts
  • index
  • BUY ME A BOOK
  • 🪄Dark Magic
    • Pentesting
      • Industry Methodologies
    • Scopes of Testing
    • Reconnaissance
      • Passive
        • WHOIS
        • DNS
          • nslookup
          • dig
        • WAF
        • Subdomain
        • Google Dork
        • Misc. Techniques
        • Leaked Passwords
      • Active
        • Browser & Plugins
        • ping & traceroute
        • fping
        • telnet & netcat
        • DNS
          • Zone Transfer
          • DNS Amplification DDoS Attack Breakdown
        • Misc. Techniques
    • Vulnerability Assessment
    • Attack Types
  • 🕷️Aragoogs Nest
    • Web Application Overview & Security
      • Security Testing
      • Common Threats & Risks
    • Web Application Architecture
      • Technologies
    • HTTP/S
      • Message
      • Request
      • Response
        • Status Code
    • Crawling/Spidering
  • 🧪Potions
    • Web Browsers
    • Computer Networking
      • Network Protocol
      • Packets
      • OSI Layer
        • Layer 3: Network
        • Layer 4: Transport
      • DNS
        • Primary-Secondary
        • Local Name Resolution
        • Domain Hierarchy
        • FQDN
        • Lookups
        • DNS Resolution
        • DNS Records
        • Security: Attack-Defense (Default)
  • 🎆Spells
    • 📜Linux Scroll
    • 📜WebShell Scroll
    • git
      • Attacks + Vulnerabilities
  • 🖼️Flaws w/ Magical Frameworks
    • Windows
      • In a Nutshell
      • CVE-2019-0708: BlueKeep
      • CVE-2017-0144: EternalBlue: MS17-010
      • Attacking Services
        • MS IIS - WebDAV
        • SMB
        • HTTP File Server (HFS)
        • Apache Tomcat Web Server
        • RDP
        • WinRM
      • File System Vulnerabilities
      • Credential Dumping
        • Password Search in Windows Configuration Files
        • Mimikatz
        • Pass-the-Hash Attack
    • Linux
      • In a Nutshell
      • CVE-2014-6271: Shellshock
      • Attacking Services
        • FTP
        • SSH
        • SAMBA
        • SMTP
        • RSYNC
      • Dumping Hashes
  • 🌼Marauder's Boost
    • Privilege Escalation
    • Windows PrivEsc
      • Windows Kernel Exploit
      • Bypassing UAC
      • Access Token Impersonation
    • Linux PrivEsc
      • Linux Kernel Exploit
      • Misconfigured Cron Jobs
      • Exploiting SUID Binaries
      • shells
      • File Permissions
  • ☠️Death Eaters
    • Post Exploitation
      • Windows
      • Linux
  • 🪄OLLIVANDERS
    • nmap
      • Host Discovery
      • Port Scan
      • Service & OS
      • NSE
      • Firewall/IDS Evasion
      • Scan Optimization
      • Misc. Methods
    • ffuf
    • Hydra
    • Metasploit Framework
      • Architecture
      • Must to Know
      • msfvenom
      • Auxiliary Modules
      • Service Enumeration
      • Vulnerability Scanning
      • Imports
      • Automating
    • Vulnerability Scanners
    • Wireshark
  • 🚂Platform 9(3/4)
    • Auth-Auth
      • Authentication
        • Password-based Authentication
        • Basic Authentication
        • Multi-factor Authentication
        • Access Token
        • Token-based Authentication
          • JWT
          • OAuth 2.0
    • Secure Headers
      • Content-Security-Policy (CSP)
    • Cryptography
      • Caesar Cipher
  • ⛲Port Pensieve
    • Enumeration
      • SMB & NetBIOS
      • SNMP
    • Wordlists
  • 🔆DUELS
    • Pivoting
    • SMB Relay Attack
  • 🗺️Marauder's Map
    • Web Application Pentesting
    • API Pentesting
      • GraphQL
        • Primer
    • Mobile Application Pentesting
  • 🎧SIDE CHANNEL
    • Side Channel Analysis
    • Timing Side-Channel Attacks
      • Vulnerable Login
  • 🥃Sky
    • Cloud Basics
    • Cloud Management
      • Shared Responsibility Model
    • Using Cloud Resources
      • Monitoring & Alerts
      • Identity & Access Management
      • Scalability & Availability
      • Solution Design
    • Cloud Providers
    • Cloud Security & Regulatory Compliance
      • Resource Protection
      • ICCA: Cloud Security & Regulatory Compliance
    • ICCA Preparation
      • Knowledge Tests
      • Lab
  • 🔷Obsidian
    • Pentest Engagement
      • Scoping
    • Pentest Ethics
      • Rules of Engagement
    • Auditing Fundamentals
      • Process/Lifecycle
      • Pentest & Security Auditing
      • GRC
      • Standards, Frameworks & Guidelines
      • From Audit to Pentest
  • 💢Threat Modeling
    • Why Threat Model?
  • 📡THREAT INTEL
    • Threat Intelligence
    • Tool Dump
  • 📱Anything-Mobile-IoT
    • Firmware
    • Firmware Analysis
      • Example: CVE-2016-1555
    • Firmware Installation/Flashing
  • 🎉Mischeif
    • Social Engineering
    • Phishing
      • GoPhish
    • Pretexting
Powered by GitBook
On this page
  • Phase 1: Develop a Security Policy
  • Background
  • Objectives
  • Requirements Gathering
  • Phase 2: Security Auditing with Lynis
  • Phase 3: Conduct Pentest
  1. Obsidian
  2. Auditing Fundamentals

From Audit to Pentest

Phase 1: Develop a Security Policy

Background

Company: SecureTech Solutions

SecureTech Solutions is a fictitious cybersecurity consultancy specializing in securing IT infrastructures for various clients. This example demonstrates the process of developing a security policy for Linux servers, conducting a risk assessment using the NIST SP 800-53 framework, performing a security audit, and testing the remediation efforts. It highlights the importance of compliance with industry standards throughout this process.

Objectives

The goal is to establish a baseline security policy for Linux servers that aligns with the NIST SP 800-53 guidelines. This policy ensures that servers are configured and managed securely, protecting them from unauthorized access, vulnerabilities, and other security threats. It will serve as the foundation for configuring, maintaining, and monitoring Linux servers within the organization, ensuring compliance with industry standards.

Requirements Gathering

  1. Purpose: Define the scope and purpose of the security policy, focusing on securing Linux servers.

  2. Access Control: Outline user account management, authentication methods, and privilege management strategies to ensure secure access.

  3. Audit and Accountability: Specify logging requirements and review procedures to monitor system activities effectively.

  4. Configuration Management: Set baseline configurations, software update practices, and change management protocols to maintain system integrity.

  5. Identification and Authentication: Enforce strong password policies and ensure unique user identification for secure access control.

  6. System and Information Integrity: Implement measures such as malware protection, security monitoring, and vulnerability management to safeguard system integrity.

  7. Maintenance: Define controlled maintenance practices, including the use of approved maintenance tools to minimize security risks.

Phase 2: Security Auditing with Lynis

The objective of this phase is to perform a security audit on a Linux server using Lynis, identify any vulnerabilities, and remediate them according to the established security policy.

The first step is to install Lynis on the Linux server. Once installed, a Lynis audit scan is conducted on the target server, generating a detailed report that highlights security issues and provides recommendations. After reviewing the report, the identified vulnerabilities are remediated—such as updating software or enforcing stronger password policies. The final step involves documenting the remediation actions and updating the security policy to reflect these changes, ensuring continuous alignment with best practices.

Step 1: Download and Install Lynis

tar -xf Lynis
chmod +x lynis

Step 2: Use Lynis

lynis audit system
lynis audit system --tests "[Control-ID]"
lynis audit system remote [HOST]
lynis audit dockerfile [FILE]

Phase 3: Conduct Pentest

The objective of this phase is to validate the effectiveness of the remediation actions by performing a penetration test, ensuring that the Linux server is secure and compliant with the security policy.

First, the penetration test is executed by conducting a network scan using Nmap to identify open ports and services, followed by vulnerability scanning with Metasploit to discover and exploit potential weaknesses. If applicable, Burp Suite is used to test web applications for security flaws.

Next, the results of the penetration test are compared to the initial security audit findings to confirm that vulnerabilities have been addressed. Any new vulnerabilities introduced during remediation are also identified and resolved.

Finally, a detailed report is created. It includes an executive summary of the test, a description of the tools and techniques used, a summary of findings with their severity and impact, and recommendations to further secure the system.

PreviousStandards, Frameworks & GuidelinesNextWhy Threat Model?

Last updated 8 months ago

Controls it uses:

🔷
https://cisofy.com/lynis/controls/
NIST Special Publication (SP) 800-53 Rev. 5, Security and Privacy Controls for Information Systems and OrganizationsCSRC | NIST
Assessment & Auditing ResourcesNIST
Logo
Lynis - Security auditing and hardening tool for Linux/Unixcisofy_is
Logo
Logo