Network-Servers-Penetration-Guides-and-Tools

Introduction to Information Security & Penetration Testing

⚠️ This module is fully theoretical and was extracted from CEH Study Guide repo. Here you’ll find some basic terms in ‘InfoSec world’.

Fundamental Security Concepts

The whole principle is to avoid Theft, Tampering and Disruption of the systems through CIA Triad (Confidentiality, Integrity and Availability).

Note: In addition, other properties, such as authenticity, accountability, non-repudiation and reliability can also be involved. (ISO/IEC 27000:2009)

Security, Functionality and Usability balance

There is an inter dependency between these three attributes. When security goes up, usability and functionality come down. Any organization should balance between these three qualities to arrive at a balanced information system.

Types of Hackers

Script Kiddie / Skiddies - Unskilled individual who uses malicious scripts or programs, such as a web shell, developed by others to attack computer systems and networks and deface websites.

State-Sponsored Hacker - Hacker that is hired by a government or entity related.

Hacktivist - Someone who hacks for a cause; political agenda.

Suicide Hackers - Are hackers that are not afraid of going jail or facing any sort of punishment; hack to get the job done.

Cyberterrorist - Motivated by religious or political beliefs to create fear or disruption.

Hacking Vocabulary

Threat Categories

Attack Vectors

Path by which a hacker can gain access to a host in order to deliver a payload or malicious outcome

Attack Types

1. Operating System

Attacks targeting OS flaws or security issues inside such as guest accounts or default passwords.

2. Application Level

Attacks on programming code and software logic.

3. Misconfiguration

Attack takes advantage of systems that are misconfigured due to improper configuration or default configuration.

4. Shrink-Wrap Code

Act of exploiting holes in unpatched or poorly-configured software.

Vulnerabilities

Vulnerability Categories

Pen Test Phases (CEH method)

  1. Pre-Attack Phase - Reconnaissance and data-gathering.
  2. Attack Phase - Attempts to penetrate the network and execute attacks.
  3. Post-Attack Phase - Cleanup to return a system to the pre-attack condition and deliver reports.

The Five Stages of Ethical Hacking

1. Reconnaissance

Gathering evidence about targets; There are two types of Recon:

2. Scanning & Enumeration

Obtaining more in-depth information about targets.

3. Gaining Access

Attacks are leveled in order to gain access to a system.

4. Maintaining Access

Items put in place to ensure future access.

5. Covering Tracks

Steps taken to conceal success and intrusion; Not be noticed.

Three Types of Active Defense

Information Assurance (IA)

Refers to the assurance of the Integrity, Availability, confidentiality, and authenticity of information and information systems during usage, processing, storage and transmission of information.

Information Security Management Program

Combination of policies, processes, procedures, standards, and guidelines to establish the required level of information security.

infosec

⚠️ IA focus on risk assessment, mitigation side of things; ⚠️ InfoSec focus on actually implementing security measures to safeguard systems.

EISA - Enterprise Information Security Architecture

Set of requirements, process, principles, and models that determines the structure and behavior of an organization’s information systems.

Physical Security Controls

Most of security controls are preventive phase controls.

⚠️ Defense in Depth: Multiple layers of security controls; Provides redundancy in the event of a control failure. (e.g.: image below)

defense-in-depth

Types of Security Controls

Description Examples
Physical Guards, lights, cameras, fire extinguishers, flood protection
Administrative Training awareness, policies, procedures and guidelines to infosec
Technical IDS/IPS, Firewall, Encryption, Smart cards, Access control lists
Description Examples
Preventative authentication, alarm bells
Detective audits, backups
Corrective restore operations

Managing the Risk

Risk can be defined as a probability of the occurrence of a threat or an event that may damage, or cause loss or have other negative impact either from internal or external liabilities.

Risk matrix

A risk matrix is used during risk assessment to define the level of risk by considering the category of probability or likelihood against the category of consequence severity.

matrix

Risk Management

Is the identification, evaluation, and prioritization of risks followed by coordinated and economical application of resources to minimize, monitor, and control the probability or impact of unfortunate events or to maximize the realization of opportunities.

Security Policies

  1. Policies - High-level statements about protecting information; Business rules to safeguard CIA triad; Security Policies can be applied on Users, Systems, Partners, Networks, and Providers.
    • Common Security Policies examples:
      • Password Policy
        • Meet the password complexity requirements.
        • e.g: Minimum 8 char length, upper and lower case and alphanumerical.
      • Wireless Security Policy
      • AUP - Acceptable Use-Policy
        • How to properly use company’s assets
        • e.g: “Do’s and Dont’s” with company’s computer.
      • Data Retention Policy
        • e.g: Keep the data for X time.
      • Access Control Policies
        • e.g: Accessing servers; Firewalls
  2. Procedures - Set of details steps to accomplish a goal; Instructions for implementation
  3. Guidelines - Advice on actions given a situation; Recommended, not mandatory

Security Policy - Examples

Security Policiy - Types

  1. Promiscuous Policy - This policy usually has no restrictions on usage of system resources.

  2. Permissive Policy - This policy begins wide open and only know dangerous services/attacks or behaviors are blocked. This type of policy has to be updated regularly to stay effective.

  3. Prudent Policy - This policy provides maximum security while allowing known but necessary dangers. This type of policy will block all services and only safe/necessary services are enabled individually. Everything is logged.

  4. Paranoid Policy - This policy forbids everything. No Internet connection or severely restricted Internet usage is allowed.

Security Policy - Creation Steps

  1. Perform a Risk Assessment
  2. Use security Standards and Frameworks as guide
  3. Get Management and Staff input
  4. Enforce the policy. Use penalties for non-compliance
  5. Publish final draft to entire org.
  6. Have all staff read/sign that they understood policy
  7. Employ tools to help enforce policy
  8. Staff training
  9. Review and update regularly

Incident Management Process

An incident is an event that could lead to loss of, or disruption to, an organization’s operations, services or functions.

Incident management is a term describing the activities of an organization to identify, analyze, and correct hazards to prevent a future re-occurrence.

  1. Preparation: Select people, assign rules, define tools to handle the incident.
  2. Detection & Analysis: Determine an incident has ocurred (IDS, SIEM, AV, Someone reporting, etc).
  3. Classification and Prioritization:
  4. Notification: Identify minor and major incident; who and how to notify an incident.
  5. Containment: Limit the damage; Isolate hosts; Contact system owners.
  6. Forensic Investigation: Investigate the root cause of the incident using forensic tools; System logs, real-time memory, network device logs, application logs, etc;
  7. Eradicate & Recovery: Remove the cause of incident; Patch if needed. Recovery: get back into production; Monitor affected systems.
  8. Post-incident Activities: Document what happened and why; Transfer knowledge.

Incident Response Team Duties

  1. Managing security issues by taking a proactive approach towards the customer’s security vulnerabilities
  2. Developing or reviewing processes and procedures that must be followed
  3. Managing the response to an incident and ensuring that all procedures are followed correctly in order to minimize and control the damage
  4. Identifying and analyzing what has happened during an incident, including impact and threat
  5. Providing a single point of contact for reporting seucirty incidents and issues
  6. Reviewing changes in legal and regulatory requirements to ensure that all processes and procedures are valid
  7. Reviewing existing controls and recommending steps and technologies to prevent future incidents
  8. Establishing relationship with local law enforcement agency, gov. agencies, key partners and suppliers

SIEM - Security Information and Event Management

Collects data points from network, including log files, traffic captures, SNMP messages, and so on, from every host on the network. SIEM can collect all this data into one centralized location and correlate it for analysis to look for security and performance issues, as well negative trends all in real time.



Identity and Access Management

Identification, Authentication, Authorization, and Accounting work together to manage assets securely.

1. Identification

The information on credentials identifies the user.

2. Authentication

“Prove you are the legitimate User”. – Should always be done with Multifactor Authentication!

3. Authorization concepts

What are you allowed to access – We use Access Control models, what and how we implement depends on the organization and what our security goals are.

4. Accouting

Trace an Action to a Subjects Identity:

Access Controls Models

⚠️ Access is defined by ACL, Access Control List. ⚠️ Implicity deny prevents access unless specifically permitted.

Data Loss Prevention (DLP)

Data Loss Prevention (DLP) is the practice of detecting and preventing data breaches, exfiltration, or unwanted destruction of sensitive data. Organizations use DLP to protect and secure their data and comply with regulations.

Organizations typically use DLP to:

Data Backup

Data backup plays a crucial role in maintaining business continuity by helping org. recover from IT disasters, security breaches, application failures, human error, etc.

All regulatory compliance such as COBIT, SSAE, SOCII, PCI-DSS, HIPPA, SOX, FINRA, FISMA, GDPR, etc. require business to maintain data backups of critical data for specified duration.

Backup Strategies

  1. Identifying the critical business data
  2. Selecting the backup media
  3. Selecting a backup technology
  4. Selecting the appropriate RAID levels
  5. Selecting an appropriate backup method

3 Backup methods

1. Cold backup 🔵

2. Warm backup 🟡

3. Hot backup 🔴

Penetration Test - Basics

This topic will be covered with details in Chapter 14 - Pentesting.

A penetration test, colloquially known as a pen test, pentest or ethical hacking, is an authorized simulated cyberattack on a computer system, performed to evaluate the security of the system.

⚠️ Not to be confused with a vulnerability assessment.

Laws and Standards:

OSSTM Compliance

“Open Source Security Testing Methodology Manual” maintained by ISECOM , defines three types of compliance.

PCI-DSS

“Payment Card Industry Data Security Standard” Standard for organizations handling Credit Cards, ATM cards and other POS cards.

ISO 27001

This International Standard has been prepared to provide requirements for establishing, implementing, maintaining and continually improving an information security management system.

ISO 27002 AND 17799

Based on BS799 but focuses on security objectives and provides security controls based on industry best practice.

HIPAA

“Health Insurance Portability and Accountability Act” a law that set’s privacy standards to protect patient medical records and health information shared between doctors, hospitals and insurance providers.

SOX

“Sarbanes-Oxley Act” Law that requires publicly traded companies to submit to independent audits and to properly disclose financial information.

DMCA

“The Digital Millennium Copyright Act” is a 1998 United States copyright law that implements two 1996 treaties of the World Intellectual Property Organization. It criminalizes production and dissemination of technology, devices, or services intended to circumvent measures that control access to copyrighted works.

FISMA

“Federal Information Security Modernization Ac Of 2002” A law updated in 2004 to codify the authority of the Department of Homeland Security with regard to implementation of information security policies. (For GOV. agencies)

NIST-800-53

Catalogs security and privacy controls for federal information systems, created to help implementation of FISMA.

FITARA

“Federal Information Technology Acquisition Reform Act” A 2013 bill that was intended to change the framework that determines how the US GOV purchases technology.

COBIT

“Control Object for Information and Related Technology” IT Governance framework and toolset, created by ISACA and ITGI

GLBA

“U.S Gramm-Leach-Bliley Act” Law that protects the confidentiality and integrity of personal information that is collected by financial institutions.

CSIRT

“Computer Security Incident Response Team” CSIRT provided a single point of contact when reporting computer security incidents

ITIL

“Information Technology Infrastructure Library” - An operational framework developed in the ’80s that standardizes IT management procedures